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 11577 – NEMO

Changeset 11577


Ignore:
Timestamp:
2019-09-19T19:01:38+02:00 (5 years ago)
Author:
nicolasmartin
Message:

New LaTeX commands \nam and \np to mention namelist content
(Partial commit to serve as a backup before other large edits)
In order to benefit of the syntax highlighting and to have a simpler syntax for
citing namelist block (\nam) and parameter (\np) with an optional variable assignment (\forcode{...}),
at this time the only viable solution I found is to require a double marker for
what it looks like the same item:

  1. Marker with the real name: 'tra_adv' block or 'ln_flx' parameter
  2. Marker with underscore character escaping: 'tra\_adv' block or 'ln\_flx' parameter

Despite many searches and attempts, I did not find a workaround to edit on-the-fly one or
the other marker.
In fact, the problem is on one side that the LaTeX index interprets '_' as a switch for lowering like
in math mode while on the other hand the backslash is considered for Pygments as a typo in Fortran
(red box).

For instance, \nam and \np have as of now the aforementioned 2 mandatory arguments in
the previous order (between braces) + an optional argument for \np when the parameter is defined
(between brackets at the first position):

  • \nam: LaTeX code in the \nam{tra_adv}{tra\_adv} -> PDF ' in the &namtra_adv (namelist X.X) ' with syntax highlighting, the hyperlink and the index entry
  • \np: LaTeX code \np[=.true.]{ln_flx}{ln\_flx} -> PDF ln_flux=.true. with syntax highlighting for the whole string and the entry in the 'parameters' index
Location:
NEMO/trunk/doc/latex
Files:
24 edited

Legend:

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

    r11571 r11577  
    5151 
    5252The user has three options available in defining a horizontal grid, which involve the 
    53 namelist variable \np{jphgr\_mesh} of the \nam{dom} (\texttt{DOMAINcfg} variant only) 
     53namelist variable \np{jphgr_mesh}{jphgr\_mesh} of the \nam{dom} (\texttt{DOMAINcfg} variant only) 
    5454namelist. 
    5555 
    5656\begin{description} 
    57  \item[\np{jphgr\_mesh}=0]  The most general curvilinear orthogonal grids. 
     57 \item[\np{jphgr_mesh}{jphgr\_mesh}=0]  The most general curvilinear orthogonal grids. 
    5858  The coordinates and their first derivatives with respect to $i$ and $j$ are provided 
    5959  in a input file (\ifile{coordinates}), read in \rou{hgr\_read} subroutine of the domhgr module. 
    6060  This is now the only option available within \NEMO\ itself from v4.0 onwards. 
    61 \item[\np{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 
     61\item[\np{jphgr_mesh}{jphgr\_mesh}=1 to 5] A few simple analytical grids are provided (see below). 
    6262  For other analytical grids, the \mdl{domhgr} module (\texttt{DOMAINcfg} variant) must be 
    6363  modified by the user. In most cases, modifying the \mdl{usrdef\_hgr} module of \NEMO\ is 
     
    6767 
    6868There are two simple cases of geographical grids on the sphere. With 
    69 \np{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 
    70 with grid sizes specified by parameters \np{ppe1\_deg} and \np{ppe2\_deg}, 
     69\np{jphgr_mesh}{jphgr\_mesh}=1, the grid (expressed in degrees) is regular in space, 
     70with grid sizes specified by parameters \np{ppe1_deg}{ppe1\_deg} and \np{ppe2_deg}{ppe2\_deg}, 
    7171respectively. Such a geographical grid can be very anisotropic at high latitudes 
    7272because of the convergence of meridians (the zonal scale factors $e_1$ 
    7373become much smaller than the meridional scale factors $e_2$). The Mercator 
    74 grid (\np{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 
     74grid (\np{jphgr_mesh}{jphgr\_mesh}=4) avoids this anisotropy by refining the meridional scale 
    7575factors in the same way as the zonal ones. In this case, meridional scale factors 
    7676and latitudes are calculated analytically using the formulae appropriate for 
    77 a Mercator projection, based on \np{ppe1\_deg} which is a reference grid spacing 
     77a Mercator projection, based on \np{ppe1_deg}{ppe1\_deg} which is a reference grid spacing 
    7878at the equator (this applies even when the geographical equator is situated outside 
    7979the model domain). 
    8080 
    81 In these two cases (\np{jphgr\_mesh}=1 or 4), the grid position is defined by the 
     81In these two cases (\np{jphgr_mesh}{jphgr\_mesh}=1 or 4), the grid position is defined by the 
    8282longitude and latitude of the south-westernmost point (\np{ppglamt0} 
    8383and \np{ppgphi0}). Note that for the Mercator grid the user need only provide 
     
    8787 
    8888Rectangular grids ignoring the spherical geometry are defined with 
    89 \np{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 
    90 Coriolis factor is constant) or a beta-plane (\np{jphgr\_mesh} = 3, the Coriolis factor 
     89\np{jphgr_mesh}{jphgr\_mesh} = 2, 3, 5. The domain is either an $f$-plane (\np{jphgr\_mesh} = 2, 
     90Coriolis factor is constant) or a beta-plane (\np{jphgr_mesh}{jphgr\_mesh} = 3, the Coriolis factor 
    9191is linear in the $j$-direction). The grid size is uniform in meter in each direction, 
    92 and given by the parameters \np{ppe1\_m} and \np{ppe2\_m} respectively. 
     92and given by the parameters \np{ppe1_m}{ppe1\_m} and \np{ppe2_m}{ppe2\_m} respectively. 
    9393The zonal grid coordinate (\textit{glam} arrays) is in kilometers, starting at zero 
    9494with the first $t$-point. The meridional coordinate (gphi. arrays) is in kilometers, 
     
    9797latitude for computation of the Coriolis parameter. In the case of the beta plane, 
    9898\np{ppgphi0} corresponds to the center of the domain. Finally, the special case 
    99 \np{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 
     99\np{jphgr_mesh}{jphgr\_mesh}=5 corresponds to a beta plane in a rotated domain for the 
    100100GYRE configuration, representing a classical mid-latitude double gyre system. 
    101101The rotation allows us to maximize the jet length relative to the gyre areas 
     
    170170\end{gather} 
    171171 
    172 If the ice shelf cavities are opened (\np{ln\_isfcav}\forcode{ = .true.}), the definition 
     172If the ice shelf cavities are opened (\np{ln_isfcav}{ln\_isfcav}\forcode{ = .true.}), the definition 
    173173of $z_0$ is the same.  However, definition of $e_3^0$ at $t$- and $w$-points is 
    174174respectively changed to: 
     
    312312 
    313313Three options are possible for defining the bathymetry, according to the namelist variable 
    314 \np{nn\_bathy} (found in \nam{dom} namelist (\texttt{DOMAINCFG} variant) ): 
     314\np{nn_bathy}{nn\_bathy} (found in \nam{dom} namelist (\texttt{DOMAINCFG} variant) ): 
    315315\begin{description} 
    316 \item[\np{nn\_bathy}\forcode{ = 0}]: 
     316\item[\np{nn_bathy}{nn\_bathy}\forcode{ = 0}]: 
    317317  a flat-bottom domain is defined. 
    318318  The total depth $z_w (jpk)$ is given by the coordinate transformation. 
    319319  The domain can either be a closed basin or a periodic channel depending on the parameter \np{jperio}. 
    320 \item[\np{nn\_bathy}\forcode{ = -1}]: 
     320\item[\np{nn_bathy}{nn\_bathy}\forcode{ = -1}]: 
    321321  a domain with a bump of topography one third of the domain width at the central latitude. 
    322322  This is meant for the "EEL-R5" configuration, a periodic or open boundary channel with a seamount. 
    323 \item[\np{nn\_bathy}\forcode{ = 1}]: 
     323\item[\np{nn_bathy}{nn\_bathy}\forcode{ = 1}]: 
    324324  read a bathymetry and ice shelf draft (if needed). 
    325325  The \ifile{bathy\_meter} file (Netcdf format) provides the ocean depth (positive, in meters) at 
     
    332332  The \ifile{isfdraft\_meter} file (Netcdf format) provides the ice shelf draft (positive, in meters) at 
    333333  each grid point of the model grid. 
    334   This file is only needed if \np{ln\_isfcav}\forcode{ = .true.}. 
     334  This file is only needed if \np{ln_isfcav}{ln\_isfcav}\forcode{ = .true.}. 
    335335  Defining the ice shelf draft will also define the ice shelf edge and the grounding line position. 
    336336\end{description} 
     
    359359%        z-coordinate with constant thickness 
    360360% ------------------------------------------------------------------------------------------------------------- 
    361 \subsubsection[$Z$-coordinate with uniform thickness levels (\forcode{ln_zco})]{$Z$-coordinate with uniform thickness levels (\protect\np{ln\_zco})} 
     361\subsubsection[$Z$-coordinate with uniform thickness levels (\forcode{ln_zco})]{$Z$-coordinate with uniform thickness levels (\protect\np{ln_zco}{ln\_zco})} 
    362362\label{subsec:DOMCFG_zco} 
    363363 
     
    371371%        z-coordinate with partial step 
    372372% ------------------------------------------------------------------------------------------------------------- 
    373 \subsubsection[$Z$-coordinate with partial step (\forcode{ln_zps})]{$Z$-coordinate with partial step (\protect\np{ln\_zps})} 
     373\subsubsection[$Z$-coordinate with partial step (\forcode{ln_zps})]{$Z$-coordinate with partial step (\protect\np{ln_zps}{ln\_zps})} 
    374374\label{subsec:DOMCFG_zps} 
    375375 
     
    394394$250~m$).  Two variables in the namdom namelist are used to define the partial step 
    395395vertical grid.  The mimimum water thickness (in meters) allowed for a cell partially 
    396 filled with bathymetry at level jk is the minimum of \np{rn\_e3zps\_min} (thickness in 
    397 meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn\_e3zps\_rat} (a fraction, usually 10\%, of 
     396filled with bathymetry at level jk is the minimum of \np{rn_e3zps_min}{rn\_e3zps\_min} (thickness in 
     397meters, usually $20~m$) or $e_{3t}(jk)*$\np{rn_e3zps_rat}{rn\_e3zps\_rat} (a fraction, usually 10\%, of 
    398398the default thickness $e_{3t}(jk)$). 
    399399 
     
    401401%        s-coordinate 
    402402% ------------------------------------------------------------------------------------------------------------- 
    403 \subsubsection[$S$-coordinate (\forcode{ln_sco})]{$S$-coordinate (\protect\np{ln\_sco})} 
     403\subsubsection[$S$-coordinate (\forcode{ln_sco})]{$S$-coordinate (\protect\np{ln_sco}{ln\_sco})} 
    404404\label{sec:DOMCFG_sco} 
    405405%------------------------------------------nam_zgr_sco--------------------------------------------------- 
     
    411411\end{listing} 
    412412%-------------------------------------------------------------------------------------------------------------- 
    413 Options are defined in \nam{zgr\_sco} (\texttt{DOMAINcfg} only). 
    414 In $s$-coordinate (\np{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from 
     413Options are defined in \nam{zgr_sco}{zgr\_sco} (\texttt{DOMAINcfg} only). 
     414In $s$-coordinate (\np{ln_sco}{ln\_sco}\forcode{ = .true.}), the depth and thickness of the model levels are defined from 
    415415the product of a depth field and either a stretching function or its derivative, respectively: 
    416416 
     
    426426since a mixed step-like and bottom-following representation of the topography can be used 
    427427(\autoref{fig:DOM_z_zps_s_sps}) or an envelop bathymetry can be defined (\autoref{fig:DOM_z_zps_s_sps}). 
    428 The namelist parameter \np{rn\_rmax} determines the slope at which 
     428The namelist parameter \np{rn_rmax}{rn\_rmax} determines the slope at which 
    429429the terrain-following coordinate intersects the sea bed and becomes a pseudo z-coordinate. 
    430 The coordinate can also be hybridised by specifying \np{rn\_sbot\_min} and \np{rn\_sbot\_max} as 
     430The coordinate can also be hybridised by specifying \np{rn_sbot_min}{rn\_sbot\_min} and \np{rn_sbot_max}{rn\_sbot\_max} as 
    431431the minimum and maximum depths at which the terrain-following vertical coordinate is calculated. 
    432432 
     
    435435 
    436436The original default \NEMO\ s-coordinate stretching is available if neither of the other options are specified as true 
    437 (\np{ln\_s\_SH94}\forcode{ = .false.} and \np{ln\_s\_SF12}\forcode{ = .false.}). 
     437(\np{ln_s_SH94}{ln\_s\_SH94}\forcode{ = .false.} and \np{ln_s_SF12}{ln\_s\_SF12}\forcode{ = .false.}). 
    438438This uses a depth independent $\tanh$ function for the stretching \citep{madec.delecluse.ea_JPO96}: 
    439439 
     
    455455 
    456456A stretching function, 
    457 modified from the commonly used \citet{song.haidvogel_JCP94} stretching (\np{ln\_s\_SH94}\forcode{ = .true.}), 
     457modified from the commonly used \citet{song.haidvogel_JCP94} stretching (\np{ln_s_SH94}{ln\_s\_SH94}\forcode{ = .true.}), 
    458458is also available and is more commonly used for shelf seas modelling: 
    459459 
     
    476476%% %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    477477 
    478 where $H_c$ is the critical depth (\np{rn\_hc}) at which the coordinate transitions from pure $\sigma$ to 
    479 the stretched coordinate, and $\theta$ (\np{rn\_theta}) and $b$ (\np{rn\_bb}) are the surface and 
     478where $H_c$ is the critical depth (\np{rn_hc}{rn\_hc}) at which the coordinate transitions from pure $\sigma$ to 
     479the stretched coordinate, and $\theta$ (\np{rn_theta}{rn\_theta}) and $b$ (\np{rn_bb}{rn\_bb}) are the surface and 
    480480bottom control parameters such that $0 \leqslant \theta \leqslant 20$, and $0 \leqslant b \leqslant 1$. 
    481481$b$ has been designed to allow surface and/or bottom increase of the vertical resolution 
    482482(\autoref{fig:DOMCFG_sco_function}). 
    483483 
    484 Another example has been provided at version 3.5 (\np{ln\_s\_SF12}) that allows a fixed surface resolution in 
     484Another example has been provided at version 3.5 (\np{ln_s_SF12}{ln\_s\_SF12}) that allows a fixed surface resolution in 
    485485an analytical terrain-following stretching \citet{siddorn.furner_OM13}. 
    486486In this case the a stretching function $\gamma$ is defined such that: 
     
    504504 
    505505This gives an analytical stretching of $\sigma$ that is solvable in $A$ and $B$ as a function of 
    506 the user prescribed stretching parameter $\alpha$ (\np{rn\_alpha}) that stretches towards 
     506the user prescribed stretching parameter $\alpha$ (\np{rn_alpha}{rn\_alpha}) that stretches towards 
    507507the surface ($\alpha > 1.0$) or the bottom ($\alpha < 1.0$) and 
    508 user prescribed surface (\np{rn\_zs}) and bottom depths. 
     508user prescribed surface (\np{rn_zs}{rn\_zs}) and bottom depths. 
    509509The bottom cell depth in this example is given as a function of water depth: 
    510510 
     
    514514\] 
    515515 
    516 where the namelist parameters \np{rn\_zb\_a} and \np{rn\_zb\_b} are $a$ and $b$ respectively. 
     516where the namelist parameters \np{rn_zb_a}{rn\_zb\_a} and \np{rn_zb_b}{rn\_zb\_b} are $a$ and $b$ respectively. 
    517517 
    518518%% %>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    542542the critical depth $h_c$. 
    543543In this example two options are available in depths shallower than $h_c$, 
    544 with pure sigma being applied if the \np{ln\_sigcrit} is true and pure z-coordinates if it is false 
     544with pure sigma being applied if the \np{ln_sigcrit}{ln\_sigcrit} is true and pure z-coordinates if it is false 
    545545(the z-coordinate being equal to the depths of the stretched coordinate at $h_c$). 
    546546 
     
    553553%        z*- or s*-coordinate 
    554554% ------------------------------------------------------------------------------------------------------------- 
    555 \subsubsection[\zstar- or \sstar-coordinate (\forcode{ln_linssh})]{\zstar- or \sstar-coordinate (\protect\np{ln\_linssh})} 
     555\subsubsection[\zstar- or \sstar-coordinate (\forcode{ln_linssh})]{\zstar- or \sstar-coordinate (\protect\np{ln_linssh}{ln\_linssh})} 
    556556\label{subsec:DOMCFG_zgr_star} 
    557557 
  • NEMO/trunk/doc/latex/NEMO/subfiles/apdx_algos.tex

    r11561 r11577  
    1717%        UBS scheme 
    1818% ------------------------------------------------------------------------------------------------------------- 
    19 \section{Upstream Biased Scheme (UBS) (\protect\np{ln\_traadv\_ubs}\forcode{ = .true.})} 
     19\section{Upstream Biased Scheme (UBS) (\protect\np{ln_traadv_ubs}{ln\_traadv\_ubs}\forcode{ = .true.})} 
    2020\label{sec:ALGOS_tra_adv_ubs} 
    2121 
     
    5959the control of artificial diapycnal fluxes is of paramount importance. 
    6060It has therefore been preferred to evaluate the vertical flux using the TVD scheme when 
    61 \np{ln\_traadv\_ubs}\forcode{ = .true.}. 
     61\np{ln_traadv_ubs}{ln\_traadv\_ubs}\forcode{ = .true.}. 
    6262 
    6363For stability reasons, in \autoref{eq:TRA_adv_ubs}, the first term which corresponds to 
  • NEMO/trunk/doc/latex/NEMO/subfiles/apdx_invariants.tex

    r11558 r11577  
    366366%       Vorticity Term with ENE scheme 
    367367% ------------------------------------------------------------------------------------------------------------- 
    368 \subsubsection{Vorticity term with ENE scheme (\protect\np{ln\_dynvor\_ene}\forcode{ = .true.})} 
     368\subsubsection{Vorticity term with ENE scheme (\protect\np{ln_dynvor_ene}{ln\_dynvor\_ene}\forcode{ = .true.})} 
    369369\label{subsec:INVARIANTS_vorENE} 
    370370 
     
    406406%       Vorticity Term with EEN scheme 
    407407% ------------------------------------------------------------------------------------------------------------- 
    408 \subsubsection{Vorticity term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
     408\subsubsection{Vorticity term with EEN scheme (\protect\np{ln_dynvor_een}{ln\_dynvor\_een}\forcode{ = .true.})} 
    409409\label{subsec:INVARIANTS_vorEEN_vect} 
    410410 
     
    878878%       Vorticity Term with ENS scheme 
    879879% ------------------------------------------------------------------------------------------------------------- 
    880 \subsubsection{Vorticity term with ENS scheme  (\protect\np{ln\_dynvor\_ens}\forcode{ = .true.})} 
     880\subsubsection{Vorticity term with ENS scheme  (\protect\np{ln_dynvor_ens}{ln\_dynvor\_ens}\forcode{ = .true.})} 
    881881\label{subsec:INVARIANTS_vorENS} 
    882882 
     
    947947%       Vorticity Term with EEN scheme 
    948948% ------------------------------------------------------------------------------------------------------------- 
    949 \subsubsection{Vorticity Term with EEN scheme (\protect\np{ln\_dynvor\_een}\forcode{ = .true.})} 
     949\subsubsection{Vorticity Term with EEN scheme (\protect\np{ln_dynvor_een}{ln\_dynvor\_een}\forcode{ = .true.})} 
    950950\label{subsec:INVARIANTS_vorEEN} 
    951951 
  • NEMO/trunk/doc/latex/NEMO/subfiles/apdx_triads.tex

    r11571 r11577  
    2222\newpage 
    2323 
    24 \section[Choice of \forcode{namtra\_ldf} namelist parameters]{Choice of \protect\nam{tra\_ldf} namelist parameters} 
     24\section[Choice of \forcode{namtra\_ldf} namelist parameters]{Choice of \protect\nam{tra_ldf}{tra\_ldf} namelist parameters} 
    2525%-----------------------------------------nam_traldf------------------------------------------------------ 
    2626 
     
    2828 
    2929Two scheme are available to perform the iso-neutral diffusion. 
    30 If the namelist logical \np{ln\_traldf\_triad} is set true, 
     30If the namelist logical \np{ln_traldf_triad}{ln\_traldf\_triad} is set true, 
    3131\NEMO\ updates both active and passive tracers using the Griffies triad representation of iso-neutral diffusion and 
    3232the eddy-induced advective skew (GM) fluxes. 
    33 If the namelist logical \np{ln\_traldf\_iso} is set true, 
     33If the namelist logical \np{ln_traldf_iso}{ln\_traldf\_iso} is set true, 
    3434the filtered version of Cox's original scheme (the Standard scheme) is employed (\autoref{sec:LDF_slp}). 
    3535In the present implementation of the Griffies scheme, 
    36 the advective skew fluxes are implemented even if \np{ln\_traldf\_eiv} is false. 
     36the advective skew fluxes are implemented even if \np{ln_traldf_eiv}{ln\_traldf\_eiv} is false. 
    3737 
    3838Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 
     
    4242The options specific to the Griffies scheme include: 
    4343\begin{description} 
    44 \item[\np{ln\_triad\_iso}] 
     44\item[\np{ln_triad_iso}{ln\_triad\_iso}] 
    4545  See \autoref{sec:TRIADS_taper}. 
    4646  If this is set false (the default), 
     
    4949  This is the same treatment as used in the default implementation 
    5050  \autoref{subsec:LDF_slp_iso}; \autoref{fig:LDF_eiv_slp}. 
    51   Where \np{ln\_triad\_iso} is set true, 
     51  Where \np{ln_triad_iso}{ln\_triad\_iso} is set true, 
    5252  the vertical skew flux is further reduced to ensure no vertical buoyancy flux, 
    5353  giving an almost pure horizontal diffusive tracer flux within the mixed layer. 
    5454  This is similar to the tapering suggested by \citet{gerdes.koberle.ea_CD91}. See \autoref{subsec:TRIADS_Gerdes-taper} 
    55 \item[\np{ln\_botmix\_triad}] 
     55\item[\np{ln_botmix_triad}{ln\_botmix\_triad}] 
    5656  See \autoref{sec:TRIADS_iso_bdry}. 
    5757  If this is set false (the default) then the lateral diffusive fluxes 
     
    5959  If it is set true, however, then these lateral diffusive fluxes are applied, 
    6060  giving smoother bottom tracer fields at the cost of introducing diapycnal mixing. 
    61 \item[\np{rn\_sw\_triad}] 
     61\item[\np{rn_sw_triad}{rn\_sw\_triad}] 
    6262  blah blah to be added.... 
    6363\end{description} 
    6464The options shared with the Standard scheme include: 
    6565\begin{description} 
    66 \item[\np{ln\_traldf\_msc}]   blah blah to be added 
    67 \item[\np{rn\_slpmax}]  blah blah to be added 
     66\item[\np{ln_traldf_msc}{ln\_traldf\_msc}]   blah blah to be added 
     67\item[\np{rn_slpmax}{rn\_slpmax}]  blah blah to be added 
    6868\end{description} 
    6969 
     
    646646Note that both near bottom triad slopes \triad{i}{k}{R}{1/2}{1/2} and \triad{i+1}{k}{R}{-1/2}{1/2} are masked when 
    647647either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked. 
    648 The associated lateral fluxes (grey-black dashed line) are masked if \np{ln\_botmix\_triad}\forcode{ = .false.}, 
    649 but left unmasked, giving bottom mixing, if \np{ln\_botmix\_triad}\forcode{ = .true.}. 
    650  
    651 The default option \np{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the bbl mixing option is enabled 
    652 (\np{ln\_trabbl}\forcode{ = .true.}, with \np{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems. 
    653 For setups with topography without bbl mixing, \np{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 
     648The associated lateral fluxes (grey-black dashed line) are masked if \np{ln_botmix_triad}{ln\_botmix\_triad}\forcode{ = .false.}, 
     649but left unmasked, giving bottom mixing, if \np{ln_botmix_triad}{ln\_botmix\_triad}\forcode{ = .true.}. 
     650 
     651The default option \np{ln_botmix_triad}{ln\_botmix\_triad}\forcode{ = .false.} is suitable when the bbl mixing option is enabled 
     652(\np{ln_trabbl}{ln\_trabbl}\forcode{ = .true.}, with \np{nn_bbl_ldf}{nn\_bbl\_ldf}\forcode{ = 1}), or for simple idealized problems. 
     653For setups with topography without bbl mixing, \np{ln_botmix_triad}{ln\_botmix\_triad}\forcode{ = .true.} may be necessary. 
    654654% >>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    655655\begin{figure}[h] 
     
    672672    \ie\ the $i,k+1$ $u$-point is masked. 
    673673    The associated lateral fluxes (grey-black dashed line) are masked if 
    674     \protect\np{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked, 
    675     giving bottom mixing, if \protect\np{ln\_botmix\_triad}\forcode{ = .true.}} 
     674    \protect\np{ln_botmix_triad}{ln\_botmix\_triad}\forcode{ = .false.}, but left unmasked, 
     675    giving bottom mixing, if \protect\np{ln_botmix_triad}{ln\_botmix\_triad}\forcode{ = .true.}} 
    676676  \label{fig:TRIADS_bdry_triads} 
    677677\end{figure} 
     
    715715\label{sec:TRIADS_lintaper} 
    716716 
    717 This is the option activated by the default choice \np{ln\_triad\_iso}\forcode{ = .false.}. 
     717This is the option activated by the default choice \np{ln_triad_iso}{ln\_triad\_iso}\forcode{ = .false.}. 
    718718Slopes $\tilde{r}_i$ relative to geopotentials are tapered linearly from their value immediately below 
    719719the mixed layer to zero at the surface, as described in option (c) of \autoref{fig:LDF_eiv_slp}, to values 
     
    833833\label{subsec:TRIADS_Gerdes-taper} 
    834834 
    835 The alternative option is activated by setting \np{ln\_triad\_iso} = true. 
     835The alternative option is activated by setting \np{ln_triad_iso}{ln\_triad\_iso} = true. 
    836836This retains the same tapered slope $\rML$  described above for the calculation of the $_{33}$ term of 
    837837the iso-neutral diffusion tensor (the vertical tracer flux driven by vertical tracer gradients), 
     
    915915computing the tracer advection. 
    916916This is implemented if \texttt{traldf\_eiv?} is set in the default implementation, 
    917 where \np{ln\_traldf\_triad} is set false. 
     917where \np{ln_traldf_triad}{ln\_traldf\_triad} is set false. 
    918918This allows us to take advantage of all the advection schemes offered for the tracers 
    919919(see \autoref{sec:TRA_adv}) and not just a $2^{nd}$ order advection scheme. 
     
    921921\emph{positivity} of the advection scheme is of paramount importance. 
    922922 
    923 However, when \np{ln\_traldf\_triad} is set true, 
     923However, when \np{ln_traldf_triad}{ln\_traldf\_triad} is set true, 
    924924\NEMO\ instead implements eddy induced advection according to the so-called skew form \citep{griffies_JPO98}. 
    925925It is based on a transformation of the advective fluxes using the non-divergent nature of the eddy induced velocity. 
     
    11131113and both near bottom triad slopes $\triadt{i}{k}{R}{1/2}{1/2}$ and $\triadt{i+1}{k}{R}{-1/2}{1/2}$ are masked when 
    11141114either of the $i,k+1$ or $i+1,k+1$ tracer points is masked, \ie\ the $i,k+1$ $u$-point is masked. 
    1115 The namelist parameter \np{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes. 
     1115The namelist parameter \np{ln_botmix_triad}{ln\_botmix\_triad} has no effect on the eddy-induced skew-fluxes. 
    11161116 
    11171117\subsection{Limiting of the slopes within the interior} 
     
    11301130This is option (c) of \autoref{fig:LDF_eiv_slp}. 
    11311131This linear tapering for the slopes used to calculate the eddy-induced fluxes is unaffected by 
    1132 the value of \np{ln\_triad\_iso}. 
     1132the value of \np{ln_triad_iso}{ln\_triad\_iso}. 
    11331133 
    11341134The justification for this linear slope tapering is that, for $A_e$ that is constant or varies only in 
     
    11451145\label{sec:TRIADS_sfdiag} 
    11461146 
    1147 Where the namelist parameter \np{ln\_traldf\_gdia}\forcode{ = .true.}, 
     1147Where the namelist parameter \np{ln_traldf_gdia}{ln\_traldf\_gdia}\forcode{ = .true.}, 
    11481148diagnosed mean eddy-induced velocities are output. 
    11491149Each time step, streamfunctions are calculated in the $i$-$k$ and $j$-$k$ planes at 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_ASM.tex

    r11567 r11577  
    2626These are read into the model from a NetCDF file which may be produced by separate data assimilation code. 
    2727The code can also output model background fields which are used as an input to data assimilation code. 
    28 This is all controlled by the namelist \nam{\_asminc}. 
     28This is all controlled by the namelist \nam{_asminc}{\_asminc}. 
    2929There is a brief description of all the namelist options provided. 
    3030To build the ASM code \key{asminc} must be set. 
     
    3737Direct initialization (DI) refers to the instantaneous correction of the model background state using 
    3838the analysis increment. 
    39 DI is used when \np{ln\_asmdin} is set to true. 
     39DI is used when \np{ln_asmdin}{ln\_asmdin} is set to true. 
    4040 
    4141\section{Incremental analysis updates} 
     
    4747This technique is referred to as Incremental Analysis Updates (IAU) \citep{bloom.takacs.ea_MWR96}. 
    4848IAU is a common technique used with 3D assimilation methods such as 3D-Var or OI. 
    49 IAU is used when \np{ln\_asmiau} is set to true. 
     49IAU is used when \np{ln_asmiau}{ln\_asmiau} is set to true. 
    5050 
    5151With IAU, the model state trajectory ${\mathbf x}$ in the assimilation window ($t_{0} \leq t_{i} \leq t_{N}$) 
     
    134134\citep{talagrand_JAS72, dobricic.pinardi.ea_OS07}. 
    135135Diffusion coefficients are defined as $A_D = \alpha e_{1t} e_{2t}$, where $\alpha = 0.2$. 
    136 The divergence damping is activated by assigning to \np{nn\_divdmp} in the \nam{\_asminc} namelist 
     136The divergence damping is activated by assigning to \np{nn_divdmp}{nn\_divdmp} in the \nam{_asminc}{\_asminc} namelist 
    137137a value greater than zero. 
    138138This specifies the number of iterations of the divergence damping. Setting a value of the order of 100 will result in a significant reduction in the vertical velocity induced by the increments. 
     
    144144\label{sec:ASM_details} 
    145145 
    146 Here we show an example \nam{\_asminc} namelist and the header of an example assimilation increments file on 
     146Here we show an example \nam{_asminc}{\_asminc} namelist and the header of an example assimilation increments file on 
    147147the ORCA2 grid. 
    148148 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIA.tex

    r11571 r11577  
    125125 
    126126XIOS may be used to read single file restart produced by \NEMO. Currently only the variables written to 
    127 file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln\_xios\_read}\forcode{=.true. } 
     127file \forcode{numror} can be handled by XIOS. To activate restart reading using XIOS, set \np{ln_xios_read}{ln\_xios\_read}\forcode{=.true. } 
    128128in \textit{namelist\_cfg}. This setting will be ignored when multiple restart files are present, and default \NEMO 
    129129functionality will be used for reading. There is no need to change iodef.xml file to use XIOS to read 
     
    140140dimension \forcode{z} defined in restart file must be renamed to \forcode{nav_lev}.\\ 
    141141 
    142 XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn\_wxios} is used to determine the 
     142XIOS can also be used to write \NEMO\ restart. A namelist parameter \np{nn_wxios}{nn\_wxios} is used to determine the 
    143143type of restart \NEMO\ will write. If it is set to 0, default \NEMO\ functionality will be used - each 
    144144processor writes its own restart file; if it is set to 1 XIOS will write restart into a single file; 
    145 for \np{nn\_wxios}\forcode{=2} the restart will be written by XIOS into multiple files, one for each XIOS server. 
    146 Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn\_wxios}\forcode{=2}}. The restart will 
     145for \np{nn_wxios}{nn\_wxios}\forcode{=2} the restart will be written by XIOS into multiple files, one for each XIOS server. 
     146Note, however, that \textbf{\NEMO\ will not read restart generated by XIOS when \np{nn_wxios}{nn\_wxios}\forcode{=2}}. The restart will 
    147147have to be rebuild before continuing the run. This option aims to reduce number of restart files generated by \NEMO\ only, 
    148148and may be useful when there is a need to change number of processors used to run simulation. 
     
    306306\end{xmllines} 
    307307 
    308 Note, if your array is computed within the surface module each \np{nn\_fsbc} time\_step, 
     308Note, if your array is computed within the surface module each \np{nn_fsbc}{nn\_fsbc} time\_step, 
    309309add the field definition within the field\_group defined with the id "SBC": 
    310310\xmlcode{<field_group id="SBC" ...>} which has been defined with the correct frequency of operations 
     
    700700    field\_definition                                                    & 
    701701    freq\_op                                                             & 
    702     \np{rn\_rdt}                                                         \\ 
     702    \np{rn_rdt}{rn\_rdt}                                                         \\ 
    703703    \hline 
    704704    SBC                                                                  & 
    705705    freq\_op                                                             & 
    706     \np{rn\_rdt} $\times$ \np{nn\_fsbc}                                  \\ 
     706    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_fsbc}{nn\_fsbc}                                  \\ 
    707707    \hline 
    708708    ptrc\_T                                                              & 
    709709    freq\_op                                                             & 
    710     \np{rn\_rdt} $\times$ \np{nn\_dttrc}                                 \\ 
     710    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc}                                 \\ 
    711711    \hline 
    712712    diad\_T                                                              & 
    713713    freq\_op                                                             & 
    714     \np{rn\_rdt} $\times$ \np{nn\_dttrc}                                 \\ 
     714    \np{rn_rdt}{rn\_rdt} $\times$ \np{nn_dttrc}{nn\_dttrc}                                 \\ 
    715715    \hline 
    716716    EqT, EqU, EqW                                                        & 
     
    13231323 
    13241324Some metadata that may significantly increase the file size (horizontal cell areas and vertices) are controlled by 
    1325 the namelist parameter \np{ln\_cfmeta} in the \nam{run} namelist. 
     1325the namelist parameter \np{ln_cfmeta}{ln\_cfmeta} in the \nam{run} namelist. 
    13261326This must be set to true if these metadata are to be included in the output files. 
    13271327 
     
    13451345most analysis codes can be relinked simply with the new libraries and will then read both NetCDF3 and NetCDF4 files. 
    13461346\NEMO\ executables linked with NetCDF4 libraries can be made to produce NetCDF3 files by 
    1347 setting the \np{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 
     1347setting the \np{ln_nc4zip}{ln\_nc4zip} logical to false in the \nam{nc4} namelist: 
    13481348 
    13491349%------------------------------------------namnc4---------------------------------------------------- 
     
    13571357 
    13581358If \key{netcdf4} has not been defined, these namelist parameters are not read. 
    1359 In this case, \np{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined. 
     1359In this case, \np{ln_nc4zip}{ln\_nc4zip} is set false and dummy routines for a few NetCDF4-specific functions are defined. 
    13601360These functions will not be used but need to be included so that compilation is possible with NetCDF3 libraries. 
    13611361 
     
    14701470 
    14711471\begin{description} 
    1472 \item[\np{ln\_glo\_trd}]: 
    1473   at each \np{nn\_trd} time-step a check of the basin averaged properties of 
     1472\item[\np{ln_glo_trd}{ln\_glo\_trd}]: 
     1473  at each \np{nn_trd}{nn\_trd} time-step a check of the basin averaged properties of 
    14741474  the momentum and tracer equations is performed. 
    14751475  This also includes a check of $T^2$, $S^2$, $\tfrac{1}{2} (u^2+v2)$, 
    14761476  and potential energy time evolution equations properties; 
    1477 \item[\np{ln\_dyn\_trd}]: 
     1477\item[\np{ln_dyn_trd}{ln\_dyn\_trd}]: 
    14781478  each 3D trend of the evolution of the two momentum components is output; 
    1479 \item[\np{ln\_dyn\_mxl}]: 
     1479\item[\np{ln_dyn_mxl}{ln\_dyn\_mxl}]: 
    14801480  each 3D trend of the evolution of the two momentum components averaged over the mixed layer is output; 
    1481 \item[\np{ln\_vor\_trd}]: 
     1481\item[\np{ln_vor_trd}{ln\_vor\_trd}]: 
    14821482  a vertical summation of the moment tendencies is performed, 
    14831483  then the curl is computed to obtain the barotropic vorticity tendencies which are output; 
    1484 \item[\np{ln\_KE\_trd}] : 
     1484\item[\np{ln_KE_trd}{ln\_KE\_trd}] : 
    14851485  each 3D trend of the Kinetic Energy equation is output; 
    1486 \item[\np{ln\_tra\_trd}]: 
     1486\item[\np{ln_tra_trd}{ln\_tra\_trd}]: 
    14871487  each 3D trend of the evolution of temperature and salinity is output; 
    1488 \item[\np{ln\_tra\_mxl}]: 
     1488\item[\np{ln_tra_mxl}{ln\_tra\_mxl}]: 
    14891489  each 2D trend of the evolution of temperature and salinity averaged over the mixed layer is output; 
    14901490\end{description} 
     
    14941494 
    14951495\textbf{Note that} in the current version (v3.6), many changes has been introduced but not fully tested. 
    1496 In particular, options associated with \np{ln\_dyn\_mxl}, \np{ln\_vor\_trd}, and \np{ln\_tra\_mxl} are not working, 
    1497 and none of the options have been tested with variable volume (\ie\ \np{ln\_linssh}\forcode{=.true.}). 
     1496In particular, options associated with \np{ln_dyn_mxl}{ln\_dyn\_mxl}, \np{ln_vor_trd}{ln\_vor\_trd}, and \np{ln_tra_mxl}{ln\_tra\_mxl} are not working, 
     1497and none of the options have been tested with variable volume (\ie\ \np{ln_linssh}{ln\_linssh}\forcode{=.true.}). 
    14981498 
    14991499% ------------------------------------------------------------------------------------------------------------- 
     
    15151515Options are defined by \nam{flo} namelist variables. 
    15161516The algorithm used is based either on the work of \cite{blanke.raynaud_JPO97} (default option), 
    1517 or on a $4^th$ Runge-Hutta algorithm (\np{ln\_flork4}\forcode{=.true.}). 
     1517or on a $4^th$ Runge-Hutta algorithm (\np{ln_flork4}{ln\_flork4}\forcode{=.true.}). 
    15181518Note that the \cite{blanke.raynaud_JPO97} algorithm have the advantage of providing trajectories which 
    15191519are consistent with the numeric of the code, so that the trajectories never intercept the bathymetry. 
     
    15221522 
    15231523Initial coordinates can be given with Ariane Tools convention 
    1524 (IJK coordinates, (\np{ln\_ariane}\forcode{=.true.}) ) or with longitude and latitude. 
     1524(IJK coordinates, (\np{ln_ariane}{ln\_ariane}\forcode{=.true.}) ) or with longitude and latitude. 
    15251525 
    15261526In case of Ariane convention, input filename is \textit{init\_float\_ariane}. 
     
    15731573 
    15741574\np{jpnfl} is the total number of floats during the run. 
    1575 When initial positions are read in a restart file (\np{ln\_rstflo}\forcode{=.true.} ), 
     1575When initial positions are read in a restart file (\np{ln_rstflo}{ln\_rstflo}\forcode{=.true.} ), 
    15761576\np{jpnflnewflo} can be added in the initialization file. 
    15771577 
    15781578\subsubsection{Output data} 
    15791579 
    1580 \np{nn\_writefl} is the frequency of writing in float output file and \np{nn\_stockfl} is the frequency of 
     1580\np{nn_writefl}{nn\_writefl} is the frequency of writing in float output file and \np{nn_stockfl}{nn\_stockfl} is the frequency of 
    15811581creation of the float restart file. 
    15821582 
    1583 Output data can be written in ascii files (\np{ln\_flo\_ascii}\forcode{=.true.}). 
     1583Output data can be written in ascii files (\np{ln_flo_ascii}{ln\_flo\_ascii}\forcode{=.true.}). 
    15841584In that case, output filename is trajec\_float. 
    15851585 
    1586 Another possiblity of writing format is Netcdf (\np{ln\_flo\_ascii}\forcode{=.false.}) with 
     1586Another possiblity of writing format is Netcdf (\np{ln_flo_ascii}{ln\_flo\_ascii}\forcode{=.false.}) with 
    15871587\key{iomput} and outputs selected in iodef.xml. 
    15881588Here it is an example of specification to put in files description section: 
     
    16211621This on-line Harmonic analysis is actived with \key{diaharm}. 
    16221622 
    1623 Some parameters are available in namelist \nam{\_diaharm}: 
    1624  
    1625  - \np{nit000\_han} is the first time step used for harmonic analysis 
    1626  
    1627  - \np{nitend\_han} is the  last time step used for harmonic analysis 
    1628  
    1629  - \np{nstep\_han}  is the  time step frequency for harmonic analysis 
    1630  
    1631 % - \np{nb\_ana}     is the number of harmonics to analyse 
     1623Some parameters are available in namelist \nam{_diaharm}{\_diaharm}: 
     1624 
     1625 - \np{nit000_han}{nit000\_han} is the first time step used for harmonic analysis 
     1626 
     1627 - \np{nitend_han}{nitend\_han} is the  last time step used for harmonic analysis 
     1628 
     1629 - \np{nstep_han}{nstep\_han}  is the  time step frequency for harmonic analysis 
     1630 
     1631% - \np{nb_ana}{nb\_ana}     is the number of harmonics to analyse 
    16321632 
    16331633 - \np{tname}       is an array with names of tidal constituents to analyse 
    16341634 
    1635  \np{nit000\_han} and \np{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
     1635 \np{nit000_han}{nit000\_han} and \np{nitend_han}{nitend\_han} must be between \np{nit000} and \np{nitend} of the simulation. 
    16361636 The restart capability is not implemented. 
    16371637 
     
    16851685- \texttt{salt\_transport}   for   salt transports (unit: $10^{9}Kg s^{-1}$) \\ 
    16861686 
    1687 Namelist variables in \nam{\_diadct} control how frequently the flows are summed and the time scales over which 
     1687Namelist variables in \nam{_diadct}{\_diadct} control how frequently the flows are summed and the time scales over which 
    16881688they are averaged, as well as the level of output for debugging: 
    1689 \np{nn\_dct}   : frequency of instantaneous transports computing 
    1690 \np{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
    1691 \np{nn\_debug} : debugging of the section 
     1689\np{nn_dct}{nn\_dct}   : frequency of instantaneous transports computing 
     1690\np{nn_dctwri}{nn\_dctwri}: frequency of writing ( mean of instantaneous transports ) 
     1691\np{nn_debug}{nn\_debug} : debugging of the section 
    16921692 
    16931693\subsubsection{Creating a binary file containing the pathway of each section} 
     
    19391939 
    19401940Third, the discretisation of \autoref{eq:DIA_steric_Bq} depends on the type of free surface which is considered. 
    1941 In the non linear free surface case, \ie\ \np{ln\_linssh}\forcode{=.true.}, it is given by 
     1941In the non linear free surface case, \ie\ \np{ln_linssh}{ln\_linssh}\forcode{=.true.}, it is given by 
    19421942 
    19431943\[ 
     
    20342034sea water pressure at sea floor (botpres), dynamic sea surface height (sshdyn). 
    20352035 
    2036 In \mdl{diaptr} when \np{ln\_diaptr}\forcode{=.true.} 
     2036In \mdl{diaptr} when \np{ln_diaptr}{ln\_diaptr}\forcode{=.true.} 
    20372037(see the \nam{ptr} namelist below) can be computed on-line the poleward heat and salt transports, 
    20382038their advective and diffusive component, and the meriodional stream function . 
    2039 When \np{ln\_subbas}\forcode{=.true.}, transports and stream function are computed for the Atlantic, Indian, 
     2039When \np{ln_subbas}{ln\_subbas}\forcode{=.true.}, transports and stream function are computed for the Atlantic, Indian, 
    20402040Pacific and Indo-Pacific Oceans (defined north of 30\deg{S}) as well as for the World Ocean. 
    20412041The sub-basin decomposition requires an input file (\ifile{subbasins}) which contains three 2D mask arrays, 
     
    21092109Values greater than 1 indicate that information is propagated across more than one grid cell in a single time step. 
    21102110 
    2111 The variables can be activated by setting the \np{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} namelist. 
     2111The variables can be activated by setting the \np{nn_diacfl}{nn\_diacfl} namelist parameter to 1 in the \nam{ctl} namelist. 
    21122112The diagnostics will be written out to an ascii file named cfl\_diagnostics.ascii. 
    21132113In this file the maximum value of $C_u$, $C_v$, and $C_w$ are printed at each timestep along with the coordinates of 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DIU.tex

    r11567 r11577  
    4646This namelist contains only two variables: 
    4747\begin{description} 
    48 \item[\np{ln\_diurnal}] 
     48\item[\np{ln_diurnal}{ln\_diurnal}] 
    4949  A logical switch for turning on/off both the cool skin and warm layer. 
    50 \item[\np{ln\_diurnal\_only}] 
     50\item[\np{ln_diurnal_only}{ln\_diurnal\_only}] 
    5151  A logical switch which if \forcode{.true.} will run the diurnal model without the other dynamical parts of \NEMO. 
    52   \np{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln\_diurnal} is \forcode{.false.}. 
     52  \np{ln_diurnal_only}{ln\_diurnal\_only} must be \forcode{.false.} if \np{ln_diurnal}{ln\_diurnal} is \forcode{.false.}. 
    5353\end{description} 
    5454 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DOM.tex

    r11571 r11577  
    335335 
    336336Two typical methods are available to specify the spatial domain configuration; 
    337 they can be selected using parameter \np{ln\_read\_cfg} parameter in namelist \nam{cfg}. 
    338  
    339 If \np{ln\_read\_cfg} is set to \forcode{.true.}, 
     337they can be selected using parameter \np{ln_read_cfg}{ln\_read\_cfg} parameter in namelist \nam{cfg}. 
     338 
     339If \np{ln_read_cfg}{ln\_read\_cfg} is set to \forcode{.true.}, 
    340340the domain-specific parameters and fields are read from a netCDF input file, 
    341 whose name (without its .nc suffix) can be specified as the value of the \np{cn\_domcfg} parameter in namelist \nam{cfg}. 
    342  
    343 If \np{ln\_read\_cfg} is set to \forcode{.false.}, 
     341whose name (without its .nc suffix) can be specified as the value of the \np{cn_domcfg}{cn\_domcfg} parameter in namelist \nam{cfg}. 
     342 
     343If \np{ln_read_cfg}{ln\_read\_cfg} is set to \forcode{.false.}, 
    344344the domain-specific parameters and fields can be provided (\eg\ analytically computed) by 
    345345subroutines \mdl{usrdef\_hgr} and \mdl{usrdef\_zgr}. 
     
    359359 
    360360The next subsections summarise the parameter and fields related to the configuration of the whole model domain. 
    361 These represent the minimum information that must be provided either via the \np{cn\_domcfg} file or set by code 
     361These represent the minimum information that must be provided either via the \np{cn_domcfg}{cn\_domcfg} file or set by code 
    362362inserted into user-supplied versions of the \texttt{usrdef\_*} subroutines. 
    363363The requirements are presented in three sections: 
     
    377377see \autoref{sec:LBC_mpp}). 
    378378 
    379 The name of the configuration is set through parameter \np{cn\_cfg}, 
    380 and the nominal resolution through parameter \np{nn\_cfg} 
     379The name of the configuration is set through parameter \np{cn_cfg}{cn\_cfg}, 
     380and the nominal resolution through parameter \np{nn_cfg}{nn\_cfg} 
    381381(unless in the input file both of variables \texttt{ORCA} and \texttt{ORCA\_index} are present, 
    382 in which case \np{cn\_cfg} and \np{nn\_cfg} are set from these values accordingly). 
     382in which case \np{cn_cfg}{cn\_cfg} and \np{nn_cfg}{nn\_cfg} are set from these values accordingly). 
    383383 
    384384The global lateral boundary condition type is selected from 8 options using parameter \jp{jperio}. 
     
    436436the unaltered surface areas at $u$ and $v$ grid points (\texttt{e1e2u} and \texttt{e1e2v}, respectively) must be read or 
    437437pre-computed in \mdl{usrdef\_hgr}. 
    438 If these arrays are present in the \np{cn\_domcfg} file they are read and the internal computation is suppressed. 
     438If these arrays are present in the \np{cn_domcfg}{cn\_domcfg} file they are read and the internal computation is suppressed. 
    439439Versions of \mdl{usrdef\_hgr} which set their own values of \texttt{e1e2u} and \texttt{e1e2v} should set 
    440440the surface-area computation flag: 
     
    487487    (d) hybrid $s-z$ coordinate, 
    488488    (e) hybrid $s-z$ coordinate with partial step, and 
    489     (f) same as (e) but in the non-linear free surface (\protect\np{ln\_linssh}\forcode{=.false.}). 
     489    (f) same as (e) but in the non-linear free surface (\protect\np{ln_linssh}{ln\_linssh}\forcode{=.false.}). 
    490490    Note that the non-linear free surface can be used with any of the 5 coordinates (a) to (e).} 
    491491  \label{fig:DOM_z_zps_s_sps} 
     
    502502a single configuration file can support both options. 
    503503 
    504 By default a non-linear free surface is used (\np{ln\_linssh} set to \forcode{=.false.} in \nam{dom}): 
     504By default a non-linear free surface is used (\np{ln_linssh}{ln\_linssh} set to \forcode{=.false.} in \nam{dom}): 
    505505the coordinate follow the time-variation of the free surface so that the transformation is time dependent: 
    506506$z(i,j,k,t)$ (\eg\ \autoref{fig:DOM_z_zps_s_sps}f). 
    507 When a linear free surface is assumed (\np{ln\_linssh} set to \forcode{=.true.} in \nam{dom}), 
     507When a linear free surface is assumed (\np{ln_linssh}{ln\_linssh} set to \forcode{=.true.} in \nam{dom}), 
    508508the vertical coordinates are fixed in time, but the seawater can move up and down across the $z_0$ surface 
    509509(in other words, the top of the ocean in not a rigid lid). 
    510510 
    511511Note that settings: 
    512 \np{ln\_zco}, \np{ln\_zps}, \np{ln\_sco} and \np{ln\_isfcav} mentioned in the following sections 
     512\np{ln_zco}{ln\_zco}, \np{ln_zps}{ln\_zps}, \np{ln_sco}{ln\_sco} and \np{ln_isfcav}{ln\_isfcav} mentioned in the following sections 
    513513appear to be namelist options but they are no longer truly namelist options for \NEMO. 
    514514Their value is written to and read from the domain configuration file and 
     
    517517serve both to provide a record of the choices made whilst building the configuration and 
    518518to trigger appropriate code blocks within \NEMO. 
    519 These values should not be altered in the \np{cn\_domcfg} file. 
     519These values should not be altered in the \np{cn_domcfg}{cn\_domcfg} file. 
    520520 
    521521\medskip 
    522 The decision on these choices must be made when the \np{cn\_domcfg} file is constructed. 
     522The decision on these choices must be made when the \np{cn_domcfg}{cn\_domcfg} file is constructed. 
    523523Three main choices are offered (\autoref{fig:DOM_z_zps_s_sps}a-c): 
    524524 
    525525\begin{itemize} 
    526 \item $z$-coordinate with full step bathymetry (\np{ln\_zco}\forcode{=.true.}), 
    527 \item $z$-coordinate with partial step ($zps$) bathymetry (\np{ln\_zps}\forcode{=.true.}), 
    528 \item Generalized, $s$-coordinate (\np{ln\_sco}\forcode{=.true.}). 
     526\item $z$-coordinate with full step bathymetry (\np{ln_zco}{ln\_zco}\forcode{=.true.}), 
     527\item $z$-coordinate with partial step ($zps$) bathymetry (\np{ln_zps}{ln\_zps}\forcode{=.true.}), 
     528\item Generalized, $s$-coordinate (\np{ln_sco}{ln\_sco}\forcode{=.true.}). 
    529529\end{itemize} 
    530530 
     
    534534A further choice related to vertical coordinate concerns 
    535535the presence (or not) of ocean cavities beneath ice shelves within the model domain. 
    536 A setting of \np{ln\_isfcav} as \forcode{.true.} indicates that the domain contains ocean cavities, 
     536A setting of \np{ln_isfcav}{ln\_isfcav} as \forcode{.true.} indicates that the domain contains ocean cavities, 
    537537otherwise the top, wet layer of the ocean will always be at the ocean surface. 
    538538This option is currently only available for $z$- or $zps$-coordinates. 
     
    544544They are updated at each model time step. 
    545545The initial fixed reference coordinate system is held in variable names with a $\_0$ suffix. 
    546 When the linear free surface option is used (\np{ln\_linssh}\forcode{=.true.}), 
     546When the linear free surface option is used (\np{ln_linssh}{ln\_linssh}\forcode{=.true.}), 
    547547\textit{before}, \textit{now} and \textit{after} arrays are initially set to 
    548548their reference counterpart and remain fixed. 
     
    652652(grid-point position, scale factors) 
    653653can be saved in a file if 
    654 namelist parameter \np{ln\_write\_cfg} (namelist \nam{cfg}) is set to \forcode{.true.}; 
    655 the output filename is set through parameter \np{cn\_domcfg\_out}. 
     654namelist parameter \np{ln_write_cfg}{ln\_write\_cfg} (namelist \nam{cfg}) is set to \forcode{.true.}; 
     655the output filename is set through parameter \np{cn_domcfg_out}{cn\_domcfg\_out}. 
    656656This is only really useful if 
    657657the fields are computed in subroutines \mdl{usrdef\_hgr} or \mdl{usrdef\_zgr} and 
     
    661661(grid-point position, scale factors, depths and masks) 
    662662can be saved in a file called \texttt{mesh\_mask} if 
    663 namelist parameter \np{ln\_meshmask} (namelist \nam{dom}) is set to \forcode{.true.}. 
     663namelist parameter \np{ln_meshmask}{ln\_meshmask} (namelist \nam{dom}) is set to \forcode{.true.}. 
    664664This file contains additional fields that can be useful for post-processing applications. 
    665665 
     
    679679Basic initial state options are defined in \nam{tsd}. 
    680680By default, the ocean starts from rest (the velocity field is set to zero) and 
    681 the initialization of temperature and salinity fields is controlled through the \np{ln\_tsd\_init} namelist parameter. 
     681the initialization of temperature and salinity fields is controlled through the \np{ln_tsd_init}{ln\_tsd\_init} namelist parameter. 
    682682 
    683683\begin{description} 
    684 \item[\np{ln\_tsd\_init}\forcode{= .true.}] 
     684\item[\np{ln_tsd_init}{ln\_tsd\_init}\forcode{= .true.}] 
    685685  Use T and S input files that can be given on the model grid itself or on their native input data grids. 
    686686  In the latter case, the data will be interpolated on-the-fly both in the horizontal and the vertical to the model grid 
    687687  (see \autoref{subsec:SBC_iof}). 
    688   The information relating to the input files are specified in the \np{sn\_tem} and \np{sn\_sal} structures. 
     688  The information relating to the input files are specified in the \np{sn_tem}{sn\_tem} and \np{sn_sal}{sn\_sal} structures. 
    689689  The computation is done in the \mdl{dtatsd} module. 
    690 \item[\np{ln\_tsd\_init}\forcode{= .false.}] 
     690\item[\np{ln_tsd_init}{ln\_tsd\_init}\forcode{= .false.}] 
    691691  Initial values for T and S are set via a user supplied \rou{usr\_def\_istate} routine contained in \mdl{userdef\_istate}. 
    692692  The default version sets horizontally uniform T and profiles as used in the GYRE configuration 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex

    r11571 r11577  
    176176applications of the \NEMO\ ocean model. 
    177177The flux form option (see next section) has been present since version $2$. 
    178 Options are defined through the \nam{dyn\_adv} namelist variables Coriolis and 
     178Options are defined through the \nam{dyn_adv}{dyn\_adv} namelist variables Coriolis and 
    179179momentum advection terms are evaluated using a leapfrog scheme, 
    180180\ie\ the velocity appearing in these expressions is centred in time (\textit{now} velocity). 
     
    196196%------------------------------------------------------------------------------------------------------------- 
    197197 
    198 Options are defined through the \nam{dyn\_vor} namelist variables. 
     198Options are defined through the \nam{dyn_vor}{dyn\_vor} namelist variables. 
    199199Four discretisations of the vorticity term (\texttt{ln\_dynvor\_xxx}\forcode{=.true.}) are available: 
    200200conserving potential enstrophy of horizontally non-divergent flow (ENS scheme); 
     
    205205(EEN scheme) (see \autoref{subsec:INVARIANTS_vorEEN}). 
    206206In the case of ENS, ENE or MIX schemes the land sea mask may be slightly modified to ensure the consistency of 
    207 vorticity term with analytical equations (\np{ln\_dynvor\_con}\forcode{=.true.}). 
     207vorticity term with analytical equations (\np{ln_dynvor_con}{ln\_dynvor\_con}\forcode{=.true.}). 
    208208The vorticity terms are all computed in dedicated routines that can be found in the \mdl{dynvor} module. 
    209209 
     
    211211%                 enstrophy conserving scheme 
    212212%------------------------------------------------------------- 
    213 \subsubsection[Enstrophy conserving scheme (\forcode{ln_dynvor_ens})]{Enstrophy conserving scheme (\protect\np{ln\_dynvor\_ens})} 
     213\subsubsection[Enstrophy conserving scheme (\forcode{ln_dynvor_ens})]{Enstrophy conserving scheme (\protect\np{ln_dynvor_ens}{ln\_dynvor\_ens})} 
    214214\label{subsec:DYN_vor_ens} 
    215215 
     
    234234%                 energy conserving scheme 
    235235%------------------------------------------------------------- 
    236 \subsubsection[Energy conserving scheme (\forcode{ln_dynvor_ene})]{Energy conserving scheme (\protect\np{ln\_dynvor\_ene})} 
     236\subsubsection[Energy conserving scheme (\forcode{ln_dynvor_ene})]{Energy conserving scheme (\protect\np{ln_dynvor_ene}{ln\_dynvor\_ene})} 
    237237\label{subsec:DYN_vor_ene} 
    238238 
     
    254254%                 mix energy/enstrophy conserving scheme 
    255255%------------------------------------------------------------- 
    256 \subsubsection[Mixed energy/enstrophy conserving scheme (\forcode{ln_dynvor_mix})]{Mixed energy/enstrophy conserving scheme (\protect\np{ln\_dynvor\_mix})} 
     256\subsubsection[Mixed energy/enstrophy conserving scheme (\forcode{ln_dynvor_mix})]{Mixed energy/enstrophy conserving scheme (\protect\np{ln_dynvor_mix}{ln\_dynvor\_mix})} 
    257257\label{subsec:DYN_vor_mix} 
    258258 
     
    279279%                 energy and enstrophy conserving scheme 
    280280%------------------------------------------------------------- 
    281 \subsubsection[Energy and enstrophy conserving scheme (\forcode{ln_dynvor_een})]{Energy and enstrophy conserving scheme (\protect\np{ln\_dynvor\_een})} 
     281\subsubsection[Energy and enstrophy conserving scheme (\forcode{ln_dynvor_een})]{Energy and enstrophy conserving scheme (\protect\np{ln_dynvor_een}{ln\_dynvor\_een})} 
    282282\label{subsec:DYN_vor_een} 
    283283 
     
    327327A key point in \autoref{eq:DYN_een_e3f} is how the averaging in the \textbf{i}- and \textbf{j}- directions is made. 
    328328It uses the sum of masked t-point vertical scale factor divided either by the sum of the four t-point masks 
    329 (\np{nn\_een\_e3f}\forcode{=1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{=.true.}). 
     329(\np{nn_een_e3f}{nn\_een\_e3f}\forcode{=1}), or just by $4$ (\np{nn\_een\_e3f}\forcode{=.true.}). 
    330330The latter case preserves the continuity of $e_{3f}$ when one or more of the neighbouring $e_{3t}$ tends to zero and 
    331331extends by continuity the value of $e_{3f}$ into the land areas. 
     
    407407  \right. 
    408408\] 
    409 When \np{ln\_dynzad\_zts}\forcode{=.true.}, 
     409When \np{ln_dynzad_zts}{ln\_dynzad\_zts}\forcode{=.true.}, 
    410410a split-explicit time stepping with 5 sub-timesteps is used on the vertical advection term. 
    411411This option can be useful when the value of the timestep is limited by vertical advection \citep{lemarie.debreu.ea_OM15}. 
    412412Note that in this case, 
    413413a similar split-explicit time stepping should be used on vertical advection of tracer to ensure a better stability, 
    414 an option which is only available with a TVD scheme (see \np{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 
     414an option which is only available with a TVD scheme (see \np{ln_traadv_tvd_zts}{ln\_traadv\_tvd\_zts} in \autoref{subsec:TRA_adv_tvd}). 
    415415 
    416416 
     
    424424%------------------------------------------------------------------------------------------------------------- 
    425425 
    426 Options are defined through the \nam{dyn\_adv} namelist variables. 
     426Options are defined through the \nam{dyn_adv}{dyn\_adv} namelist variables. 
    427427In the flux form (as in the vector invariant form), 
    428428the Coriolis and momentum advection terms are evaluated using a leapfrog scheme, 
     
    481481or a $3^{rd}$ order upstream biased scheme, UBS. 
    482482The latter is described in \citet{shchepetkin.mcwilliams_OM05}. 
    483 The schemes are selected using the namelist logicals \np{ln\_dynadv\_cen2} and \np{ln\_dynadv\_ubs}. 
     483The schemes are selected using the namelist logicals \np{ln_dynadv_cen2}{ln\_dynadv\_cen2} and \np{ln_dynadv_ubs}{ln\_dynadv\_ubs}. 
    484484In flux form, the schemes differ by the choice of a space and time interpolation to define the value of 
    485485$u$ and $v$ at the centre of each face of $u$- and $v$-cells, \ie\ at the $T$-, $f$-, 
     
    489489%                 2nd order centred scheme 
    490490%------------------------------------------------------------- 
    491 \subsubsection[CEN2: $2^{nd}$ order centred scheme (\forcode{ln_dynadv_cen2})]{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln\_dynadv\_cen2})} 
     491\subsubsection[CEN2: $2^{nd}$ order centred scheme (\forcode{ln_dynadv_cen2})]{CEN2: $2^{nd}$ order centred scheme (\protect\np{ln_dynadv_cen2}{ln\_dynadv\_cen2})} 
    492492\label{subsec:DYN_adv_cen2} 
    493493 
     
    512512%                 UBS scheme 
    513513%------------------------------------------------------------- 
    514 \subsubsection[UBS: Upstream Biased Scheme (\forcode{ln_dynadv_ubs})]{UBS: Upstream Biased Scheme (\protect\np{ln\_dynadv\_ubs})} 
     514\subsubsection[UBS: Upstream Biased Scheme (\forcode{ln_dynadv_ubs})]{UBS: Upstream Biased Scheme (\protect\np{ln_dynadv_ubs}{ln\_dynadv\_ubs})} 
    515515\label{subsec:DYN_adv_ubs} 
    516516 
     
    534534But the amplitudes of the false extrema are significantly reduced over those in the centred second order method. 
    535535As the scheme already includes a diffusion component, it can be used without explicit lateral diffusion on momentum 
    536 (\ie\ \np{ln\_dynldf\_lap}\forcode{=}\np{ln\_dynldf\_bilap}\forcode{=.false.}), 
     536(\ie\ \np{ln_dynldf_lap}{ln\_dynldf\_lap}\forcode{=}\np{ln_dynldf_bilap}{ln\_dynldf\_bilap}\forcode{=.false.}), 
    537537and it is recommended to do so. 
    538538 
     
    576576%------------------------------------------------------------------------------------------------------------- 
    577577 
    578 Options are defined through the \nam{dyn\_hpg} namelist variables. 
     578Options are defined through the \nam{dyn_hpg}{dyn\_hpg} namelist variables. 
    579579The key distinction between the different algorithms used for 
    580580the hydrostatic pressure gradient is the vertical coordinate used, 
     
    591591%           z-coordinate with full step 
    592592%-------------------------------------------------------------------------------------------------------------- 
    593 \subsection[Full step $Z$-coordinate (\forcode{ln_dynhpg_zco})]{Full step $Z$-coordinate (\protect\np{ln\_dynhpg\_zco})} 
     593\subsection[Full step $Z$-coordinate (\forcode{ln_dynhpg_zco})]{Full step $Z$-coordinate (\protect\np{ln_dynhpg_zco}{ln\_dynhpg\_zco})} 
    594594\label{subsec:DYN_hpg_zco} 
    595595 
     
    636636%           z-coordinate with partial step 
    637637%-------------------------------------------------------------------------------------------------------------- 
    638 \subsection[Partial step $Z$-coordinate (\forcode{ln_dynhpg_zps})]{Partial step $Z$-coordinate (\protect\np{ln\_dynhpg\_zps})} 
     638\subsection[Partial step $Z$-coordinate (\forcode{ln_dynhpg_zps})]{Partial step $Z$-coordinate (\protect\np{ln_dynhpg_zps}{ln\_dynhpg\_zps})} 
    639639\label{subsec:DYN_hpg_zps} 
    640640 
     
    665665density Jacobian with cubic polynomial method is currently disabled whilst known bugs are under investigation. 
    666666 
    667 $\bullet$ Traditional coding (see for example \citet{madec.delecluse.ea_JPO96}: (\np{ln\_dynhpg\_sco}\forcode{=.true.}) 
     667$\bullet$ Traditional coding (see for example \citet{madec.delecluse.ea_JPO96}: (\np{ln_dynhpg_sco}{ln\_dynhpg\_sco}\forcode{=.true.}) 
    668668\begin{equation} 
    669669  \label{eq:DYN_hpg_sco} 
     
    683683($e_{3w}$). 
    684684 
    685 $\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln\_dynhpg\_isf}\forcode{=.true.}). 
    686 This scheme need the activation of ice shelf cavities (\np{ln\_isfcav}\forcode{=.true.}). 
    687  
    688 $\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln\_dynhpg\_prj}\forcode{=.true.}) 
     685$\bullet$ Traditional coding with adaptation for ice shelf cavities (\np{ln_dynhpg_isf}{ln\_dynhpg\_isf}\forcode{=.true.}). 
     686This scheme need the activation of ice shelf cavities (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.}). 
     687 
     688$\bullet$ Pressure Jacobian scheme (prj) (a research paper in preparation) (\np{ln_dynhpg_prj}{ln\_dynhpg\_prj}\forcode{=.true.}) 
    689689 
    690690$\bullet$ Density Jacobian with cubic polynomial scheme (DJC) \citep{shchepetkin.mcwilliams_OM05} 
    691 (\np{ln\_dynhpg\_djc}\forcode{=.true.}) (currently disabled; under development) 
     691(\np{ln_dynhpg_djc}{ln\_dynhpg\_djc}\forcode{=.true.}) (currently disabled; under development) 
    692692 
    693693Note that expression \autoref{eq:DYN_hpg_sco} is commonly used when the variable volume formulation is activated 
    694694(\texttt{vvl?}) because in that case, even with a flat bottom, 
    695695the coordinate surfaces are not horizontal but follow the free surface \citep{levier.treguier.ea_rpt07}. 
    696 The pressure jacobian scheme (\np{ln\_dynhpg\_prj}\forcode{=.true.}) is available as 
    697 an improved option to \np{ln\_dynhpg\_sco}\forcode{=.true.} when \texttt{vvl?} is active. 
     696The pressure jacobian scheme (\np{ln_dynhpg_prj}{ln\_dynhpg\_prj}\forcode{=.true.}) is available as 
     697an improved option to \np{ln_dynhpg_sco}{ln\_dynhpg\_sco}\forcode{=.true.} when \texttt{vvl?} is active. 
    698698The pressure Jacobian scheme uses a constrained cubic spline to 
    699699reconstruct the density profile across the water column. 
     
    707707 
    708708Beneath an ice shelf, the total pressure gradient is the sum of the pressure gradient due to the ice shelf load and 
    709 the pressure gradient due to the ocean load (\np{ln\_dynhpg\_isf}\forcode{=.true.}).\\ 
     709the pressure gradient due to the ocean load (\np{ln_dynhpg_isf}{ln\_dynhpg\_isf}\forcode{=.true.}).\\ 
    710710 
    711711The main hypothesis to compute the ice shelf load is that the ice shelf is in an isostatic equilibrium. 
     
    722722%           Time-scheme 
    723723%-------------------------------------------------------------------------------------------------------------- 
    724 \subsection[Time-scheme (\forcode{ln_dynhpg_imp})]{Time-scheme (\protect\np{ln\_dynhpg\_imp})} 
     724\subsection[Time-scheme (\forcode{ln_dynhpg_imp})]{Time-scheme (\protect\np{ln_dynhpg_imp}{ln\_dynhpg\_imp})} 
    725725\label{subsec:DYN_hpg_imp} 
    726726 
     
    738738rather than at the central time level $t$ only, as in the standard leapfrog scheme. 
    739739 
    740 $\bullet$ leapfrog scheme (\np{ln\_dynhpg\_imp}\forcode{=.true.}): 
     740$\bullet$ leapfrog scheme (\np{ln_dynhpg_imp}{ln\_dynhpg\_imp}\forcode{=.true.}): 
    741741 
    742742\begin{equation} 
     
    746746\end{equation} 
    747747 
    748 $\bullet$ semi-implicit scheme (\np{ln\_dynhpg\_imp}\forcode{=.true.}): 
     748$\bullet$ semi-implicit scheme (\np{ln_dynhpg_imp}{ln\_dynhpg\_imp}\forcode{=.true.}): 
    749749\begin{equation} 
    750750  \label{eq:DYN_hpg_imp} 
     
    764764such as the stability limits associated with advection or diffusion. 
    765765 
    766 In practice, the semi-implicit scheme is used when \np{ln\_dynhpg\_imp}\forcode{=.true.}. 
     766In practice, the semi-implicit scheme is used when \np{ln_dynhpg_imp}{ln\_dynhpg\_imp}\forcode{=.true.}. 
    767767In this case, we choose to apply the time filter to temperature and salinity used in the equation of state, 
    768768instead of applying it to the hydrostatic pressure or to the density, 
     
    778778Note that in the semi-implicit case, it is necessary to save the filtered density, 
    779779an extra three-dimensional field, in the restart file to restart the model with exact reproducibility. 
    780 This option is controlled by  \np{nn\_dynhpg\_rst}, a namelist parameter. 
     780This option is controlled by  \np{nn_dynhpg_rst}{nn\_dynhpg\_rst}, a namelist parameter. 
    781781 
    782782% ================================================================ 
     
    794794%------------------------------------------------------------------------------------------------------------ 
    795795 
    796 Options are defined through the \nam{dyn\_spg} namelist variables. 
     796Options are defined through the \nam{dyn_spg}{dyn\_spg} namelist variables. 
    797797The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_hor_pg}). 
    798798The main distinction is between the fixed volume case (linear free surface) and 
     
    825825% Explicit free surface formulation 
    826826%-------------------------------------------------------------------------------------------------------------- 
    827 \subsection[Explicit free surface (\forcode{ln_dynspg_exp})]{Explicit free surface (\protect\np{ln\_dynspg\_exp})} 
     827\subsection[Explicit free surface (\forcode{ln_dynspg_exp})]{Explicit free surface (\protect\np{ln_dynspg_exp}{ln\_dynspg\_exp})} 
    828828\label{subsec:DYN_spg_exp} 
    829829 
    830 In the explicit free surface formulation (\np{ln\_dynspg\_exp} set to true), 
     830In the explicit free surface formulation (\np{ln_dynspg_exp}{ln\_dynspg\_exp} set to true), 
    831831the model time step is chosen to be small enough to resolve the external gravity waves 
    832832(typically a few tens of seconds). 
     
    851851% Split-explict free surface formulation 
    852852%-------------------------------------------------------------------------------------------------------------- 
    853 \subsection[Split-explicit free surface (\forcode{ln_dynspg_ts})]{Split-explicit free surface (\protect\np{ln\_dynspg\_ts})} 
     853\subsection[Split-explicit free surface (\forcode{ln_dynspg_ts})]{Split-explicit free surface (\protect\np{ln_dynspg_ts}{ln\_dynspg\_ts})} 
    854854\label{subsec:DYN_spg_ts} 
    855855%------------------------------------------namsplit----------------------------------------------------------- 
     
    858858%------------------------------------------------------------------------------------------------------------- 
    859859 
    860 The split-explicit free surface formulation used in \NEMO\ (\np{ln\_dynspg\_ts} set to true), 
     860The split-explicit free surface formulation used in \NEMO\ (\np{ln_dynspg_ts}{ln\_dynspg\_ts} set to true), 
    861861also called the time-splitting formulation, follows the one proposed by \citet{shchepetkin.mcwilliams_OM05}. 
    862862The general idea is to solve the free surface equation and the associated barotropic velocity equations with 
     
    864864(\autoref{fig:DYN_spg_ts}). 
    865865The size of the small time step, $\rdt_e$ (the external mode or barotropic time step) is provided through 
    866 the \np{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$. 
    867 This parameter can be optionally defined automatically (\np{ln\_bt\_nn\_auto}\forcode{=.true.}) considering that 
     866the \np{nn_baro}{nn\_baro} namelist parameter as: $\rdt_e = \rdt / nn\_baro$. 
     867This parameter can be optionally defined automatically (\np{ln_bt_nn_auto}{ln\_bt\_nn\_auto}\forcode{=.true.}) considering that 
    868868the stability of the barotropic system is essentially controled by external waves propagation. 
    869869Maximum Courant number is in that case time independent, and easily computed online from the input bathymetry. 
    870 Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn\_bt\_cmax}. 
     870Therefore, $\rdt_e$ is adjusted so that the Maximum allowed Courant number is smaller than \np{rn_bt_cmax}{rn\_bt\_cmax}. 
    871871 
    872872%%% 
     
    903903    Time increases to the right. 
    904904    In this particular exemple, 
    905     a boxcar averaging window over \np{nn\_baro} barotropic time steps is used 
    906     (\np{nn\_bt\_flt}\forcode{=1}) and \np{nn\_baro}\forcode{=5}. 
     905    a boxcar averaging window over \np{nn_baro}{nn\_baro} barotropic time steps is used 
     906    (\np{nn\_bt\_flt}\forcode{=1}) and \np{nn_baro}{nn\_baro}\forcode{=5}. 
    907907    Internal mode time steps (which are also the model time steps) are denoted by 
    908908    $t-\rdt$, $t$ and $t+\rdt$. 
     
    913913    the latter are used to obtain time averaged transports to advect tracers. 
    914914    a) Forward time integration: 
    915     \protect\np{ln\_bt\_fw}\forcode{=.true.},  \protect\np{ln\_bt\_av}\forcode{=.true.}. 
     915    \protect\np{ln_bt_fw}{ln\_bt\_fw}\forcode{=.true.},  \protect\np{ln_bt_av}{ln\_bt\_av}\forcode{=.true.}. 
    916916    b) Centred time integration: 
    917     \protect\np{ln\_bt\_fw}\forcode{=.false.}, \protect\np{ln\_bt\_av}\forcode{=.true.}. 
     917    \protect\np{ln_bt_fw}{ln\_bt\_fw}\forcode{=.false.}, \protect\np{ln_bt_av}{ln\_bt\_av}\forcode{=.true.}. 
    918918    c) Forward time integration with no time filtering (POM-like scheme): 
    919     \protect\np{ln\_bt\_fw}\forcode{=.true.},  \protect\np{ln\_bt\_av}\forcode{=.false.}.} 
     919    \protect\np{ln_bt_fw}{ln\_bt\_fw}\forcode{=.true.},  \protect\np{ln_bt_av}{ln\_bt\_av}\forcode{=.false.}.} 
    920920  \label{fig:DYN_spg_ts} 
    921921\end{figure} 
    922922%>   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   >   > 
    923923 
    924 In the default case (\np{ln\_bt\_fw}\forcode{=.true.}), 
     924In the default case (\np{ln_bt_fw}{ln\_bt\_fw}\forcode{=.true.}), 
    925925the external mode is integrated between \textit{now} and \textit{after} baroclinic time-steps 
    926926(\autoref{fig:DYN_spg_ts}a). 
    927927To avoid aliasing of fast barotropic motions into three dimensional equations, 
    928 time filtering is eventually applied on barotropic quantities (\np{ln\_bt\_av}\forcode{=.true.}). 
     928time filtering is eventually applied on barotropic quantities (\np{ln_bt_av}{ln\_bt\_av}\forcode{=.true.}). 
    929929In that case, the integration is extended slightly beyond \textit{after} time step to 
    930930provide time filtered quantities. 
     
    933933asselin filtering is not applied to barotropic quantities.\\ 
    934934Alternatively, one can choose to integrate barotropic equations starting from \textit{before} time step 
    935 (\np{ln\_bt\_fw}\forcode{=.false.}). 
    936 Although more computationaly expensive ( \np{nn\_baro} additional iterations are indeed necessary), 
     935(\np{ln_bt_fw}{ln\_bt\_fw}\forcode{=.false.}). 
     936Although more computationaly expensive ( \np{nn_baro}{nn\_baro} additional iterations are indeed necessary), 
    937937the baroclinic to barotropic forcing term given at \textit{now} time step become centred in 
    938938the middle of the integration window. 
     
    958958 
    959959One can eventually choose to feedback instantaneous values by not using any time filter 
    960 (\np{ln\_bt\_av}\forcode{=.false.}). 
     960(\np{ln_bt_av}{ln\_bt\_av}\forcode{=.false.}). 
    961961In that case, external mode equations are continuous in time, 
    962962\ie\ they are not re-initialized when starting a new sub-stepping sequence. 
     
    11351135%------------------------------------------------------------------------------------------------------------- 
    11361136 
    1137 Options are defined through the \nam{dyn\_ldf} namelist variables. 
     1137Options are defined through the \nam{dyn_ldf}{dyn\_ldf} namelist variables. 
    11381138The options available for lateral diffusion are to use either laplacian (rotated or not) or biharmonic operators. 
    11391139The coefficients may be constant or spatially variable; 
     
    11621162 
    11631163% ================================================================ 
    1164 \subsection[Iso-level laplacian (\forcode{ln_dynldf_lap})]{Iso-level laplacian operator (\protect\np{ln\_dynldf\_lap})} 
     1164\subsection[Iso-level laplacian (\forcode{ln_dynldf_lap})]{Iso-level laplacian operator (\protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})} 
    11651165\label{subsec:DYN_ldf_lap} 
    11661166 
     
    11871187%           Rotated laplacian operator 
    11881188%-------------------------------------------------------------------------------------------------------------- 
    1189 \subsection[Rotated laplacian (\forcode{ln_dynldf_iso})]{Rotated laplacian operator (\protect\np{ln\_dynldf\_iso})} 
     1189\subsection[Rotated laplacian (\forcode{ln_dynldf_iso})]{Rotated laplacian operator (\protect\np{ln_dynldf_iso}{ln\_dynldf\_iso})} 
    11901190\label{subsec:DYN_ldf_iso} 
    11911191 
    11921192A rotation of the lateral momentum diffusion operator is needed in several cases: 
    1193 for iso-neutral diffusion in the $z$-coordinate (\np{ln\_dynldf\_iso}\forcode{=.true.}) and 
    1194 for either iso-neutral (\np{ln\_dynldf\_iso}\forcode{=.true.}) or 
    1195 geopotential (\np{ln\_dynldf\_hor}\forcode{=.true.}) diffusion in the $s$-coordinate. 
     1193for iso-neutral diffusion in the $z$-coordinate (\np{ln_dynldf_iso}{ln\_dynldf\_iso}\forcode{=.true.}) and 
     1194for either iso-neutral (\np{ln_dynldf_iso}{ln\_dynldf\_iso}\forcode{=.true.}) or 
     1195geopotential (\np{ln_dynldf_hor}{ln\_dynldf\_hor}\forcode{=.true.}) diffusion in the $s$-coordinate. 
    11961196In the partial step case, coordinates are horizontal except at the deepest level and 
    1197 no rotation is performed when \np{ln\_dynldf\_hor}\forcode{=.true.}. 
     1197no rotation is performed when \np{ln_dynldf_hor}{ln\_dynldf\_hor}\forcode{=.true.}. 
    11981198The diffusion operator is defined simply as the divergence of down gradient momentum fluxes on 
    11991199each momentum component. 
     
    12451245%           Iso-level bilaplacian operator 
    12461246%-------------------------------------------------------------------------------------------------------------- 
    1247 \subsection[Iso-level bilaplacian (\forcode{ln_dynldf_bilap})]{Iso-level bilaplacian operator (\protect\np{ln\_dynldf\_bilap})} 
     1247\subsection[Iso-level bilaplacian (\forcode{ln_dynldf_bilap})]{Iso-level bilaplacian operator (\protect\np{ln_dynldf_bilap}{ln\_dynldf\_bilap})} 
    12481248\label{subsec:DYN_ldf_bilap} 
    12491249 
     
    12691269Two time stepping schemes can be used for the vertical diffusion term: 
    12701270$(a)$ a forward time differencing scheme 
    1271 (\np{ln\_zdfexp}\forcode{=.true.}) using a time splitting technique (\np{nn\_zdfexp} $>$ 1) or 
    1272 $(b)$ a backward (or implicit) time differencing scheme (\np{ln\_zdfexp}\forcode{=.false.}) 
     1271(\np{ln_zdfexp}{ln\_zdfexp}\forcode{=.true.}) using a time splitting technique (\np{nn_zdfexp}{nn\_zdfexp} $>$ 1) or 
     1272$(b)$ a backward (or implicit) time differencing scheme (\np{ln_zdfexp}{ln\_zdfexp}\forcode{=.false.}) 
    12731273(see \autoref{chap:TD}). 
    1274 Note that namelist variables \np{ln\_zdfexp} and \np{nn\_zdfexp} apply to both tracers and dynamics. 
     1274Note that namelist variables \np{ln_zdfexp}{ln\_zdfexp} and \np{nn_zdfexp}{nn\_zdfexp} apply to both tracers and dynamics. 
    12751275 
    12761276The formulation of the vertical subgrid scale physics is the same whatever the vertical coordinate is. 
     
    13201320three other forcings may enter the dynamical equations by affecting the surface pressure gradient. 
    13211321 
    1322 (1) When \np{ln\_apr\_dyn}\forcode{=.true.} (see \autoref{sec:SBC_apr}), 
     1322(1) When \np{ln_apr_dyn}{ln\_apr\_dyn}\forcode{=.true.} (see \autoref{sec:SBC_apr}), 
    13231323the atmospheric pressure is taken into account when computing the surface pressure gradient. 
    13241324 
    1325 (2) When \np{ln\_tide\_pot}\forcode{=.true.} and \np{ln\_tide}\forcode{=.true.} (see \autoref{sec:SBC_tide}), 
     1325(2) When \np{ln_tide_pot}{ln\_tide\_pot}\forcode{=.true.} and \np{ln_tide}{ln\_tide}\forcode{=.true.} (see \autoref{sec:SBC_tide}), 
    13261326the tidal potential is taken into account when computing the surface pressure gradient. 
    13271327 
    1328 (3) When \np{nn\_ice\_embd}\forcode{=2} and LIM or CICE is used 
     1328(3) When \np{nn_ice_embd}{nn\_ice\_embd}\forcode{=2} and LIM or CICE is used 
    13291329(\ie\ when the sea-ice is embedded in the ocean), 
    13301330the snow-ice mass is taken into account when computing the surface pressure gradient. 
     
    13961396 
    13971397The principal idea of the directional limiter is that 
    1398 water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn\_wdmin1}). 
     1398water should not be allowed to flow out of a dry tracer cell (i.e. one whose water depth is less than \np{rn_wdmin1}{rn\_wdmin1}). 
    13991399 
    14001400All the changes associated with this option are made to the barotropic solver for the non-linear 
     
    14061406 
    14071407The flux across each $u$-face of a tracer cell is multiplied by a factor zuwdmask (an array which depends on ji and jj). 
    1408 If the user sets \np{ln\_wd\_dl\_ramp}\forcode{=.false.} then zuwdmask is 1 when the 
    1409 flux is from a cell with water depth greater than \np{rn\_wdmin1} and 0 otherwise. If the user sets 
    1410 \np{ln\_wd\_dl\_ramp}\forcode{=.true.} the flux across the face is ramped down as the water depth decreases 
    1411 from 2 * \np{rn\_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases. 
     1408If the user sets \np{ln_wd_dl_ramp}{ln\_wd\_dl\_ramp}\forcode{=.false.} then zuwdmask is 1 when the 
     1409flux is from a cell with water depth greater than \np{rn_wdmin1}{rn\_wdmin1} and 0 otherwise. If the user sets 
     1410\np{ln_wd_dl_ramp}{ln\_wd\_dl\_ramp}\forcode{=.true.} the flux across the face is ramped down as the water depth decreases 
     1411from 2 * \np{rn_wdmin1}{rn\_wdmin1} to \np{rn\_wdmin1}. The use of this ramp reduced grid-scale noise in idealised test cases. 
    14121412 
    14131413At the point where the flux across a $u$-face is multiplied by zuwdmask , we have chosen 
     
    14251425fields (tracers independent of $x$, $y$ and $z$). Our scheme conserves constant tracers because 
    14261426the velocities used at the tracer cell faces on the baroclinic timesteps are carefully calculated by dynspg\_ts 
    1427 to equal their mean value during the barotropic steps. If the user sets \np{ln\_wd\_dl\_bc}\forcode{=.true.}, the 
     1427to equal their mean value during the barotropic steps. If the user sets \np{ln_wd_dl_bc}{ln\_wd\_dl\_bc}\forcode{=.true.}, the 
    14281428baroclinic velocities are also multiplied by a suitably weighted average of zuwdmask. 
    14291429 
     
    16581658 
    16591659$\bullet$ vector invariant form or linear free surface 
    1660 (\np{ln\_dynhpg\_vec}\forcode{=.true.} ; \texttt{vvl?} not defined): 
     1660(\np{ln_dynhpg_vec}{ln\_dynhpg\_vec}\forcode{=.true.} ; \texttt{vvl?} not defined): 
    16611661\[ 
    16621662  % \label{eq:DYN_nxt_vec} 
     
    16701670 
    16711671$\bullet$ flux form and nonlinear free surface 
    1672 (\np{ln\_dynhpg\_vec}\forcode{=.false.} ; \texttt{vvl?} defined): 
     1672(\np{ln_dynhpg_vec}{ln\_dynhpg\_vec}\forcode{=.false.} ; \texttt{vvl?} defined): 
    16731673\[ 
    16741674  % \label{eq:DYN_nxt_flux} 
     
    16831683where RHS is the right hand side of the momentum equation, 
    16841684the subscript $f$ denotes filtered values and $\gamma$ is the Asselin coefficient. 
    1685 $\gamma$ is initialized as \np{nn\_atfp} (namelist parameter). 
    1686 Its default value is \np{nn\_atfp}\forcode{=10.e-3}. 
     1685$\gamma$ is initialized as \np{nn_atfp}{nn\_atfp} (namelist parameter). 
     1686Its default value is \np{nn_atfp}{nn\_atfp}\forcode{=10.e-3}. 
    16871687In both cases, the modified Asselin filter is not applied since perfect conservation is not an issue for 
    16881688the momentum equations. 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex

    r11571 r11577  
    1717% Boundary Condition at the Coast 
    1818% ================================================================ 
    19 \section[Boundary condition at the coast (\forcode{rn_shlat})]{Boundary condition at the coast (\protect\np{rn\_shlat})} 
     19\section[Boundary condition at the coast (\forcode{rn_shlat})]{Boundary condition at the coast (\protect\np{rn_shlat}{rn\_shlat})} 
    2020\label{sec:LBC_coast} 
    2121%--------------------------------------------namlbc------------------------------------------------------- 
     
    9191and is required in order to compute the vorticity at the coast. 
    9292Four different types of lateral boundary condition are available, 
    93 controlled by the value of the \np{rn\_shlat} namelist parameter 
     93controlled by the value of the \np{rn_shlat}{rn\_shlat} namelist parameter 
    9494(The value of the mask$_{f}$ array along the coastline is set equal to this parameter). 
    9595These are: 
     
    101101  \caption[Lateral boundary conditions]{ 
    102102    Lateral boundary conditions 
    103     (a) free-slip                       (\protect\np{rn\_shlat}\forcode{=0}); 
    104     (b) no-slip                         (\protect\np{rn\_shlat}\forcode{=2}); 
    105     (c) "partial" free-slip (\forcode{0<}\protect\np{rn\_shlat}\forcode{<2}) and 
    106     (d) "strong" no-slip    (\forcode{2<}\protect\np{rn\_shlat}). 
     103    (a) free-slip                       (\protect\np{rn_shlat}{rn\_shlat}\forcode{=0}); 
     104    (b) no-slip                         (\protect\np{rn_shlat}{rn\_shlat}\forcode{=2}); 
     105    (c) "partial" free-slip (\forcode{0<}\protect\np{rn_shlat}{rn\_shlat}\forcode{<2}) and 
     106    (d) "strong" no-slip    (\forcode{2<}\protect\np{rn_shlat}{rn\_shlat}). 
    107107    Implied "ghost" velocity inside land area is display in grey.} 
    108108  \label{fig:LBC_shlat} 
     
    112112\begin{description} 
    113113 
    114 \item[free-slip boundary condition (\np{rn\_shlat}\forcode{=0}):] the tangential velocity at 
     114\item[free-slip boundary condition (\np{rn_shlat}{rn\_shlat}\forcode{=0}):] the tangential velocity at 
    115115  the coastline is equal to the offshore velocity, 
    116116  \ie\ the normal derivative of the tangential velocity is zero at the coast, 
     
    118118  (\autoref{fig:LBC_shlat}-a). 
    119119 
    120 \item[no-slip boundary condition (\np{rn\_shlat}\forcode{=2}):] the tangential velocity vanishes at the coastline. 
     120\item[no-slip boundary condition (\np{rn_shlat}{rn\_shlat}\forcode{=2}):] the tangential velocity vanishes at the coastline. 
    121121  Assuming that the tangential velocity decreases linearly from 
    122122  the closest ocean velocity grid point to the coastline, 
     
    139139  \] 
    140140 
    141 \item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at 
     141\item["partial" free-slip boundary condition (0$<$\np{rn_shlat}{rn\_shlat}$<$2):] the tangential velocity at 
    142142  the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but 
    143143  not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 
    144144  This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. 
    145145 
    146 \item["strong" no-slip boundary condition (2$<$\np{rn\_shlat}):] the viscous boundary layer is assumed to 
     146\item["strong" no-slip boundary condition (2$<$\np{rn_shlat}{rn\_shlat}):] the viscous boundary layer is assumed to 
    147147  be smaller than half the grid size (\autoref{fig:LBC_shlat}-d). 
    148148  The friction is thus larger than in the no-slip case. 
     
    333333 
    334334If the domain decomposition is automatically defined (when \np{jpni} and \np{jpnj} are < 1), the decomposition chosen by the model will minimise the sub-domain size (defined as $max_{all domains}(jpi \times jpj)$) and maximize the number of eliminated land subdomains. This means that no other domain decomposition (a set of \np{jpni} and \np{jpnj} values) will use less processes than $(jpni  \times  jpnj - N_{land})$ and get a smaller subdomain size. 
    335 In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni} and \np{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, jpni \times jpnj)$. For example, run the model on 40 nodes with ln\_list activated and $jpni = 10000$ and $jpnj = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 
     335In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln_list}{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni} and \np{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, jpni \times jpnj)$. For example, run the model on 40 nodes with ln\_list activated and $jpni = 10000$ and $jpnj = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 
    336336 
    337337Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}, \np{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$. 
    338338 
    339 When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{ln\_mskland} must be activated in order avoid Not a Number values in output files. Note that it is better to not eliminate land processors when creating a meshmask file (\ie\ when setting a non-zero value to \np{nn\_msh}). 
     339When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{ln_mskland}{ln\_mskland} must be activated in order avoid Not a Number values in output files. Note that it is better to not eliminate land processors when creating a meshmask file (\ie\ when setting a non-zero value to \np{nn_msh}{nn\_msh}). 
    340340 
    341341%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    378378%----------------------------------------------------------------------------------------------- 
    379379 
    380 Options are defined through the \nam{bdy} and \nam{bdy\_dta} namelist variables. 
     380Options are defined through the \nam{bdy} and \nam{bdy_dta}{bdy\_dta} namelist variables. 
    381381The BDY module is the core implementation of open boundary conditions for regional configurations on 
    382382ocean temperature, salinity, barotropic-baroclinic velocities, ice-snow concentration, thicknesses, temperatures, salinity and melt ponds concentration and thickness. 
     
    393393\label{subsec:LBC_bdy_namelist} 
    394394 
    395 The BDY module is activated by setting \np{ln\_bdy}\forcode{=.true.} . 
     395The BDY module is activated by setting \np{ln_bdy}{ln\_bdy}\forcode{=.true.} . 
    396396It is possible to define more than one boundary ``set'' and apply different boundary conditions to each set. 
    397 The number of boundary sets is defined by \np{nb\_bdy}. 
     397The number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}. 
    398398Each boundary set can be either defined as a series of straight line segments directly in the namelist 
    399 (\np{ln\_coords\_file}\forcode{=.false.}, and a namelist block \nam{bdy\_index} must be included for each set) or read in from a file (\np{ln\_coords\_file}\forcode{=.true.}, and a ``\ifile{coordinates.bdy}'' file must be provided). 
     399(\np{ln_coords_file}{ln\_coords\_file}\forcode{=.false.}, and a namelist block \nam{bdy_index}{bdy\_index} must be included for each set) or read in from a file (\np{ln\_coords\_file}\forcode{=.true.}, and a ``\ifile{coordinates.bdy}'' file must be provided). 
    400400The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 
    401401In the example above, there are two boundary sets, the first of which is defined via a file and 
     
    406406(``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 
    407407for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and for sea-ice (``ice''). 
    408 For each set of variables one has to choose an algorithm and the boundary data (set resp. by \np{cn\_tra} and \np{nn\_tra\_dta} for tracers).\\ 
     408For each set of variables one has to choose an algorithm and the boundary data (set resp. by \np{cn_tra}{cn\_tra} and \np{nn_tra_dta}{nn\_tra\_dta} for tracers).\\ 
    409409 
    410410The choice of algorithm is currently as follows: 
     
    422422 
    423423The boundary data is either set to initial conditions 
    424 (\np{nn\_tra\_dta}\forcode{=0}) or forced with external data from a file (\np{nn\_tra\_dta}\forcode{=1}). 
     424(\np{nn_tra_dta}{nn\_tra\_dta}\forcode{=0}) or forced with external data from a file (\np{nn\_tra\_dta}\forcode{=1}). 
    425425In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 
    426 the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{=.true.} 
     426the bdy code can derived baroclinic and barotropic velocities by setting \np{ln_full_vel}{ln\_full\_vel}\forcode{=.true.} 
    427427For the barotropic solution there is also the option to use tidal harmonic forcing either by 
    428 itself (\np{nn\_dyn2d\_dta}\forcode{=2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{=3}).\\ 
    429 If not set to initial conditions, sea-ice salinity, temperatures and melt ponds data at the boundary can either be read in a file or defined as constant (by \np{rn\_ice\_sal}, \np{rn\_ice\_tem}, \np{rn\_ice\_apnd}, \np{rn\_ice\_hpnd}). Ice age is constant and defined by \np{rn\_ice\_age}. 
    430  
    431 If external boundary data is required then the \nam{bdy\_dta} namelist must be defined. 
    432 One \nam{bdy\_dta} namelist is required for each boundary set, adopting the same order of indexes in which the boundary sets are defined in nambdy. 
    433 In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy\_dta} namelist shown above 
     428itself (\np{nn_dyn2d_dta}{nn\_dyn2d\_dta}\forcode{=2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{=3}).\\ 
     429If not set to initial conditions, sea-ice salinity, temperatures and melt ponds data at the boundary can either be read in a file or defined as constant (by \np{rn_ice_sal}{rn\_ice\_sal}, \np{rn_ice_tem}{rn\_ice\_tem}, \np{rn_ice_apnd}{rn\_ice\_apnd}, \np{rn_ice_hpnd}{rn\_ice\_hpnd}). Ice age is constant and defined by \np{rn_ice_age}{rn\_ice\_age}. 
     430 
     431If external boundary data is required then the \nam{bdy_dta}{bdy\_dta} namelist must be defined. 
     432One \nam{bdy_dta}{bdy\_dta} namelist is required for each boundary set, adopting the same order of indexes in which the boundary sets are defined in nambdy. 
     433In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy_dta}{bdy\_dta} namelist shown above 
    434434and the second one is using data from intial condition (no namelist block needed). 
    435435The boundary data is read in using the fldread module, 
    436 so the \nam{bdy\_dta} namelist is in the format required for fldread. 
     436so the \nam{bdy_dta}{bdy\_dta} namelist is in the format required for fldread. 
    437437For each required variable, the filename, the frequency of the files and 
    438438the frequency of the data in the files are given. 
     
    441441 
    442442There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time. 
    443 If \np{nn\_bdy\_jpk}$<-1$, it is assumed that the lateral boundary data are already on the native grid. 
    444 However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 
     443If \np{nn_bdy_jpk}{nn\_bdy\_jpk}$<-1$, it is assumed that the lateral boundary data are already on the native grid. 
     444However, if \np{nn_bdy_jpk}{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 
    445445a bilinear interpolation onto the native grid will be triggered at runtime. 
    446446For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. 
     
    492492  \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right),       \quad d=1,N 
    493493\] 
    494 The width of the FRS zone is specified in the namelist as \np{nn\_rimwidth}. 
     494The width of the FRS zone is specified in the namelist as \np{nn_rimwidth}{nn\_rimwidth}. 
    495495This is typically set to a value between 8 and 10. 
    496496 
     
    557557\end{equation} 
    558558 
    559 Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
    560 points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 
     559Generally the relaxation time scale at inward propagation points (\np{rn_time_dmp}{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
     560points (\np{rn_time_dmp_out}{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 
    561561See \autoref{subsec:LBC_bdy_relaxation} for detailed on the spatial shape of the scaling.\\ 
    562562The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 
     
    569569\label{subsec:LBC_bdy_relaxation} 
    570570 
    571 In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 
    572 It is control by the namelist parameter \np{ln\_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set. 
    573  
    574 The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 
    575 This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$): 
     571In addition to a specific boundary condition specified as \np{cn_tra}{cn\_tra} and \np{cn_dyn3d}{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 
     572It is control by the namelist parameter \np{ln_tra_dmp}{ln\_tra\_dmp} and \np{ln_dyn3d_dmp}{ln\_dyn3d\_dmp} for each boundary set. 
     573 
     574The relaxation time scale value (\np{rn_time_dmp}{rn\_time\_dmp} and \np{rn_time_dmp_out}{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 
     575This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn_rimwidth}{nn\_rimwidth} cells ($N$): 
    576576 
    577577\[ 
     
    602602\jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
    603603These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 
    604 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn\_rimwidth}\forcode{>1}. 
     604The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn_rimwidth}{nn\_rimwidth}\forcode{>1}. 
    605605 
    606606The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 
     
    617617For example, if an open boundary is defined along an isobath, say at the shelf break, 
    618618then the areas of ocean outside of this boundary will need to be masked out. 
    619 This can be done by reading a mask file defined as \np{cn\_mask\_file} in the nam\_bdy namelist. 
     619This can be done by reading a mask file defined as \np{cn_mask_file}{cn\_mask\_file} in the nam\_bdy namelist. 
    620620Only one mask file is used even if multiple boundary sets are defined. 
    621621 
     
    672672 
    673673There is an option to force the total volume in the regional model to be constant. 
    674 This is controlled  by the \np{ln\_vol} parameter in the namelist. 
    675 A value of \np{ln\_vol}\forcode{=.false.} indicates that this option is not used. 
    676 Two options to control the volume are available (\np{nn\_volctl}). 
    677 If \np{nn\_volctl}\forcode{=0} then a correction is applied to the normal barotropic velocities around the boundary at 
     674This is controlled  by the \np{ln_vol}{ln\_vol} parameter in the namelist. 
     675A value of \np{ln_vol}{ln\_vol}\forcode{=.false.} indicates that this option is not used. 
     676Two options to control the volume are available (\np{nn_volctl}{nn\_volctl}). 
     677If \np{nn_volctl}{nn\_volctl}\forcode{=0} then a correction is applied to the normal barotropic velocities around the boundary at 
    678678each timestep to ensure that the integrated volume flow through the boundary is zero. 
    679 If \np{nn\_volctl}\forcode{=1} then the calculation of the volume change on 
     679If \np{nn_volctl}{nn\_volctl}\forcode{=1} then the calculation of the volume change on 
    680680the timestep includes the change due to the freshwater flux across the surface and 
    681681the correction velocity corrects for this as well. 
     
    698698 
    699699Tidal forcing at open boundaries requires the activation of surface 
    700 tides (i.e., in \nam{\_tide}, \np{ln\_tide} needs to be set to 
     700tides (i.e., in \nam{_tide}{\_tide}, \np{ln_tide}{ln\_tide} needs to be set to 
    701701\forcode{.true.} and the required constituents need to be activated by 
    702702including their names in the \np{clname} array; see 
     
    704704the complex harmonic amplitudes of elevation (SSH) and barotropic 
    705705velocity (u,v) at open boundaries are defined through the 
    706 \nam{bdy\_tide} namelist parameters.\\ 
     706\nam{bdy_tide}{bdy\_tide} namelist parameters.\\ 
    707707 
    708708The tidal harmonic data at open boundaries can be specified in two 
    709709different ways, either on a two-dimensional grid covering the entire 
    710710model domain or along open boundary segments; these two variants can 
    711 be selected by setting \np{ln\_bdytide\_2ddta } to \forcode{.true.} or 
     711be selected by setting \np{ln_bdytide_2ddta }{ln\_bdytide\_2ddta } to \forcode{.true.} or 
    712712\forcode{.false.}, respectively. In either case, the real and 
    713713imaginary parts of SSH and the two barotropic velocity components for 
     
    729729\textit{v1} and \textit{v2} (real and imaginary part of v) are 
    730730expected to be available from file \np{filtide} with suffix 
    731 \ifile{tcname\_grid\_V}. If \np{ln\_bdytide\_conj} is set to 
     731\ifile{tcname\_grid\_V}. If \np{ln_bdytide_conj}{ln\_bdytide\_conj} is set to 
    732732\forcode{.true.}, the data is expected to be in complex conjugate 
    733733form. 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_LDF.tex

    r11567 r11577  
    2222(3) the space and time variations of the eddy coefficients. 
    2323These three aspects of the lateral diffusion are set through namelist parameters 
    24 (see the \nam{tra\_ldf} and \nam{dyn\_ldf} below). 
     24(see the \nam{tra_ldf}{tra\_ldf} and \nam{dyn_ldf}{dyn\_ldf} below). 
    2525Note that this chapter describes the standard implementation of iso-neutral tracer mixing. 
    26 Griffies's implementation, which is used if \np{ln\_traldf\_triad}\forcode{=.true.}, 
     26Griffies's implementation, which is used if \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.true.}, 
    2727is described in \autoref{apdx:TRIADS} 
    2828 
     
    3838We remind here the different lateral mixing operators that can be used. Further details can be found in \autoref{subsec:TRA_ldf_op} and  \autoref{sec:DYN_ldf}. 
    3939 
    40 \subsection[No lateral mixing (\forcode{ln_traldf_OFF} \& \forcode{ln_dynldf_OFF})]{No lateral mixing (\protect\np{ln\_traldf\_OFF} \& \protect\np{ln\_dynldf\_OFF})} 
    41  
    42 It is possible to run without explicit lateral diffusion on tracers (\protect\np{ln\_traldf\_OFF}\forcode{=.true.}) and/or 
    43 momentum (\protect\np{ln\_dynldf\_OFF}\forcode{=.true.}). The latter option is even recommended if using the 
    44 UBS advection scheme on momentum (\np{ln\_dynadv\_ubs}\forcode{=.true.}, 
     40\subsection[No lateral mixing (\forcode{ln_traldf_OFF} \& \forcode{ln_dynldf_OFF})]{No lateral mixing (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF} \& \protect\np{ln_dynldf_OFF}{ln\_dynldf\_OFF})} 
     41 
     42It is possible to run without explicit lateral diffusion on tracers (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF}\forcode{=.true.}) and/or 
     43momentum (\protect\np{ln_dynldf_OFF}{ln\_dynldf\_OFF}\forcode{=.true.}). The latter option is even recommended if using the 
     44UBS advection scheme on momentum (\np{ln_dynadv_ubs}{ln\_dynadv\_ubs}\forcode{=.true.}, 
    4545see \autoref{subsec:DYN_adv_ubs}) and can be useful for testing purposes. 
    4646 
    47 \subsection[Laplacian mixing (\forcode{ln_traldf_lap} \& \forcode{ln_dynldf_lap})]{Laplacian mixing (\protect\np{ln\_traldf\_lap} \& \protect\np{ln\_dynldf\_lap})} 
    48 Setting \protect\np{ln\_traldf\_lap}\forcode{=.true.} and/or \protect\np{ln\_dynldf\_lap}\forcode{=.true.} enables 
     47\subsection[Laplacian mixing (\forcode{ln_traldf_lap} \& \forcode{ln_dynldf_lap})]{Laplacian mixing (\protect\np{ln_traldf_lap}{ln\_traldf\_lap} \& \protect\np{ln_dynldf_lap}{ln\_dynldf\_lap})} 
     48Setting \protect\np{ln_traldf_lap}{ln\_traldf\_lap}\forcode{=.true.} and/or \protect\np{ln_dynldf_lap}{ln\_dynldf\_lap}\forcode{=.true.} enables 
    4949a second order diffusion on tracers and momentum respectively. Note that in \NEMO\ 4, one can not combine 
    5050Laplacian and Bilaplacian operators for the same variable. 
    5151 
    52 \subsection[Bilaplacian mixing (\forcode{ln_traldf_blp} \& \forcode{ln_dynldf_blp})]{Bilaplacian mixing (\protect\np{ln\_traldf\_blp} \& \protect\np{ln\_dynldf\_blp})} 
    53 Setting \protect\np{ln\_traldf\_blp}\forcode{=.true.} and/or \protect\np{ln\_dynldf\_blp}\forcode{=.true.} enables 
     52\subsection[Bilaplacian mixing (\forcode{ln_traldf_blp} \& \forcode{ln_dynldf_blp})]{Bilaplacian mixing (\protect\np{ln_traldf_blp}{ln\_traldf\_blp} \& \protect\np{ln_dynldf_blp}{ln\_dynldf\_blp})} 
     53Setting \protect\np{ln_traldf_blp}{ln\_traldf\_blp}\forcode{=.true.} and/or \protect\np{ln_dynldf_blp}{ln\_dynldf\_blp}\forcode{=.true.} enables 
    5454a fourth order diffusion on tracers and momentum respectively. It is implemented by calling the above Laplacian operator twice. 
    5555We stress again that from \NEMO\ 4, the simultaneous use Laplacian and Bilaplacian operators is not allowed. 
     
    6969A direction for lateral mixing has to be defined when the desired operator does not act along the model levels. 
    7070This occurs when $(a)$ horizontal mixing is required on tracer or momentum 
    71 (\np{ln\_traldf\_hor} or \np{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates, 
     71(\np{ln_traldf_hor}{ln\_traldf\_hor} or \np{ln_dynldf_hor}{ln\_dynldf\_hor}) in $s$- or mixed $s$-$z$- coordinates, 
    7272and $(b)$ isoneutral mixing is required whatever the vertical coordinate is. 
    7373This direction of mixing is defined by its slopes in the \textbf{i}- and \textbf{j}-directions at the face of 
     
    107107%gm%  caution I'm not sure the simplification was a good idea! 
    108108 
    109 These slopes are computed once in \rou{ldf\_slp\_init} when \np{ln\_sco}\forcode{=.true.}, 
    110 and either \np{ln\_traldf\_hor}\forcode{=.true.} or \np{ln\_dynldf\_hor}\forcode{=.true.}. 
     109These slopes are computed once in \rou{ldf\_slp\_init} when \np{ln_sco}{ln\_sco}\forcode{=.true.}, 
     110and either \np{ln_traldf_hor}{ln\_traldf\_hor}\forcode{=.true.} or \np{ln_dynldf_hor}{ln\_dynldf\_hor}\forcode{=.true.}. 
    111111 
    112112\subsection{Slopes for tracer iso-neutral mixing} 
     
    164164\item[$s$- or hybrid $s$-$z$- coordinate: ] 
    165165  in the current release of \NEMO, iso-neutral mixing is only employed for $s$-coordinates if 
    166   the Griffies scheme is used (\np{ln\_traldf\_triad}\forcode{=.true.}; 
     166  the Griffies scheme is used (\np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.true.}; 
    167167  see \autoref{apdx:TRIADS}). 
    168168  In other words, iso-neutral mixing will only be accurately represented with a linear equation of state 
    169   (\np{ln\_seos}\forcode{=.true.}). 
     169  (\np{ln_seos}{ln\_seos}\forcode{=.true.}). 
    170170  In the case of a "true" equation of state, the evaluation of $i$ and $j$ derivatives in \autoref{eq:LDF_slp_iso} 
    171171  will include a pressure dependent part, leading to the wrong evaluation of the neutral slopes. 
     
    222222To overcome this problem, several techniques have been proposed in which the numerical schemes of 
    223223the ocean model are modified \citep{weaver.eby_JPO97, griffies.gnanadesikan.ea_JPO98}. 
    224 Griffies's scheme is now available in \NEMO\ if \np{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:TRIADS}. 
     224Griffies's scheme is now available in \NEMO\ if \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{ = .true.}; see \autoref{apdx:TRIADS}. 
    225225Here, another strategy is presented \citep{lazar_phd97}: 
    226226a local filtering of the iso-neutral slopes (made on 9 grid-points) prevents the development of 
     
    258258 
    259259For numerical stability reasons \citep{cox_OM87, griffies_bk04}, the slopes must also be bounded by 
    260 the namelist scalar \np{rn\_slpmax} (usually $1/100$) everywhere. 
     260the namelist scalar \np{rn_slpmax}{rn\_slpmax} (usually $1/100$) everywhere. 
    261261This constraint is applied in a piecewise linear fashion, increasing from zero at the surface to 
    262262$1/100$ at $70$ metres and thereafter decreasing to zero at the bottom of the ocean 
     
    320320% Lateral Mixing Coefficients 
    321321% ================================================================ 
    322 \section[Lateral mixing coefficient (\forcode{nn_aht_ijk_t} \& \forcode{nn_ahm_ijk_t})]{Lateral mixing coefficient (\protect\np{nn\_aht\_ijk\_t} \& \protect\np{nn\_ahm\_ijk\_t})} 
     322\section[Lateral mixing coefficient (\forcode{nn_aht_ijk_t} \& \forcode{nn_ahm_ijk_t})]{Lateral mixing coefficient (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t})} 
    323323\label{sec:LDF_coef} 
    324324 
     
    326326The way the mixing coefficients are set in the reference version can be described as follows: 
    327327 
    328 \subsection[Mixing coefficients read from file (\forcode{=-20, -30})]{ Mixing coefficients read from file (\protect\np{nn\_aht\_ijk\_t}\forcode{=-20, -30} \& \protect\np{nn\_ahm\_ijk\_t}\forcode{=-20, -30})} 
     328\subsection[Mixing coefficients read from file (\forcode{=-20, -30})]{ Mixing coefficients read from file (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-20, -30} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-20, -30})} 
    329329 
    330330Mixing coefficients can be read from file if a particular geographical variation is needed. For example, in the ORCA2 global ocean model, 
     
    332332decreases linearly to $A^l$~= 2.10$^3$ m$^2$/s at the equator \citep{madec.delecluse.ea_JPO96, delecluse.madec_icol99}. 
    333333Similar modified horizontal variations can be found with the Antarctic or Arctic sub-domain options of ORCA2 and ORCA05. 
    334 The provided fields can either be 2d (\np{nn\_aht\_ijk\_t}\forcode{=-20}, \np{nn\_ahm\_ijk\_t}\forcode{=-20}) or 3d (\np{nn\_aht\_ijk\_t}\forcode{=-30},  \np{nn\_ahm\_ijk\_t}\forcode{=-30}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}). 
     334The provided fields can either be 2d (\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-20}, \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-20}) or 3d (\np{nn\_aht\_ijk\_t}\forcode{=-30},  \np{nn\_ahm\_ijk\_t}\forcode{=-30}). They must be given at U, V points for tracers and T, F points for momentum (see \autoref{tab:LDF_files}). 
    335335 
    336336%-------------------------------------------------TABLE--------------------------------------------------- 
     
    340340    \hline 
    341341    Namelist parameter                       & Input filename                               & dimensions & variable names                      \\  \hline 
    342     \np{nn\_ahm\_ijk\_t}\forcode{=-20}     & \forcode{eddy_viscosity_2D.nc }            &     $(i,j)$         & \forcode{ahmt_2d, ahmf_2d}  \\  \hline 
    343     \np{nn\_aht\_ijk\_t}\forcode{=-20}           & \forcode{eddy_diffusivity_2D.nc }           &     $(i,j)$           & \forcode{ahtu_2d, ahtv_2d}    \\   \hline 
    344     \np{nn\_ahm\_ijk\_t}\forcode{=-30}        & \forcode{eddy_viscosity_3D.nc }            &     $(i,j,k)$          & \forcode{ahmt_3d, ahmf_3d}  \\  \hline 
    345     \np{nn\_aht\_ijk\_t}\forcode{=-30}     & \forcode{eddy_diffusivity_3D.nc }           &     $(i,j,k)$         & \forcode{ahtu_3d, ahtv_3d}    \\   \hline 
     342    \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-20}      & \forcode{eddy_viscosity_2D.nc }            &     $(i,j)$         & \forcode{ahmt_2d, ahmf_2d}  \\  \hline 
     343    \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-20}           & \forcode{eddy_diffusivity_2D.nc }           &     $(i,j)$         & \forcode{ahtu_2d, ahtv_2d}    \\   \hline 
     344    \np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=-30}      & \forcode{eddy_viscosity_3D.nc }            &     $(i,j,k)$          & \forcode{ahmt_3d, ahmf_3d}  \\  \hline 
     345    \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=-30}      & \forcode{eddy_diffusivity_3D.nc }           &     $(i,j,k)$         & \forcode{ahtu_3d, ahtv_3d}    \\   \hline 
    346346  \end{tabular} 
    347347  \caption{Description of expected input files if mixing coefficients are read from NetCDF files} 
     
    350350%-------------------------------------------------------------------------------------------------------------- 
    351351 
    352 \subsection[Constant mixing coefficients (\forcode{=0})]{ Constant mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{=0} \& \protect\np{nn\_ahm\_ijk\_t}\forcode{=0})} 
     352\subsection[Constant mixing coefficients (\forcode{=0})]{ Constant mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=0} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=0})} 
    353353 
    354354If constant, mixing coefficients are set thanks to a velocity and a length scales ($U_{scl}$, $L_{scl}$) such that: 
     
    364364\end{equation} 
    365365 
    366  $U_{scl}$ and $L_{scl}$ are given by the namelist parameters \np{rn\_Ud}, \np{rn\_Uv}, \np{rn\_Ld} and \np{rn\_Lv}. 
    367  
    368 \subsection[Vertically varying mixing coefficients (\forcode{=10})]{Vertically varying mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{=10} \& \protect\np{nn\_ahm\_ijk\_t}\forcode{=10})} 
     366 $U_{scl}$ and $L_{scl}$ are given by the namelist parameters \np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}, \np{rn_Ld}{rn\_Ld} and \np{rn_Lv}{rn\_Lv}. 
     367 
     368\subsection[Vertically varying mixing coefficients (\forcode{=10})]{Vertically varying mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=10} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=10})} 
    369369 
    370370In the vertically varying case, a hyperbolic variation of the lateral mixing coefficient is introduced in which 
     
    373373This profile is hard coded in module \mdl{ldfc1d\_c2d}, but can be easily modified by users. 
    374374 
    375 \subsection[Mesh size dependent mixing coefficients (\forcode{=20})]{Mesh size dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{=20} \& \protect\np{nn\_ahm\_ijk\_t}\forcode{=20})} 
     375\subsection[Mesh size dependent mixing coefficients (\forcode{=20})]{Mesh size dependent mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=20} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=20})} 
    376376 
    377377In that case, the horizontal variation of the eddy coefficient depends on the local mesh size and 
     
    386386  \right. 
    387387\end{equation} 
    388 where $U_{scl}$ is a user defined velocity scale (\np{rn\_Ud}, \np{rn\_Uv}). 
     388where $U_{scl}$ is a user defined velocity scale (\np{rn_Ud}{rn\_Ud}, \np{rn_Uv}{rn\_Uv}). 
    389389This variation is intended to reflect the lesser need for subgrid scale eddy mixing where 
    390390the grid size is smaller in the domain. 
     
    396396especially when using a bilaplacian operator. 
    397397 
    398 \colorbox{yellow}{CASE \np{nn\_aht\_ijk\_t} = 21 to be added} 
    399  
    400 \subsection[Mesh size and depth dependent mixing coefficients (\forcode{=30})]{Mesh size and depth dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{=30} \& \protect\np{nn\_ahm\_ijk\_t}\forcode{=30})} 
     398\colorbox{yellow}{CASE \np{nn_aht_ijk_t}{nn\_aht\_ijk\_t} = 21 to be added} 
     399 
     400\subsection[Mesh size and depth dependent mixing coefficients (\forcode{=30})]{Mesh size and depth dependent mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=30} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=30})} 
    401401 
    402402The 3D space variation of the mixing coefficient is simply the combination of the 1D and 2D cases above, 
     
    404404the magnitude of the coefficient. 
    405405 
    406 \subsection[Velocity dependent mixing coefficients (\forcode{=31})]{Flow dependent mixing coefficients (\protect\np{nn\_aht\_ijk\_t}\forcode{=31} \& \protect\np{nn\_ahm\_ijk\_t}\forcode{=31})} 
     406\subsection[Velocity dependent mixing coefficients (\forcode{=31})]{Flow dependent mixing coefficients (\protect\np{nn_aht_ijk_t}{nn\_aht\_ijk\_t}\forcode{=31} \& \protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=31})} 
    407407In that case, the eddy coefficient is proportional to the local velocity magnitude so that the Reynolds number $Re =  \lvert U \rvert  e / A_l$ is constant (and here hardcoded to $12$): 
    408408\colorbox{yellow}{JC comment: The Reynolds is effectively set to 12 in the code for both operators but shouldn't it be 2 for Laplacian ?} 
     
    418418\end{equation} 
    419419 
    420 \subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t=32})]{Deformation rate dependent viscosities (\protect\np{nn\_ahm\_ijk\_t}\forcode{=32})} 
     420\subsection[Deformation rate dependent viscosities (\forcode{nn_ahm_ijk_t=32})]{Deformation rate dependent viscosities (\protect\np{nn_ahm_ijk_t}{nn\_ahm\_ijk\_t}\forcode{=32})} 
    421421 
    422422This option refers to the \citep{smagorinsky_MW63} scheme which is here implemented for momentum only. Smagorinsky chose as a 
     
    431431\end{equation} 
    432432 
    433 Introducing a user defined constant $C$ (given in the namelist as \np{rn\_csmc}), one can deduce the mixing coefficients as follows: 
     433Introducing a user defined constant $C$ (given in the namelist as \np{rn_csmc}{rn\_csmc}), one can deduce the mixing coefficients as follows: 
    434434 
    435435\begin{equation} 
     
    452452\end{equation} 
    453453 
    454 where $C_{min}$ and $C_{max}$ are adimensional namelist parameters given by \np{rn\_minfac} and \np{rn\_maxfac} respectively. 
     454where $C_{min}$ and $C_{max}$ are adimensional namelist parameters given by \np{rn_minfac}{rn\_minfac} and \np{rn_maxfac}{rn\_maxfac} respectively. 
    455455 
    456456\subsection{About space and time varying mixing coefficients} 
     
    470470% Eddy Induced Mixing 
    471471% ================================================================ 
    472 \section[Eddy induced velocity (\forcode{ln_ldfeiv})]{Eddy induced velocity (\protect\np{ln\_ldfeiv})} 
     472\section[Eddy induced velocity (\forcode{ln_ldfeiv})]{Eddy induced velocity (\protect\np{ln_ldfeiv}{ln\_ldfeiv})} 
    473473 
    474474\label{sec:LDF_eiv} 
     
    489489  Values of iso-neutral diffusivity and GM coefficient are set as described in \autoref{sec:LDF_coef}. 
    490490  If none of the keys \key{traldf\_cNd}, N=1,2,3 is set (the default), spatially constant iso-neutral $A_l$ and 
    491   GM diffusivity $A_e$ are directly set by \np{rn\_aeih\_0} and \np{rn\_aeiv\_0}. 
     491  GM diffusivity $A_e$ are directly set by \np{rn_aeih_0}{rn\_aeih\_0} and \np{rn_aeiv_0}{rn\_aeiv\_0}. 
    492492  If 2D-varying coefficients are set with \key{traldf\_c2d} then $A_l$ is reduced in proportion with horizontal 
    493493  scale factor according to \autoref{eq:title} 
     
    502502    In this case, $A_e$ at low latitudes $|\theta|<20^{\circ}$ is further reduced by a factor $|f/f_{20}|$, 
    503503    where $f_{20}$ is the value of $f$ at $20^{\circ}$~N 
    504   } (\mdl{ldfeiv}) and \np{rn\_aeiv\_0} is ignored unless it is zero. 
     504  } (\mdl{ldfeiv}) and \np{rn_aeiv_0}{rn\_aeiv\_0} is ignored unless it is zero. 
    505505} 
    506506 
    507 When  \citet{gent.mcwilliams_JPO90} diffusion is used (\np{ln\_ldfeiv}\forcode{=.true.}), 
     507When  \citet{gent.mcwilliams_JPO90} diffusion is used (\np{ln_ldfeiv}{ln\_ldfeiv}\forcode{=.true.}), 
    508508an eddy induced tracer advection term is added, 
    509509the formulation of which depends on the slopes of iso-neutral surfaces. 
     
    512512and the sum \autoref{eq:LDF_slp_geo} + \autoref{eq:LDF_slp_iso} in $s$-coordinates. 
    513513 
    514 If isopycnal mixing is used in the standard way, \ie\ \np{ln\_traldf\_triad}\forcode{=.false.}, the eddy induced velocity is given by: 
     514If isopycnal mixing is used in the standard way, \ie\ \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.false.}, the eddy induced velocity is given by: 
    515515\begin{equation} 
    516516  \label{eq:LDF_eiv} 
     
    521521  \end{split} 
    522522\end{equation} 
    523 where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn\_aei\_ijk\_t} \nam{tra\_eiv} namelist parameter. 
     523where $A^{eiv}$ is the eddy induced velocity coefficient whose value is set through \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} \nam{tra_eiv}{tra\_eiv} namelist parameter. 
    524524The three components of the eddy induced velocity are computed in \rou{ldf\_eiv\_trp} and 
    525525added to the eulerian velocity in \rou{tra\_adv} where tracer advection is performed. 
     
    533533At the surface, lateral and bottom boundaries, the eddy induced velocity, 
    534534and thus the advective eddy fluxes of heat and salt, are set to zero. 
    535 The value of the eddy induced mixing coefficient and its space variation is controlled in a similar way as for lateral mixing coefficient described in the preceding subsection (\np{nn\_aei\_ijk\_t}, \np{rn\_Ue}, \np{rn\_Le} namelist parameters). 
    536 \colorbox{yellow}{CASE \np{nn\_aei\_ijk\_t} = 21 to be added} 
    537  
    538 In case of setting \np{ln\_traldf\_triad}\forcode{ = .true.}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}. 
     535The value of the eddy induced mixing coefficient and its space variation is controlled in a similar way as for lateral mixing coefficient described in the preceding subsection (\np{nn_aei_ijk_t}{nn\_aei\_ijk\_t}, \np{rn_Ue}{rn\_Ue}, \np{rn_Le}{rn\_Le} namelist parameters). 
     536\colorbox{yellow}{CASE \np{nn_aei_ijk_t}{nn\_aei\_ijk\_t} = 21 to be added} 
     537 
     538In case of setting \np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{ = .true.}, a skew form of the eddy induced advective fluxes is used, which is described in \autoref{apdx:TRIADS}. 
    539539 
    540540% ================================================================ 
    541541% Mixed layer eddies 
    542542% ================================================================ 
    543 \section[Mixed layer eddies (\forcode{ln_mle})]{Mixed layer eddies (\protect\np{ln\_mle})} 
     543\section[Mixed layer eddies (\forcode{ln_mle})]{Mixed layer eddies (\protect\np{ln_mle}{ln\_mle})} 
    544544\label{sec:LDF_mle} 
    545545 
     
    554554%-------------------------------------------------------------------------------------------------------------- 
    555555 
    556 If  \np{ln\_mle}\forcode{=.true.} in \nam{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 
     556If  \np{ln_mle}{ln\_mle}\forcode{=.true.} in \nam{tra_mle}{tra\_mle} namelist, a parameterization of the mixing due to unresolved mixed layer instabilities is activated (\citet{foxkemper.ferrari_JPO08}). Additional transport is computed in \rou{ldf\_mle\_trp} and added to the eulerian transport in \rou{tra\_adv} as done for eddy induced advection. 
    557557 
    558558\colorbox{yellow}{TBC} 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_OBS.tex

    r11567 r11577  
    3232The OBS code is called from \mdl{nemogcm} for model initialisation and to calculate the model equivalent values for observations on the 0th time step. 
    3333The code is then called again after each time step from \mdl{step}. 
    34 The code is only activated if the \nam{obs} namelist logical \np{ln\_diaobs} is set to true. 
     34The code is only activated if the \nam{obs} namelist logical \np{ln_diaobs}{ln\_diaobs} is set to true. 
    3535 
    3636For all data types a 2D horizontal interpolator or averager is needed to 
     
    4242Some profile observation types (\eg\ tropical moored buoys) are made available as daily averaged quantities. 
    4343The observation operator code can be set-up to calculate the equivalent daily average model temperature fields using 
    44 the \np{nn\_profdavtypes} namelist array. 
     44the \np{nn_profdavtypes}{nn\_profdavtypes} namelist array. 
    4545Some SST observations are equivalent to a night-time average value and 
    4646the observation operator code can calculate equivalent night-time average model SST fields by 
    47 setting the namelist value \np{ln\_sstnight} to true. 
     47setting the namelist value \np{ln_sstnight}{ln\_sstnight} to true. 
    4848Otherwise (by default) the model value from the nearest time step to the observation time is used. 
    4949 
     
    9393 
    9494Options are defined through the \nam{obs} namelist variables. 
    95 The options \np{ln\_t3d} and \np{ln\_s3d} switch on the temperature and salinity profile observation operator code. 
    96 The filename or array of filenames are specified using the \np{cn\_profbfiles} variable. 
     95The options \np{ln_t3d}{ln\_t3d} and \np{ln_s3d}{ln\_s3d} switch on the temperature and salinity profile observation operator code. 
     96The filename or array of filenames are specified using the \np{cn_profbfiles}{cn\_profbfiles} variable. 
    9797The model grid points for a particular observation latitude and longitude are found using 
    9898the grid searching part of the code. 
    9999This can be expensive, particularly for large numbers of observations, 
    100 setting \np{ln\_grid\_search\_lookup} allows the use of a lookup table which 
    101 is saved into an \np{cn\_gridsearch} file (or files). 
     100setting \np{ln_grid_search_lookup}{ln\_grid\_search\_lookup} allows the use of a lookup table which 
     101is saved into an \np{cn_gridsearch}{cn\_gridsearch} file (or files). 
    102102This will need to be generated the first time if it does not exist in the run directory. 
    103103However, once produced it will significantly speed up future grid searches. 
    104 Setting \np{ln\_grid\_global} means that the code distributes the observations evenly between processors. 
     104Setting \np{ln_grid_global}{ln\_grid\_global} means that the code distributes the observations evenly between processors. 
    105105Alternatively each processor will work with observations located within the model subdomain 
    106106(see \autoref{subsec:OBS_parallel}). 
     
    565565(for surface observation types only). 
    566566 
    567 The main namelist option associated with the interpolation/averaging is \np{nn\_2dint}. 
     567The main namelist option associated with the interpolation/averaging is \np{nn_2dint}{nn\_2dint}. 
    568568This default option can be set to values from 0 to 6. 
    569569Values between 0 to 4 are associated with interpolation while values 5 or 6 are associated with averaging. 
    570570\begin{itemize} 
    571 \item \np{nn\_2dint}\forcode{ = 0}: Distance-weighted interpolation 
    572 \item \np{nn\_2dint}\forcode{ = 1}: Distance-weighted interpolation (small angle) 
    573 \item \np{nn\_2dint}\forcode{ = 2}: Bilinear interpolation (geographical grid) 
    574 \item \np{nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid) 
    575 \item \np{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 
    576 \item \np{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as 
     571\item \np{nn_2dint}{nn\_2dint}\forcode{ = 0}: Distance-weighted interpolation 
     572\item \np{nn_2dint}{nn\_2dint}\forcode{ = 1}: Distance-weighted interpolation (small angle) 
     573\item \np{nn_2dint}{nn\_2dint}\forcode{ = 2}: Bilinear interpolation (geographical grid) 
     574\item \np{nn_2dint}{nn\_2dint}\forcode{ = 3}: Bilinear remapping interpolation (general grid) 
     575\item \np{nn_2dint}{nn\_2dint}\forcode{ = 4}: Polynomial interpolation 
     576\item \np{nn_2dint}{nn\_2dint}\forcode{ = 5}: Radial footprint averaging with diameter specified in the namelist as 
    577577  \texttt{rn\_[var]\_avglamscl} in degrees or metres (set using \texttt{ln\_[var]\_fp\_indegs}) 
    578 \item \np{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in 
     578\item \np{nn_2dint}{nn\_2dint}\forcode{ = 6}: Rectangular footprint averaging with E/W and N/S size specified in 
    579579  the namelist as \texttt{rn\_[var]\_avglamscl} and \texttt{rn\_[var]\_avgphiscl} in degrees or metres 
    580580  (set using \texttt{ln\_[var]\_fp\_indegs}) 
     
    582582Replace \texttt{[var]} in the last two options with the observation type (sla, sst, sss or sic) for 
    583583which the averaging is to be performed (see namelist example above). 
    584 The \np{nn\_2dint} default option can be overridden for surface observation types using 
     584The \np{nn_2dint}{nn\_2dint} default option can be overridden for surface observation types using 
    585585namelist values \texttt{nn\_2dint\_[var]} where \texttt{[var]} is the observation type. 
    586586 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_SBC.tex

    r11571 r11577  
    4141\begin{itemize} 
    4242\item 
    43   a bulk formulation (\np{ln\_blk}\forcode{=.true.} with four possible bulk algorithms), 
    44 \item 
    45   a flux formulation (\np{ln\_flx}\forcode{=.true.}), 
     43  a bulk formulation (\np{ln_blk}{ln\_blk}\forcode{=.true.} with four possible bulk algorithms), 
     44\item 
     45  a flux formulation (\np{ln_flx}{ln\_flx}\forcode{=.true.}), 
    4646\item 
    4747  a coupled or mixed forced/coupled formulation (exchanges with a atmospheric model via the OASIS coupler), 
    48 (\np{ln\_cpl} or \np{ln\_mixcpl}\forcode{=.true.}), 
    49 \item 
    50   a user defined formulation (\np{ln\_usr}\forcode{=.true.}). 
     48(\np{ln_cpl}{ln\_cpl} or \np{ln_mixcpl}{ln\_mixcpl}\forcode{=.true.}), 
     49\item 
     50  a user defined formulation (\np{ln_usr}{ln\_usr}\forcode{=.true.}). 
    5151\end{itemize} 
    5252 
    53 The frequency at which the forcing fields have to be updated is given by the \np{nn\_fsbc} namelist parameter. 
     53The frequency at which the forcing fields have to be updated is given by the \np{nn_fsbc}{nn\_fsbc} namelist parameter. 
    5454 
    5555When the fields are supplied from data files (bulk, flux and mixed formulations), 
     
    6969  the local grid directions in the model, 
    7070\item 
    71   the use of a land/sea mask for input fields (\np{nn\_lsm}\forcode{=.true.}), 
    72 \item 
    73   the addition of a surface restoring term to observed SST and/or SSS (\np{ln\_ssr}\forcode{=.true.}), 
     71  the use of a land/sea mask for input fields (\np{nn_lsm}{nn\_lsm}\forcode{=.true.}), 
     72\item 
     73  the addition of a surface restoring term to observed SST and/or SSS (\np{ln_ssr}{ln\_ssr}\forcode{=.true.}), 
    7474\item 
    7575  the modification of fluxes below ice-covered areas (using climatological ice-cover or a sea-ice model) 
    76   (\np{nn\_ice}\forcode{=0..3}), 
    77 \item 
    78   the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln\_rnf}\forcode{=.true.}), 
     76  (\np{nn_ice}{nn\_ice}\forcode{=0..3}), 
     77\item 
     78  the addition of river runoffs as surface freshwater fluxes or lateral inflow (\np{ln_rnf}{ln\_rnf}\forcode{=.true.}), 
    7979\item 
    8080  the addition of ice-shelf melting as lateral inflow (parameterisation) or 
    81   as fluxes applied at the land-ice ocean interface (\np{ln\_isf}\forcode{=.true.}), 
     81  as fluxes applied at the land-ice ocean interface (\np{ln_isf}{ln\_isf}\forcode{=.true.}), 
    8282\item 
    8383  the addition of a freshwater flux adjustment in order to avoid a mean sea-level drift 
    84   (\np{nn\_fwb}\forcode{=0..2}), 
     84  (\np{nn_fwb}{nn\_fwb}\forcode{=0..2}), 
    8585\item 
    8686  the transformation of the solar radiation (if provided as daily mean) into an analytical diurnal cycle 
    87   (\np{ln\_dm2dc}\forcode{=.true.}), 
    88 \item 
    89   the activation of wave effects from an external wave model  (\np{ln\_wave}\forcode{=.true.}), 
    90 \item 
    91   a neutral drag coefficient is read from an external wave model (\np{ln\_cdgw}\forcode{=.true.}), 
    92 \item 
    93   the Stokes drift from an external wave model is accounted for (\np{ln\_sdw}\forcode{=.true.}), 
    94 \item 
    95   the choice of the Stokes drift profile parameterization (\np{nn\_sdrift}\forcode{=0..2}), 
    96 \item 
    97   the surface stress given to the ocean is modified by surface waves (\np{ln\_tauwoc}\forcode{=.true.}), 
    98 \item 
    99   the surface stress given to the ocean is read from an external wave model (\np{ln\_tauw}\forcode{=.true.}), 
    100 \item 
    101   the Stokes-Coriolis term is included (\np{ln\_stcor}\forcode{=.true.}), 
    102 \item 
    103   the light penetration in the ocean (\np{ln\_traqsr}\forcode{=.true.} with namelist \nam{tra\_qsr}), 
    104 \item 
    105   the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln\_apr\_dyn}\forcode{=.true.} with namelist \nam{sbc\_apr}), 
    106 \item 
    107   the effect of sea-ice pressure on the ocean (\np{ln\_ice\_embd}\forcode{=.true.}). 
     87  (\np{ln_dm2dc}{ln\_dm2dc}\forcode{=.true.}), 
     88\item 
     89  the activation of wave effects from an external wave model  (\np{ln_wave}{ln\_wave}\forcode{=.true.}), 
     90\item 
     91  a neutral drag coefficient is read from an external wave model (\np{ln_cdgw}{ln\_cdgw}\forcode{=.true.}), 
     92\item 
     93  the Stokes drift from an external wave model is accounted for (\np{ln_sdw}{ln\_sdw}\forcode{=.true.}), 
     94\item 
     95  the choice of the Stokes drift profile parameterization (\np{nn_sdrift}{nn\_sdrift}\forcode{=0..2}), 
     96\item 
     97  the surface stress given to the ocean is modified by surface waves (\np{ln_tauwoc}{ln\_tauwoc}\forcode{=.true.}), 
     98\item 
     99  the surface stress given to the ocean is read from an external wave model (\np{ln_tauw}{ln\_tauw}\forcode{=.true.}), 
     100\item 
     101  the Stokes-Coriolis term is included (\np{ln_stcor}{ln\_stcor}\forcode{=.true.}), 
     102\item 
     103  the light penetration in the ocean (\np{ln_traqsr}{ln\_traqsr}\forcode{=.true.} with namelist \nam{tra_qsr}{tra\_qsr}), 
     104\item 
     105  the atmospheric surface pressure gradient effect on ocean and ice dynamics (\np{ln_apr_dyn}{ln\_apr\_dyn}\forcode{=.true.} with namelist \nam{sbc_apr}{sbc\_apr}), 
     106\item 
     107  the effect of sea-ice pressure on the ocean (\np{ln_ice_embd}{ln\_ice\_embd}\forcode{=.true.}). 
    108108\end{itemize} 
    109109 
     
    142142The latter is the penetrative part of the heat flux. 
    143143It is applied as a 3D trend of the temperature equation (\mdl{traqsr} module) when 
    144 \np{ln\_traqsr}\forcode{=.true.}. 
     144\np{ln_traqsr}{ln\_traqsr}\forcode{=.true.}. 
    145145The way the light penetrates inside the water column is generally a sum of decreasing exponentials 
    146146(see \autoref{subsec:TRA_qsr}). 
     
    161161%created!) 
    162162% 
    163 %Especially the \np{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu 
     163%Especially the \np{nn_fsbc}{nn\_fsbc}, the \mdl{sbc\_oce} module (fluxes + mean sst sss ssu 
    164164%ssv) \ie\ information required by flux computation or sea-ice 
    165165% 
     
    181181The ocean model provides, at each time step, to the surface module (\mdl{sbcmod}) 
    182182the surface currents, temperature and salinity. 
    183 These variables are averaged over \np{nn\_fsbc} time-step (\autoref{tab:SBC_ssm}), and 
    184 these averaged fields are used to compute the surface fluxes at the frequency of \np{nn\_fsbc} time-steps. 
     183These variables are averaged over \np{nn_fsbc}{nn\_fsbc} time-step (\autoref{tab:SBC_ssm}), and 
     184these averaged fields are used to compute the surface fluxes at the frequency of \np{nn_fsbc}{nn\_fsbc} time-steps. 
    185185 
    186186 
     
    201201  \caption[Ocean variables provided to the surface module)]{ 
    202202    Ocean variables provided to the surface module (\texttt{SBC}). 
    203     The variable are averaged over \protect\np{nn\_fsbc} time-step, 
     203    The variable are averaged over \protect\np{nn_fsbc}{nn\_fsbc} time-step, 
    204204    \ie\ the frequency of computation of surface fluxes.} 
    205205  \label{tab:SBC_ssm} 
     
    247247 
    248248Note that when an input data is archived on a disc which is accessible directly from the workspace where 
    249 the code is executed, then the user can set the \np{cn\_dir} to the pathway leading to the data. 
     249the code is executed, then the user can set the \np{cn_dir}{cn\_dir} to the pathway leading to the data. 
    250250By default, the data are assumed to be in the same directory as the executable, so that cn\_dir='./'. 
    251251 
     
    278278                                  &  daily or weekLL     &  monthly           &  yearly        \\ 
    279279      \hline 
    280       \np{clim}\forcode{=.false.} &  fn\_yYYYYmMMdDD.nc  &  fn\_yYYYYmMM.nc   &  fn\_yYYYY.nc  \\ 
     280      \np{clim}{clim}\forcode{=.false.} &  fn\_yYYYYmMMdDD.nc  &  fn\_yYYYYmMM.nc   &  fn\_yYYYY.nc  \\ 
    281281      \hline 
    282       \np{clim}\forcode{=.true.}  &  not possible        &  fn\_m??.nc        &  fn            \\ 
     282      \np{clim}{clim}\forcode{=.true.}  &  not possible        &  fn\_m??.nc        &  fn            \\ 
    283283      \hline 
    284284    \end{tabular} 
     
    350350a time interpolation will be performed at the following time: 0h30'00", 1h30'00", 2h30'00", etc. 
    351351However, for forcing data related to the surface module, 
    352 values are not needed at every time-step but at every \np{nn\_fsbc} time-step. 
    353 For example with \np{nn\_fsbc}\forcode{=3}, the surface module will be called at time-steps 1, 4, 7, etc. 
    354 The date used for the time interpolation is thus redefined to the middle of \np{nn\_fsbc} time-step period. 
     352values are not needed at every time-step but at every \np{nn_fsbc}{nn\_fsbc} time-step. 
     353For example with \np{nn_fsbc}{nn\_fsbc}\forcode{=3}, the surface module will be called at time-steps 1, 4, 7, etc. 
     354The date used for the time interpolation is thus redefined to the middle of \np{nn_fsbc}{nn\_fsbc} time-step period. 
    355355In the previous example, this leads to: 1h30'00", 4h30'00", 7h30'00", etc. \\ 
    356356(2) For code readablility and maintenance issues, we don't take into account the NetCDF input file calendar. 
     
    550550  Spinup of the iceberg floats 
    551551\item 
    552   Ocean/sea-ice simulation with both models running in parallel (\np{ln\_mixcpl}\forcode{=.true.}) 
     552  Ocean/sea-ice simulation with both models running in parallel (\np{ln_mixcpl}{ln\_mixcpl}\forcode{=.true.}) 
    553553\end{itemize} 
    554554 
    555555The Standalone Surface scheme provides this capacity. 
    556 Its options are defined through the \nam{sbc\_sas} namelist variables. 
     556Its options are defined through the \nam{sbc_sas}{sbc\_sas} namelist variables. 
    557557A new copy of the model has to be compiled with a configuration based on ORCA2\_SAS\_LIM. 
    558558However, no namelist parameters need be changed from the settings of the previous run (except perhaps nn\_date0). 
     
    604604 
    605605 
    606 The user can also choose in the \nam{sbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using 
    607  (\np{ln\_flx}\forcode{=.true.}) and to provide 3D oceanic velocities instead of 2D ones (\np{ln\_flx}\forcode{=.true.}). In that last case, only the 1st level will be read in. 
     606The user can also choose in the \nam{sbc_sas}{sbc\_sas} namelist to read the mean (nn\_fsbc time-step) fraction of solar net radiation absorbed in the 1st T level using 
     607 (\np{ln_flx}{ln\_flx}\forcode{=.true.}) and to provide 3D oceanic velocities instead of 2D ones (\np{ln_flx}{ln\_flx}\forcode{=.true.}). In that last case, only the 1st level will be read in. 
    608608 
    609609 
     
    623623%------------------------------------------------------------------------------------------------------------- 
    624624 
    625 In the flux formulation (\np{ln\_flx}\forcode{=.true.}), 
     625In the flux formulation (\np{ln_flx}{ln\_flx}\forcode{=.true.}), 
    626626the surface boundary condition fields are directly read from input files. 
    627 The user has to define in the namelist \nam{sbc\_flx} the name of the file, 
     627The user has to define in the namelist \nam{sbc_flx}{sbc\_flx} the name of the file, 
    628628the name of the variable read in the file, the time frequency at which it is given (in hours), 
    629629and a logical setting whether a time interpolation to the model time step is required for this field. 
     
    650650 
    651651In the bulk formulation, the surface boundary condition fields are computed with bulk formulae using atmospheric fields 
    652 and ocean (and sea-ice) variables averaged over \np{nn\_fsbc} time-step. 
     652and ocean (and sea-ice) variables averaged over \np{nn_fsbc}{nn\_fsbc} time-step. 
    653653 
    654654The atmospheric fields used depend on the bulk formulae used. 
     
    659659the NCAR (formerly named CORE), COARE 3.0, COARE 3.5 and ECMWF bulk formulae. 
    660660The choice is made by setting to true one of the following namelist variable: 
    661  \np{ln\_NCAR}, \np{ln\_COARE\_3p0},  \np{ln\_COARE\_3p5} and  \np{ln\_ECMWF}. 
     661 \np{ln_NCAR}{ln\_NCAR}, \np{ln_COARE_3p0}{ln\_COARE\_3p0},  \np{ln_COARE_3p5}{ln\_COARE\_3p5} and  \np{ln_ECMWF}{ln\_ECMWF}. 
    662662For sea-ice, three possibilities can be selected: 
    663 a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln\_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}) parameterizations 
    664  
    665 Common options are defined through the \nam{sbc\_blk} namelist variables. 
     663a constant transfer coefficient (1.4e-3; default value), \citet{lupkes.gryanik.ea_JGR12} (\np{ln_Cd_L12}{ln\_Cd\_L12}), and \citet{lupkes.gryanik_JGR15} (\np{ln_Cd_L15}{ln\_Cd\_L15}) parameterizations 
     664 
     665Common options are defined through the \nam{sbc_blk}{sbc\_blk} namelist variables. 
    666666The required 9 input fields are: 
    667667 
     
    700700the ocean grid size is the same or larger than the one of the input atmospheric fields. 
    701701 
    702 The \np{sn\_wndi}, \np{sn\_wndj}, \np{sn\_qsr}, \np{sn\_qlw}, \np{sn\_tair}, \np{sn\_humi}, \np{sn\_prec}, 
    703 \np{sn\_snow}, \np{sn\_tdif} parameters describe the fields and the way they have to be used 
     702The \np{sn_wndi}{sn\_wndi}, \np{sn_wndj}{sn\_wndj}, \np{sn_qsr}{sn\_qsr}, \np{sn_qlw}{sn\_qlw}, \np{sn_tair}{sn\_tair}, \np{sn_humi}{sn\_humi}, \np{sn_prec}{sn\_prec}, 
     703\np{sn_snow}{sn\_snow}, \np{sn_tdif}{sn\_tdif} parameters describe the fields and the way they have to be used 
    704704(spatial and temporal interpolations). 
    705705 
    706 \np{cn\_dir} is the directory of location of bulk files 
    707 \np{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
    708 \np{rn\_zqt}: is the height of humidity and temperature measurements (m) 
    709 \np{rn\_zu}: is the height of wind measurements (m) 
     706\np{cn_dir}{cn\_dir} is the directory of location of bulk files 
     707\np{ln_taudif}{ln\_taudif} is the flag to specify if we use Hight Frequency (HF) tau information (.true.) or not (.false.) 
     708\np{rn_zqt}{rn\_zqt}: is the height of humidity and temperature measurements (m) 
     709\np{rn_zu}{rn\_zu}: is the height of wind measurements (m) 
    710710 
    711711Three multiplicative factors are available: 
    712 \np{rn\_pfac} and \np{rn\_efac} allow to adjust (if necessary) the global freshwater budget by 
     712\np{rn_pfac}{rn\_pfac} and \np{rn_efac}{rn\_efac} allow to adjust (if necessary) the global freshwater budget by 
    713713increasing/reducing the precipitations (total and snow) and or evaporation, respectively. 
    714 The third one,\np{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in 
     714The third one,\np{rn_vfac}{rn\_vfac}, control to which extend the ice/ocean velocities are taken into account in 
    715715the calculation of surface wind stress. 
    716716Its range must be between zero and one, and it is recommended to set it to 0 at low-resolution (ORCA2 configuration). 
     
    731731\begin{itemize} 
    732732\item 
    733   NCAR (\np{ln\_NCAR}\forcode{=.true.}): 
     733  NCAR (\np{ln_NCAR}{ln\_NCAR}\forcode{=.true.}): 
    734734  The NCAR bulk formulae have been developed by \citet{large.yeager_rpt04}. 
    735735  They have been designed to handle the NCAR forcing, a mixture of NCEP reanalysis and satellite data. 
     
    741741  This is the so-called DRAKKAR Forcing Set (DFS) \citep{brodeau.barnier.ea_OM10}. 
    742742\item 
    743   COARE 3.0 (\np{ln\_COARE\_3p0}\forcode{=.true.}): 
     743  COARE 3.0 (\np{ln_COARE_3p0}{ln\_COARE\_3p0}\forcode{=.true.}): 
    744744  See \citet{fairall.bradley.ea_JC03} for more details 
    745745\item 
    746   COARE 3.5 (\np{ln\_COARE\_3p5}\forcode{=.true.}): 
     746  COARE 3.5 (\np{ln_COARE_3p5}{ln\_COARE\_3p5}\forcode{=.true.}): 
    747747  See \citet{edson.jampana.ea_JPO13} for more details 
    748748\item 
    749   ECMWF (\np{ln\_ECMWF}\forcode{=.true.}): 
     749  ECMWF (\np{ln_ECMWF}{ln\_ECMWF}\forcode{=.true.}): 
    750750  Based on \href{https://www.ecmwf.int/node/9221}{IFS (Cy31)} implementation and documentation. 
    751751  Surface roughness lengths needed for the Obukhov length are computed following \citet{beljaars_QJRMS95}. 
     
    762762\begin{itemize} 
    763763\item 
    764   Constant value (\np{constant\ value}\forcode{ Cd_ice = 1.4e-3 }): 
     764  Constant value (\np{constant value}{constant\ value}\forcode{ Cd_ice = 1.4e-3 }): 
    765765  default constant value used for momentum and heat neutral transfer coefficients 
    766766\item 
    767   \citet{lupkes.gryanik.ea_JGR12} (\np{ln\_Cd\_L12}\forcode{=.true.}): 
     767  \citet{lupkes.gryanik.ea_JGR12} (\np{ln_Cd_L12}{ln\_Cd\_L12}\forcode{=.true.}): 
    768768  This scheme adds a dependency on edges at leads, melt ponds and flows 
    769769  of the constant neutral air-ice drag. After some approximations, 
     
    773773  It is theoretically applicable to all ice conditions (not only MIZ). 
    774774\item 
    775   \citet{lupkes.gryanik_JGR15} (\np{ln\_Cd\_L15}\forcode{=.true.}): 
     775  \citet{lupkes.gryanik_JGR15} (\np{ln_Cd_L15}{ln\_Cd\_L15}\forcode{=.true.}): 
    776776  Alternative turbulent transfer coefficients formulation between sea-ice 
    777777  and atmosphere with distinct momentum and heat coefficients depending 
     
    814814the whole carbon cycle is computed. 
    815815In this case, CO$_2$ fluxes will be exchanged between the atmosphere and the ice-ocean system 
    816 (and need to be activated in \nam{sbc\_cpl} ). 
     816(and need to be activated in \nam{sbc_cpl}{sbc\_cpl} ). 
    817817 
    818818The namelist above allows control of various aspects of the coupling fields (particularly for vectors) and 
    819819now allows for any coupling fields to have multiple sea ice categories (as required by LIM3 and CICE). 
    820 When indicating a multi-category coupling field in \nam{sbc\_cpl}, the number of categories will be determined by 
     820When indicating a multi-category coupling field in \nam{sbc_cpl}{sbc\_cpl}, the number of categories will be determined by 
    821821the number used in the sea ice model. 
    822822In some limited cases, it may be possible to specify single category coupling fields even when 
     
    842842 
    843843The optional atmospheric pressure can be used to force ocean and ice dynamics 
    844 (\np{ln\_apr\_dyn}\forcode{=.true.}, \nam{sbc} namelist). 
    845 The input atmospheric forcing defined via \np{sn\_apr} structure (\nam{sbc\_apr} namelist) 
     844(\np{ln_apr_dyn}{ln\_apr\_dyn}\forcode{=.true.}, \nam{sbc} namelist). 
     845The input atmospheric forcing defined via \np{sn_apr}{sn\_apr} structure (\nam{sbc_apr}{sbc\_apr} namelist) 
    846846can be interpolated in time to the model time step, and even in space when the interpolation on-the-fly is used. 
    847847When used to force the dynamics, the atmospheric pressure is further transformed into 
     
    852852\] 
    853853where $P_{atm}$ is the atmospheric pressure and $P_o$ a reference atmospheric pressure. 
    854 A value of $101,000~N/m^2$ is used unless \np{ln\_ref\_apr} is set to true. 
     854A value of $101,000~N/m^2$ is used unless \np{ln_ref_apr}{ln\_ref\_apr} is set to true. 
    855855In this case, $P_o$ is set to the value of $P_{atm}$ averaged over the ocean domain, 
    856856\ie\ the mean value of $\eta_{ib}$ is kept to zero at all time steps. 
     
    865865When using time-splitting and BDY package for open boundaries conditions, 
    866866the equivalent inverse barometer sea surface height $\eta_{ib}$ can be added to BDY ssh data: 
    867 \np{ln\_apr\_obc}  might be set to true. 
     867\np{ln_apr_obc}{ln\_apr\_obc}  might be set to true. 
    868868 
    869869 
     
    885885 
    886886The tidal forcing, generated by the gravity forces of the Earth-Moon and Earth-Sun sytems, 
    887 is activated if \np{ln\_tide} and \np{ln\_tide\_pot} are both set to \forcode{.true.} in \nam{\_tide}. 
     887is activated if \np{ln_tide}{ln\_tide} and \np{ln_tide_pot}{ln\_tide\_pot} are both set to \forcode{.true.} in \nam{_tide}{\_tide}. 
    888888This translates as an additional barotropic force in the momentum \autoref{eq:MB_PE_dyn} such that: 
    889889\[ 
     
    901901  Msqm, Mtm, S1, MU2, NU2, L2}, and \textit{T2}). Individual 
    902902constituents are selected by including their names in the array 
    903 \np{clname} in \nam{\_tide} (e.g., \np{clname}\forcode{(1)='M2', } 
    904 \np{clname}\forcode{(2)='S2'} to select solely the tidal consituents \textit{M2} 
    905 and \textit{S2}). Optionally, when \np{ln\_tide\_ramp} is set to 
     903\np{clname}{clname} in \nam{_tide}{\_tide} (e.g., \np{clname}{clname}\forcode{(1)='M2', } 
     904\np{clname}{clname}\forcode{(2)='S2'} to select solely the tidal consituents \textit{M2} 
     905and \textit{S2}). Optionally, when \np{ln_tide_ramp}{ln\_tide\_ramp} is set to 
    906906\forcode{.true.}, the equilibrium tidal forcing can be ramped up 
    907 linearly from zero during the initial \np{rdttideramp} days of the 
     907linearly from zero during the initial \np{rdttideramp}{rdttideramp} days of the 
    908908model run. 
    909909 
     
    914914computationally too expensive. Here, two options are available: 
    915915$\Pi_{sal}$ generated by an external model can be read in 
    916 (\np{ln\_read\_load}\forcode{ =.true.}), or a ``scalar approximation'' can be 
    917 used (\np{ln\_scal\_load}\forcode{ =.true.}). In the latter case 
     916(\np{ln_read_load}{ln\_read\_load}\forcode{ =.true.}), or a ``scalar approximation'' can be 
     917used (\np{ln_scal_load}{ln\_scal\_load}\forcode{ =.true.}). In the latter case 
    918918\[ 
    919919  \Pi_{sal} = \beta \eta, 
    920920\] 
    921 where $\beta$ (\np{rn\_scal\_load} with a default value of 0.094) is a 
     921where $\beta$ (\np{rn_scal_load}{rn\_scal\_load} with a default value of 0.094) is a 
    922922spatially constant scalar, often chosen to minimize tidal prediction 
    923 errors. Setting both \np{ln\_read\_load} and \np{ln\_scal\_load} to 
     923errors. Setting both \np{ln_read_load}{ln\_read\_load} and \np{ln_scal_load}{ln\_scal\_load} to 
    924924\forcode{.false.} removes the SAL contribution. 
    925925 
     
    976976along with the depth (in metres) which the river should be added to. 
    977977 
    978 Namelist variables in \nam{sbc\_rnf}, \np{ln\_rnf\_depth}, \np{ln\_rnf\_sal} and 
    979 \np{ln\_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used. 
     978Namelist variables in \nam{sbc_rnf}{sbc\_rnf}, \np{ln_rnf_depth}{ln\_rnf\_depth}, \np{ln_rnf_sal}{ln\_rnf\_sal} and 
     979\np{ln_rnf_temp}{ln\_rnf\_temp} control whether the river attributes (depth, salinity and temperature) are read in and used. 
    980980If these are set as false the river is added to the surface box only, assumed to be fresh (0~psu), 
    981981and/or taken as surface temperature respectively. 
     
    989989(converted into m/s) to give the heat and salt content of the river runoff. 
    990990After the user specified depth is read ini, 
    991 the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz\_rnf}. 
     991the number of grid boxes this corresponds to is calculated and stored in the variable \np{nz_rnf}{nz\_rnf}. 
    992992The variable \textit{h\_dep} is then calculated to be the depth (in metres) of 
    993993the bottom of the lowest box the river water is being added to 
     
    10701070%-------------------------------------------------------------------------------------------------------- 
    10711071 
    1072 The namelist variable in \nam{sbc}, \np{nn\_isf}, controls the ice shelf representation. 
    1073 Description and result of sensitivity test to \np{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. 
     1072The namelist variable in \nam{sbc}, \np{nn_isf}{nn\_isf}, controls the ice shelf representation. 
     1073Description and result of sensitivity test to \np{nn_isf}{nn\_isf} are presented in \citet{mathiot.jenkins.ea_GMD17}. 
    10741074The different options are illustrated in \autoref{fig:SBC_isf}. 
    10751075 
    10761076\begin{description} 
    10771077 
    1078   \item[\np{nn\_isf}\forcode{=1}]: 
    1079   The ice shelf cavity is represented (\np{ln\_isfcav}\forcode{=.true.} needed). 
     1078  \item[\np{nn_isf}{nn\_isf}\forcode{=1}]: 
     1079  The ice shelf cavity is represented (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.} needed). 
    10801080  The fwf and heat flux are depending of the local water properties. 
    10811081 
     
    10831083 
    10841084   \begin{description} 
    1085    \item[\np{nn\_isfblk}\forcode{=1}]: 
     1085   \item[\np{nn_isfblk}{nn\_isfblk}\forcode{=1}]: 
    10861086     The melt rate is based on a balance between the upward ocean heat flux and 
    10871087     the latent heat flux at the ice shelf base. A complete description is available in \citet{hunter_rpt06}. 
    1088    \item[\np{nn\_isfblk}\forcode{=2}]: 
     1088   \item[\np{nn_isfblk}{nn\_isfblk}\forcode{=2}]: 
    10891089     The melt rate and the heat flux are based on a 3 equations formulation 
    10901090     (a heat flux budget at the ice base, a salt flux budget at the ice base and a linearised freezing point temperature equation). 
     
    10931093 
    10941094     Temperature and salinity used to compute the melt are the average temperature in the top boundary layer \citet{losch_JGR08}. 
    1095      Its thickness is defined by \np{rn\_hisf\_tbl}. 
    1096      The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn\_hisf\_tbl} m. 
     1095     Its thickness is defined by \np{rn_hisf_tbl}{rn\_hisf\_tbl}. 
     1096     The fluxes and friction velocity are computed using the mean temperature, salinity and velocity in the the first \np{rn_hisf_tbl}{rn\_hisf\_tbl} m. 
    10971097     Then, the fluxes are spread over the same thickness (ie over one or several cells). 
    1098      If \np{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature. 
     1098     If \np{rn_hisf_tbl}{rn\_hisf\_tbl} larger than top $e_{3}t$, there is no more feedback between the freezing point at the interface and the the top cell temperature. 
    10991099     This can lead to super-cool temperature in the top cell under melting condition. 
    1100      If \np{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\ 
     1100     If \np{rn_hisf_tbl}{rn\_hisf\_tbl} smaller than top $e_{3}t$, the top boundary layer thickness is set to the top cell thickness.\\ 
    11011101 
    11021102     Each melt bulk formula depends on a exchange coeficient ($\Gamma^{T,S}$) between the ocean and the ice. 
    11031103     There are 3 different ways to compute the exchange coeficient: 
    11041104   \begin{description} 
    1105         \item[\np{nn\_gammablk}\forcode{=0}]: 
    1106      The salt and heat exchange coefficients are constant and defined by \np{rn\_gammas0} and \np{rn\_gammat0}. 
     1105        \item[\np{nn_gammablk}{nn\_gammablk}\forcode{=0}]: 
     1106     The salt and heat exchange coefficients are constant and defined by \np{rn_gammas0}{rn\_gammas0} and \np{rn_gammat0}{rn\_gammat0}. 
    11071107     \begin{gather*} 
    11081108       % \label{eq:SBC_isf_gamma_iso} 
     
    11111111     \end{gather*} 
    11121112     This is the recommended formulation for ISOMIP. 
    1113    \item[\np{nn\_gammablk}\forcode{=1}]: 
     1113   \item[\np{nn_gammablk}{nn\_gammablk}\forcode{=1}]: 
    11141114     The salt and heat exchange coefficients are velocity dependent and defined as 
    11151115     \begin{gather*} 
     
    11171117       \gamma^{S} = rn\_gammas0 \times u_{*} 
    11181118     \end{gather*} 
    1119      where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters). 
     1119     where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters). 
    11201120     See \citet{jenkins.nicholls.ea_JPO10} for all the details on this formulation. It is the recommended formulation for realistic application. 
    1121    \item[\np{nn\_gammablk}\forcode{=2}]: 
     1121   \item[\np{nn_gammablk}{nn\_gammablk}\forcode{=2}]: 
    11221122     The salt and heat exchange coefficients are velocity and stability dependent and defined as: 
    11231123\[ 
    11241124\gamma^{T,S} = \frac{u_{*}}{\Gamma_{Turb} + \Gamma^{T,S}_{Mole}} 
    11251125\] 
    1126      where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn\_hisf\_tbl} meters), 
     1126     where $u_{*}$ is the friction velocity in the top boundary layer (ie first \np{rn_hisf_tbl}{rn\_hisf\_tbl} meters), 
    11271127     $\Gamma_{Turb}$ the contribution of the ocean stability and 
    11281128     $\Gamma^{T,S}_{Mole}$ the contribution of the molecular diffusion. 
     
    11301130     This formulation has not been extensively tested in \NEMO\ (not recommended). 
    11311131   \end{description} 
    1132   \item[\np{nn\_isf}\forcode{=2}]: 
     1132  \item[\np{nn_isf}{nn\_isf}\forcode{=2}]: 
    11331133   The ice shelf cavity is not represented. 
    11341134   The fwf and heat flux are computed using the \citet{beckmann.goosse_OM03} parameterisation of isf melting. 
    11351135   The fluxes are distributed along the ice shelf edge between the depth of the average grounding line (GL) 
    1136    (\np{sn\_depmax\_isf}) and the base of the ice shelf along the calving front 
    1137    (\np{sn\_depmin\_isf}) as in (\np{nn\_isf}\forcode{=3}). 
    1138    The effective melting length (\np{sn\_Leff\_isf}) is read from a file. 
    1139   \item[\np{nn\_isf}\forcode{=3}]: 
     1136   (\np{sn_depmax_isf}{sn\_depmax\_isf}) and the base of the ice shelf along the calving front 
     1137   (\np{sn_depmin_isf}{sn\_depmin\_isf}) as in (\np{nn_isf}{nn\_isf}\forcode{=3}). 
     1138   The effective melting length (\np{sn_Leff_isf}{sn\_Leff\_isf}) is read from a file. 
     1139  \item[\np{nn_isf}{nn\_isf}\forcode{=3}]: 
    11401140   The ice shelf cavity is not represented. 
    1141    The fwf (\np{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between 
    1142    the depth of the average grounding line (GL) (\np{sn\_depmax\_isf}) and 
    1143    the base of the ice shelf along the calving front (\np{sn\_depmin\_isf}). 
     1141   The fwf (\np{sn_rnfisf}{sn\_rnfisf}) is prescribed and distributed along the ice shelf edge between 
     1142   the depth of the average grounding line (GL) (\np{sn_depmax_isf}{sn\_depmax\_isf}) and 
     1143   the base of the ice shelf along the calving front (\np{sn_depmin_isf}{sn\_depmin\_isf}). 
    11441144   The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    1145   \item[\np{nn\_isf}\forcode{=4}]: 
    1146    The ice shelf cavity is opened (\np{ln\_isfcav}\forcode{=.true.} needed). 
    1147    However, the fwf is not computed but specified from file \np{sn\_fwfisf}). 
     1145  \item[\np{nn_isf}{nn\_isf}\forcode{=4}]: 
     1146   The ice shelf cavity is opened (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.} needed). 
     1147   However, the fwf is not computed but specified from file \np{sn_fwfisf}{sn\_fwfisf}). 
    11481148   The heat flux ($Q_h$) is computed as $Q_h = fwf \times L_f$. 
    1149    As in \np{nn\_isf}\forcode{=1}, the fluxes are spread over the top boundary layer thickness (\np{rn\_hisf\_tbl})\\ 
     1149   As in \np{nn_isf}{nn\_isf}\forcode{=1}, the fluxes are spread over the top boundary layer thickness (\np{rn_hisf_tbl}{rn\_hisf\_tbl})\\ 
    11501150\end{description} 
    11511151 
    1152 $\bullet$ \np{nn\_isf}\forcode{=1} and \np{nn\_isf}\forcode{=2} compute a melt rate based on 
     1152$\bullet$ \np{nn_isf}{nn\_isf}\forcode{=1} and \np{nn_isf}{nn\_isf}\forcode{=2} compute a melt rate based on 
    11531153the water mass properties, ocean velocities and depth. 
    11541154This flux is thus highly dependent of the model resolution (horizontal and vertical), 
    11551155realism of the water masses onto the shelf ...\\ 
    11561156 
    1157 $\bullet$ \np{nn\_isf}\forcode{=3} and \np{nn\_isf}\forcode{=4} read the melt rate from a file. 
     1157$\bullet$ \np{nn_isf}{nn\_isf}\forcode{=3} and \np{nn_isf}{nn\_isf}\forcode{=4} read the melt rate from a file. 
    11581158You have total control of the fwf forcing. 
    11591159This can be useful if the water masses on the shelf are not realistic or 
     
    11721172  \caption[Ice shelf location and fresh water flux definition]{ 
    11731173    Illustration of the location where the fwf is injected and 
    1174     whether or not the fwf is interactif or not depending of \protect\np{nn\_isf}.} 
     1174    whether or not the fwf is interactif or not depending of \protect\np{nn_isf}{nn\_isf}.} 
    11751175  \label{fig:SBC_isf} 
    11761176\end{figure} 
     
    12041204\end{description} 
    12051205 
    1206 If \np{ln\_iscpl}\forcode{=.true.}, the isf draft is assume to be different at each restart step with 
     1206If \np{ln_iscpl}{ln\_iscpl}\forcode{=.true.}, the isf draft is assume to be different at each restart step with 
    12071207potentially some new wet/dry cells due to the ice sheet dynamics/thermodynamics. 
    12081208The wetting and drying scheme applied on the restart is very simple and described below for the 6 different possible cases: 
     
    12311231the restart time step is prescribed to be an euler time step instead of a leap frog and $fields_b = fields_n$.\\ 
    12321232 
    1233 The horizontal extrapolation to fill new cell with realistic value is called \np{nn\_drown} times. 
    1234 It means that if the grounding line retreat by more than \np{nn\_drown} cells between 2 coupling steps, 
     1233The horizontal extrapolation to fill new cell with realistic value is called \np{nn_drown}{nn\_drown} times. 
     1234It means that if the grounding line retreat by more than \np{nn_drown}{nn\_drown} cells between 2 coupling steps, 
    12351235the code will be unable to fill all the new wet cells properly. 
    12361236The default number is set up for the MISOMIP idealised experiments. 
     
    12401240 
    12411241In order to remove the trend and keep the conservation level as close to 0 as possible, 
    1242 a simple conservation scheme is available with \np{ln\_hsb}\forcode{=.true.}. 
     1242a simple conservation scheme is available with \np{ln_hsb}{ln\_hsb}\forcode{=.true.}. 
    12431243The heat/salt/vol. gain/loss is diagnosed, as well as the location. 
    1244 A correction increment is computed and apply each time step during the next \np{rn\_fiscpl} time steps. 
    1245 For safety, it is advised to set \np{rn\_fiscpl} equal to the coupling period (smallest increment possible). 
     1244A correction increment is computed and apply each time step during the next \np{rn_fiscpl}{rn\_fiscpl} time steps. 
     1245For safety, it is advised to set \np{rn_fiscpl}{rn\_fiscpl} equal to the coupling period (smallest increment possible). 
    12461246The corrective increment is apply into the cell itself (if it is a wet cell), the neigbouring cells or the closest wet cell (if the cell is now dry). 
    12471247 
     
    12661266(Note that the authors kindly provided a copy of their code to act as a basis for implementation in \NEMO). 
    12671267Icebergs are initially spawned into one of ten classes which have specific mass and thickness as 
    1268 described in the \nam{berg} namelist: \np{rn\_initial\_mass} and \np{rn\_initial\_thickness}. 
    1269 Each class has an associated scaling (\np{rn\_mass\_scaling}), 
     1268described in the \nam{berg} namelist: \np{rn_initial_mass}{rn\_initial\_mass} and \np{rn_initial_thickness}{rn\_initial\_thickness}. 
     1269Each class has an associated scaling (\np{rn_mass_scaling}{rn\_mass\_scaling}), 
    12701270which is an integer representing how many icebergs of this class are being described as one lagrangian point 
    12711271(this reduces the numerical problem of tracking every single iceberg). 
    1272 They are enabled by setting \np{ln\_icebergs}\forcode{=.true.}. 
     1272They are enabled by setting \np{ln_icebergs}{ln\_icebergs}\forcode{=.true.}. 
    12731273 
    12741274Two initialisation schemes are possible. 
    12751275\begin{description} 
    1276 \item[\np{nn\_test\_icebergs}~$>$~0] 
    1277   In this scheme, the value of \np{nn\_test\_icebergs} represents the class of iceberg to generate 
    1278   (so between 1 and 10), and \np{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of 
     1276\item[\np{nn_test_icebergs}{nn\_test\_icebergs}~$>$~0] 
     1277  In this scheme, the value of \np{nn_test_icebergs}{nn\_test\_icebergs} represents the class of iceberg to generate 
     1278  (so between 1 and 10), and \np{nn_test_icebergs}{nn\_test\_icebergs} provides a lon/lat box in the domain at each grid point of 
    12791279  which an iceberg is generated at the beginning of the run. 
    1280   (Note that this happens each time the timestep equals \np{nn\_nit000}.) 
    1281   \np{nn\_test\_icebergs} is defined by four numbers in \np{nn\_test\_box} representing the corners of 
     1280  (Note that this happens each time the timestep equals \np{nn_nit000}{nn\_nit000}.) 
     1281  \np{nn_test_icebergs}{nn\_test\_icebergs} is defined by four numbers in \np{nn_test_box}{nn\_test\_box} representing the corners of 
    12821282  the geographical box: lonmin,lonmax,latmin,latmax 
    1283 \item[\np{nn\_test\_icebergs}\forcode{=-1}] 
    1284   In this scheme, the model reads a calving file supplied in the \np{sn\_icb} parameter. 
     1283\item[\np{nn_test_icebergs}{nn\_test\_icebergs}\forcode{=-1}] 
     1284  In this scheme, the model reads a calving file supplied in the \np{sn_icb}{sn\_icb} parameter. 
    12851285  This should be a file with a field on the configuration grid (typically ORCA) 
    12861286  representing ice accumulation rate at each model point. 
     
    12971297The latter act to disintegrate the iceberg. 
    12981298This is either all melted freshwater, 
    1299 or (if \np{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 
     1299or (if \np{rn_bits_erosion_fraction}{rn\_bits\_erosion\_fraction}~$>$~0) into melt and additionally small ice bits 
    13001300which are assumed to propagate with their larger parent and thus delay fluxing into the ocean. 
    13011301Melt water (and other variables on the configuration grid) are written into the main \NEMO\ model output files. 
     
    13031303Extensive diagnostics can be produced. 
    13041304Separate output files are maintained for human-readable iceberg information. 
    1305 A separate file is produced for each processor (independent of \np{ln\_ctl}). 
     1305A separate file is produced for each processor (independent of \np{ln_ctl}{ln\_ctl}). 
    13061306The amount of information is controlled by two integer parameters: 
    13071307\begin{description} 
    1308 \item[\np{nn\_verbose\_level}] takes a value between one and four and 
     1308\item[\np{nn_verbose_level}{nn\_verbose\_level}] takes a value between one and four and 
    13091309  represents an increasing number of points in the code at which variables are written, 
    13101310  and an increasing level of obscurity. 
    1311 \item[\np{nn\_verbose\_write}] is the number of timesteps between writes 
     1311\item[\np{nn_verbose_write}{nn\_verbose\_write}] is the number of timesteps between writes 
    13121312\end{description} 
    13131313 
    1314 Iceberg trajectories can also be written out and this is enabled by setting \np{nn\_sample\_rate}~$>$~0. 
     1314Iceberg trajectories can also be written out and this is enabled by setting \np{nn_sample_rate}{nn\_sample\_rate}~$>$~0. 
    13151315A non-zero value represents how many timesteps between writes of information into the output file. 
    13161316These output files are in NETCDF format. 
     
    13251325%        Interactions with waves (sbcwave.F90, ln_wave) 
    13261326% ============================================================================================================= 
    1327 \section[Interactions with waves (\textit{sbcwave.F90}, \forcode{ln_wave})]{Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln\_wave})} 
     1327\section[Interactions with waves (\textit{sbcwave.F90}, \forcode{ln_wave})]{Interactions with waves (\protect\mdl{sbcwave}, \protect\np{ln_wave}{ln\_wave})} 
    13281328\label{sec:SBC_wave} 
    13291329%------------------------------------------namsbc_wave-------------------------------------------------------- 
     
    13431343 
    13441344Physical processes related to ocean surface waves can be accounted by setting the logical variable 
    1345 \np{ln\_wave}\forcode{=.true.} in \nam{sbc} namelist. In addition, specific flags accounting for 
     1345\np{ln_wave}{ln\_wave}\forcode{=.true.} in \nam{sbc} namelist. In addition, specific flags accounting for 
    13461346different processes should be activated as explained in the following sections. 
    13471347 
    13481348Wave fields can be provided either in forced or coupled mode: 
    13491349\begin{description} 
    1350 \item[forced mode]: wave fields should be defined through the \nam{sbc\_wave} namelist 
     1350\item[forced mode]: wave fields should be defined through the \nam{sbc_wave}{sbc\_wave} namelist 
    13511351for external data names, locations, frequency, interpolation and all the miscellanous options allowed by 
    13521352Input Data generic Interface (see \autoref{sec:SBC_input}). 
    1353 \item[coupled mode]: \NEMO\ and an external wave model can be coupled by setting \np{ln\_cpl} \forcode{= .true.} 
    1354 in \nam{sbc} namelist and filling the \nam{sbc\_cpl} namelist. 
     1353\item[coupled mode]: \NEMO\ and an external wave model can be coupled by setting \np{ln_cpl}{ln\_cpl} \forcode{= .true.} 
     1354in \nam{sbc} namelist and filling the \nam{sbc_cpl}{sbc\_cpl} namelist. 
    13551355\end{description} 
    13561356 
     
    13601360 
    13611361% ---------------------------------------------------------------- 
    1362 \subsection[Neutral drag coefficient from wave model (\forcode{ln_cdgw})]{Neutral drag coefficient from wave model (\protect\np{ln\_cdgw})} 
     1362\subsection[Neutral drag coefficient from wave model (\forcode{ln_cdgw})]{Neutral drag coefficient from wave model (\protect\np{ln_cdgw}{ln\_cdgw})} 
    13631363\label{subsec:SBC_wave_cdgw} 
    13641364 
    13651365The neutral surface drag coefficient provided from an external data source (\ie\ a wave model), 
    1366 can be used by setting the logical variable \np{ln\_cdgw} \forcode{= .true.} in \nam{sbc} namelist. 
     1366can be used by setting the logical variable \np{ln_cdgw}{ln\_cdgw} \forcode{= .true.} in \nam{sbc} namelist. 
    13671367Then using the routine \rou{sbcblk\_algo\_ncar} and starting from the neutral drag coefficent provided, 
    13681368the drag coefficient is computed according to the stable/unstable conditions of the 
     
    13731373% 3D Stokes Drift (ln_sdw, nn_sdrift) 
    13741374% ---------------------------------------------------------------- 
    1375 \subsection[3D Stokes Drift (\forcode{ln_sdw}, \forcode{nn_sdrift})]{3D Stokes Drift (\protect\np{ln\_sdw, nn\_sdrift})} 
     1375\subsection[3D Stokes Drift (\forcode{ln_sdw} \& \forcode{nn_sdrift})]{3D Stokes Drift (\protect\np{ln_sdw}{ln\_sdw} \& \np{nn_sdrift}{nn\_sdrift})} 
    13761376\label{subsec:SBC_wave_sdw} 
    13771377 
     
    14021402To simplify, it is customary to use approximations to the full Stokes profile. 
    14031403Three possible parameterizations for the calculation for the approximate Stokes drift velocity profile 
    1404 are included in the code through the \np{nn\_sdrift} parameter once provided the surface Stokes drift 
     1404are included in the code through the \np{nn_sdrift}{nn\_sdrift} parameter once provided the surface Stokes drift 
    14051405$\mathbf{U}_{st |_{z=0}}$ which is evaluated by an external wave model that accurately reproduces the wave spectra 
    14061406and makes possible the estimation of the surface Stokes drift for random directional waves in 
     
    14081408 
    14091409\begin{description} 
    1410 \item[\np{nn\_sdrift} = 0]: exponential integral profile parameterization proposed by 
     1410\item[\np{nn_sdrift}{nn\_sdrift} = 0]: exponential integral profile parameterization proposed by 
    14111411\citet{breivik.janssen.ea_JPO14}: 
    14121412 
     
    14271427where $H_s$ is the significant wave height and $\omega$ is the wave frequency. 
    14281428 
    1429 \item[\np{nn\_sdrift} = 1]: velocity profile based on the Phillips spectrum which is considered to be a 
     1429\item[\np{nn_sdrift}{nn\_sdrift} = 1]: velocity profile based on the Phillips spectrum which is considered to be a 
    14301430reasonable estimate of the part of the spectrum mostly contributing to the Stokes drift velocity near the surface 
    14311431\citep{breivik.bidlot.ea_OM16}: 
     
    14391439where $erf$ is the complementary error function and $k_p$ is the peak wavenumber. 
    14401440 
    1441 \item[\np{nn\_sdrift} = 2]: velocity profile based on the Phillips spectrum as for \np{nn\_sdrift} = 1 
     1441\item[\np{nn_sdrift}{nn\_sdrift} = 2]: velocity profile based on the Phillips spectrum as for \np{nn_sdrift}{nn\_sdrift} = 1 
    14421442but using the wave frequency from a wave model. 
    14431443 
     
    14691469% Stokes-Coriolis term (ln_stcor) 
    14701470% ---------------------------------------------------------------- 
    1471 \subsection[Stokes-Coriolis term (\forcode{ln_stcor})]{Stokes-Coriolis term (\protect\np{ln\_stcor})} 
     1471\subsection[Stokes-Coriolis term (\forcode{ln_stcor})]{Stokes-Coriolis term (\protect\np{ln_stcor}{ln\_stcor})} 
    14721472\label{subsec:SBC_wave_stcor} 
    14731473 
     
    14771477In order to include this term, once evaluated the Stokes drift (using one of the 3 possible 
    14781478approximations described in \autoref{subsec:SBC_wave_sdw}), 
    1479 \np{ln\_stcor}\forcode{=.true.} has to be set. 
     1479\np{ln_stcor}{ln\_stcor}\forcode{=.true.} has to be set. 
    14801480 
    14811481 
     
    14831483% Waves modified stress (ln_tauwoc, ln_tauw) 
    14841484% ---------------------------------------------------------------- 
    1485 \subsection[Wave modified stress (\forcode{ln_tauwoc} \& \forcode{ln_tauw})]{Wave modified sress (\protect\np{ln\_tauwoc, ln\_tauw})} 
     1485\subsection[Wave modified stress (\forcode{ln_tauwoc} \& \forcode{ln_tauw})]{Wave modified sress (\protect\np{ln_tauwoc}{ln\_tauwoc} \& \np{ln_tauw}{ln\_tauw})} 
    14861486\label{subsec:SBC_wave_tauw} 
    14871487 
     
    15171517 
    15181518The wave stress derived from an external wave model can be provided either through the normalized 
    1519 wave stress into the ocean by setting \np{ln\_tauwoc}\forcode{=.true.}, or through the zonal and 
    1520 meridional stress components by setting \np{ln\_tauw}\forcode{=.true.}. 
     1519wave stress into the ocean by setting \np{ln_tauwoc}{ln\_tauwoc}\forcode{=.true.}, or through the zonal and 
     1520meridional stress components by setting \np{ln_tauw}{ln\_tauw}\forcode{=.true.}. 
    15211521 
    15221522 
     
    15611561assuming that the diurnal cycle of SWF is a scaling of the top of the atmosphere diurnal cycle of incident SWF. 
    15621562The \cite{bernie.guilyardi.ea_CD07} reconstruction algorithm is available in \NEMO\ by 
    1563 setting \np{ln\_dm2dc}\forcode{=.true.} (a \textit{\nam{sbc}} namelist variable) when 
    1564 using a bulk formulation (\np{ln\_blk}\forcode{=.true.}) or 
    1565 the flux formulation (\np{ln\_flx}\forcode{=.true.}). 
     1563setting \np{ln_dm2dc}{ln\_dm2dc}\forcode{=.true.} (a \textit{\nam{sbc}} namelist variable) when 
     1564using a bulk formulation (\np{ln_blk}{ln\_blk}\forcode{=.true.}) or 
     1565the flux formulation (\np{ln_flx}{ln\_flx}\forcode{=.true.}). 
    15661566The reconstruction is performed in the \mdl{sbcdcy} module. 
    15671567The detail of the algoritm used can be found in the appendix~A of \cite{bernie.guilyardi.ea_CD07}. 
     
    15691569a given time step is the mean value of the analytical cycle over this time step (\autoref{fig:SBC_diurnal}). 
    15701570The use of diurnal cycle reconstruction requires the input SWF to be daily 
    1571 (\ie\ a frequency of 24 hours and a time interpolation set to true in \np{sn\_qsr} namelist parameter). 
     1571(\ie\ a frequency of 24 hours and a time interpolation set to true in \np{sn_qsr}{sn\_qsr} namelist parameter). 
    15721572Furthermore, it is recommended to have a least 8 surface module time steps per day, 
    15731573that is  $\rdt \ nn\_fsbc < 10,800~s = 3~h$. 
     
    15981598\label{subsec:SBC_rotation} 
    15991599 
    1600 When using a flux (\np{ln\_flx}\forcode{=.true.}) or bulk (\np{ln\_blk}\forcode{=.true.}) formulation, 
     1600When using a flux (\np{ln_flx}{ln\_flx}\forcode{=.true.}) or bulk (\np{ln_blk}{ln\_blk}\forcode{=.true.}) formulation, 
    16011601pairs of vector components can be rotated from east-north directions onto the local grid directions. 
    16021602This is particularly useful when interpolation on the fly is used since here any vectors are likely to 
     
    16261626%------------------------------------------------------------------------------------------------------------- 
    16271627 
    1628 Options are defined through the \nam{sbc\_ssr} namelist variables. 
    1629 On forced mode using a flux formulation (\np{ln\_flx}\forcode{=.true.}), 
     1628Options are defined through the \nam{sbc_ssr}{sbc\_ssr} namelist variables. 
     1629On forced mode using a flux formulation (\np{ln_flx}{ln\_flx}\forcode{=.true.}), 
    16301630a feedback term \emph{must} be added to the surface heat flux $Q_{ns}^o$: 
    16311631\[ 
     
    16681668The presence at the sea surface of an ice covered area modifies all the fluxes transmitted to the ocean. 
    16691669There are several way to handle sea-ice in the system depending on 
    1670 the value of the \np{nn\_ice} namelist parameter found in \nam{sbc} namelist. 
     1670the value of the \np{nn_ice}{nn\_ice} namelist parameter found in \nam{sbc} namelist. 
    16711671\begin{description} 
    16721672\item[nn\_ice = 0] 
     
    17181718or alternatively when \NEMO\ is coupled to the HadGAM3 atmosphere model 
    17191719(with \textit{calc\_strair}\forcode{=.false.} and \textit{calc\_Tsfc}\forcode{=false}). 
    1720 The code is intended to be used with \np{nn\_fsbc} set to 1 
     1720The code is intended to be used with \np{nn_fsbc}{nn\_fsbc} set to 1 
    17211721(although coupling ocean and ice less frequently should work, 
    17221722it is possible the calculation of some of the ocean-ice fluxes needs to be modified slightly - 
     
    17461746 
    17471747\begin{description} 
    1748 \item[\np{nn\_fwb}\forcode{=0}] 
     1748\item[\np{nn_fwb}{nn\_fwb}\forcode{=0}] 
    17491749  no control at all. 
    17501750  The mean sea level is free to drift, and will certainly do so. 
    1751 \item[\np{nn\_fwb}\forcode{=1}] 
     1751\item[\np{nn_fwb}{nn\_fwb}\forcode{=1}] 
    17521752  global mean \textit{emp} set to zero at each model time step. 
    17531753  %GS: comment below still relevant ? 
    17541754  %Note that with a sea-ice model, this technique only controls the mean sea level with linear free surface and no mass flux between ocean and ice (as it is implemented in the current ice-ocean coupling). 
    1755 \item[\np{nn\_fwb}\forcode{=2}] 
     1755\item[\np{nn_fwb}{nn\_fwb}\forcode{=2}] 
    17561756  freshwater budget is adjusted from the previous year annual mean budget which 
    17571757  is read in the \textit{EMPave\_old.dat} file. 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_STO.tex

    r11567 r11577  
    154154 
    155155(\rou{sto\_rst\_write}) writes a restart file 
    156 (which suffix name is given by \np{cn\_storst\_out} namelist parameter) containing the current value of 
     156(which suffix name is given by \np{cn_storst_out}{cn\_storst\_out} namelist parameter) containing the current value of 
    157157all autoregressive processes to allow creating the file needed for a restart. 
    158158This restart file also contains the current state of the random number generator. 
    159 When \np{ln\_rststo} is set to \forcode{.true.}), 
    160 the restart file (which suffix name is given by \np{cn\_storst\_in} namelist parameter) is read by 
     159When \np{ln_rststo}{ln\_rststo} is set to \forcode{.true.}), 
     160the restart file (which suffix name is given by \np{cn_storst_in}{cn\_storst\_in} namelist parameter) is read by 
    161161the initialization routine (\rou{sto\_par\_init}). 
    162162The simulation will continue exactly as if it was not interrupted only 
    163 when \np{ln\_rstseed} is set to \forcode{.true.}, 
     163when \np{ln_rstseed}{ln\_rstseed} is set to \forcode{.true.}, 
    164164\ie\ when the state of the random number generator is read in the restart file.\\ 
    165165 
     
    170170Options and parameters \\ 
    171171 
    172 The \np{ln\_sto\_eos} namelist variable activates stochastic parametrisation of equation of state. 
     172The \np{ln_sto_eos}{ln\_sto\_eos} namelist variable activates stochastic parametrisation of equation of state. 
    173173By default it set to \forcode{.false.}) and not active. 
    174174The set of parameters is available in \nam{sto} namelist 
     
    186186 
    187187\begin{description} 
    188 \item[\np{nn\_sto\_eos}:]   number of independent random walks 
    189 \item[\np{rn\_eos\_stdxy}:] random walk horizontal standard deviation (in grid points) 
    190 \item[\np{rn\_eos\_stdz}:]  random walk vertical standard deviation (in grid points) 
    191 \item[\np{rn\_eos\_tcor}:]  random walk time correlation (in timesteps) 
    192 \item[\np{nn\_eos\_ord}:]   order of autoregressive processes 
    193 \item[\np{nn\_eos\_flt}:]   passes of Laplacian filter 
    194 \item[\np{rn\_eos\_lim}:]   limitation factor (default = 3.0) 
     188\item[\np{nn_sto_eos}{nn\_sto\_eos}:]   number of independent random walks 
     189\item[\np{rn_eos_stdxy}{rn\_eos\_stdxy}:] random walk horizontal standard deviation (in grid points) 
     190\item[\np{rn_eos_stdz}{rn\_eos\_stdz}:]  random walk vertical standard deviation (in grid points) 
     191\item[\np{rn_eos_tcor}{rn\_eos\_tcor}:]  random walk time correlation (in timesteps) 
     192\item[\np{nn_eos_ord}{nn\_eos\_ord}:]   order of autoregressive processes 
     193\item[\np{nn_eos_flt}{nn\_eos\_flt}:]   passes of Laplacian filter 
     194\item[\np{rn_eos_lim}{rn\_eos\_lim}:]   limitation factor (default = 3.0) 
    195195\end{description} 
    196196 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_TRA.tex

    r11571 r11577  
    5555 
    5656The user has the option of extracting each tendency term on the RHS of the tracer equation for output 
    57 (\np{ln\_tra\_trd} or \np{ln\_tra\_mxl}\forcode{=.true.}), as described in \autoref{chap:DIA}. 
     57(\np{ln_tra_trd}{ln\_tra\_trd} or \np{ln_tra_mxl}{ln\_tra\_mxl}\forcode{=.true.}), as described in \autoref{chap:DIA}. 
    5858 
    5959% ================================================================ 
     
    7171%------------------------------------------------------------------------------------------------------------- 
    7272 
    73 When considered (\ie\ when \np{ln\_traadv\_OFF} is not set to \forcode{.true.}), 
     73When considered (\ie\ when \np{ln_traadv_OFF}{ln\_traadv\_OFF} is not set to \forcode{.true.}), 
    7474the advection tendency of a tracer is expressed in flux form, 
    7575\ie\ as the divergence of the advective fluxes. 
     
    8585Indeed, it is obtained by using the following equality: $\nabla \cdot (\vect U \, T) = \vect U \cdot \nabla T$ which 
    8686results from the use of the continuity equation, $\partial_t e_3 + e_3 \; \nabla \cdot \vect U = 0$ 
    87 (which reduces to $\nabla \cdot \vect U = 0$ in linear free surface, \ie\ \np{ln\_linssh}\forcode{=.true.}). 
     87(which reduces to $\nabla \cdot \vect U = 0$ in linear free surface, \ie\ \np{ln_linssh}{ln\_linssh}\forcode{=.true.}). 
    8888Therefore it is of paramount importance to design the discrete analogue of the advection tendency so that 
    8989it is consistent with the continuity equation in order to enforce the conservation properties of 
     
    121121\begin{description} 
    122122\item[linear free surface:] 
    123   (\np{ln\_linssh}\forcode{=.true.}) 
     123  (\np{ln_linssh}{ln\_linssh}\forcode{=.true.}) 
    124124  the first level thickness is constant in time: 
    125125  the vertical boundary condition is applied at the fixed surface $z = 0$ rather than on 
     
    129129  the first level tracer value. 
    130130\item[non-linear free surface:] 
    131   (\np{ln\_linssh}\forcode{=.false.}) 
     131  (\np{ln_linssh}{ln\_linssh}\forcode{=.false.}) 
    132132  convergence/divergence in the first ocean level moves the free surface up/down. 
    133133  There is no tracer advection through it so that the advective fluxes through the surface are also zero. 
     
    150150Conservative Laws scheme (MUSCL), a $3^{rd}$ Upstream Biased Scheme (UBS, also often called UP3), 
    151151and a Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms scheme (QUICKEST). 
    152 The choice is made in the \nam{tra\_adv} namelist, by setting to \forcode{.true.} one of 
     152The choice is made in the \nam{tra_adv}{tra\_adv} namelist, by setting to \forcode{.true.} one of 
    153153the logicals \textit{ln\_traadv\_xxx}. 
    154154The corresponding code can be found in the \textit{traadv\_xxx.F90} module, where 
     
    185185%        2nd and 4th order centred schemes 
    186186% ------------------------------------------------------------------------------------------------------------- 
    187 \subsection[CEN: Centred scheme (\forcode{ln_traadv_cen})]{CEN: Centred scheme (\protect\np{ln\_traadv\_cen})} 
     187\subsection[CEN: Centred scheme (\forcode{ln_traadv_cen})]{CEN: Centred scheme (\protect\np{ln_traadv_cen}{ln\_traadv\_cen})} 
    188188\label{subsec:TRA_adv_cen} 
    189189 
    190190%        2nd order centred scheme 
    191191 
    192 The centred advection scheme (CEN) is used when \np{ln\_traadv\_cen}\forcode{=.true.}. 
     192The centred advection scheme (CEN) is used when \np{ln_traadv_cen}{ln\_traadv\_cen}\forcode{=.true.}. 
    193193Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by 
    194 setting \np{nn\_cen\_h} and \np{nn\_cen\_v} to $2$ or $4$. 
     194setting \np{nn_cen_h}{nn\_cen\_h} and \np{nn_cen_v}{nn\_cen\_v} to $2$ or $4$. 
    195195CEN implementation can be found in the \mdl{traadv\_cen} module. 
    196196 
     
    222222  \tau_u^{cen4} = \overline{T - \frac{1}{6} \, \delta_i \Big[ \delta_{i + 1/2}[T] \, \Big]}^{\,i + 1/2} 
    223223\end{equation} 
    224 In the vertical direction (\np{nn\_cen\_v}\forcode{=4}), 
     224In the vertical direction (\np{nn_cen_v}{nn\_cen\_v}\forcode{=4}), 
    225225a $4^{th}$ COMPACT interpolation has been prefered \citep{demange_phd14}. 
    226226In the COMPACT scheme, both the field and its derivative are interpolated, which leads, after a matrix inversion, 
     
    252252%        FCT scheme 
    253253% ------------------------------------------------------------------------------------------------------------- 
    254 \subsection[FCT: Flux Corrected Transport scheme (\forcode{ln_traadv_fct})]{FCT: Flux Corrected Transport scheme (\protect\np{ln\_traadv\_fct})} 
     254\subsection[FCT: Flux Corrected Transport scheme (\forcode{ln_traadv_fct})]{FCT: Flux Corrected Transport scheme (\protect\np{ln_traadv_fct}{ln\_traadv\_fct})} 
    255255\label{subsec:TRA_adv_tvd} 
    256256 
    257 The Flux Corrected Transport schemes (FCT) is used when \np{ln\_traadv\_fct}\forcode{=.true.}. 
     257The Flux Corrected Transport schemes (FCT) is used when \np{ln_traadv_fct}{ln\_traadv\_fct}\forcode{=.true.}. 
    258258Its order ($2^{nd}$ or $4^{th}$) can be chosen independently on horizontal (iso-level) and vertical direction by 
    259 setting \np{nn\_fct\_h} and \np{nn\_fct\_v} to $2$ or $4$. 
     259setting \np{nn_fct_h}{nn\_fct\_h} and \np{nn_fct_v}{nn\_fct\_v} to $2$ or $4$. 
    260260FCT implementation can be found in the \mdl{traadv\_fct} module. 
    261261 
     
    277277where $c_u$ is a flux limiter function taking values between 0 and 1. 
    278278The FCT order is the one of the centred scheme used 
    279 (\ie\ it depends on the setting of \np{nn\_fct\_h} and \np{nn\_fct\_v}). 
     279(\ie\ it depends on the setting of \np{nn_fct_h}{nn\_fct\_h} and \np{nn_fct_v}{nn\_fct\_v}). 
    280280There exist many ways to define $c_u$, each corresponding to a different FCT scheme. 
    281281The one chosen in \NEMO\ is described in \citet{zalesak_JCP79}. 
     
    295295%        MUSCL scheme 
    296296% ------------------------------------------------------------------------------------------------------------- 
    297 \subsection[MUSCL: Monotone Upstream Scheme for Conservative Laws (\forcode{ln_traadv_mus})]{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln\_traadv\_mus})} 
     297\subsection[MUSCL: Monotone Upstream Scheme for Conservative Laws (\forcode{ln_traadv_mus})]{MUSCL: Monotone Upstream Scheme for Conservative Laws (\protect\np{ln_traadv_mus}{ln\_traadv\_mus})} 
    298298\label{subsec:TRA_adv_mus} 
    299299 
    300 The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln\_traadv\_mus}\forcode{=.true.}. 
     300The Monotone Upstream Scheme for Conservative Laws (MUSCL) is used when \np{ln_traadv_mus}{ln\_traadv\_mus}\forcode{=.true.}. 
    301301MUSCL implementation can be found in the \mdl{traadv\_mus} module. 
    302302 
     
    326326This choice ensure the \textit{positive} character of the scheme. 
    327327In addition, fluxes round a grid-point where a runoff is applied can optionally be computed using upstream fluxes 
    328 (\np{ln\_mus\_ups}\forcode{=.true.}). 
     328(\np{ln_mus_ups}{ln\_mus\_ups}\forcode{=.true.}). 
    329329 
    330330% ------------------------------------------------------------------------------------------------------------- 
    331331%        UBS scheme 
    332332% ------------------------------------------------------------------------------------------------------------- 
    333 \subsection[UBS a.k.a. UP3: Upstream-Biased Scheme (\forcode{ln_traadv_ubs})]{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln\_traadv\_ubs})} 
     333\subsection[UBS a.k.a. UP3: Upstream-Biased Scheme (\forcode{ln_traadv_ubs})]{UBS a.k.a. UP3: Upstream-Biased Scheme (\protect\np{ln_traadv_ubs}{ln\_traadv\_ubs})} 
    334334\label{subsec:TRA_adv_ubs} 
    335335 
    336 The Upstream-Biased Scheme (UBS) is used when \np{ln\_traadv\_ubs}\forcode{=.true.}. 
     336The Upstream-Biased Scheme (UBS) is used when \np{ln_traadv_ubs}{ln\_traadv\_ubs}\forcode{=.true.}. 
    337337UBS implementation can be found in the \mdl{traadv\_mus} module. 
    338338 
     
    364364\citep{shchepetkin.mcwilliams_OM05, demange_phd14}. 
    365365Therefore the vertical flux is evaluated using either a $2^nd$ order FCT scheme or a $4^th$ order COMPACT scheme 
    366 (\np{nn\_ubs\_v}\forcode{=2 or 4}). 
     366(\np{nn_ubs_v}{nn\_ubs\_v}\forcode{=2 or 4}). 
    367367 
    368368For stability reasons (see \autoref{chap:TD}), the first term  in \autoref{eq:TRA_adv_ubs} 
     
    403403%        QCK scheme 
    404404% ------------------------------------------------------------------------------------------------------------- 
    405 \subsection[QCK: QuiCKest scheme (\forcode{ln_traadv_qck})]{QCK: QuiCKest scheme (\protect\np{ln\_traadv\_qck})} 
     405\subsection[QCK: QuiCKest scheme (\forcode{ln_traadv_qck})]{QCK: QuiCKest scheme (\protect\np{ln_traadv_qck}{ln\_traadv\_qck})} 
    406406\label{subsec:TRA_adv_qck} 
    407407 
    408408The Quadratic Upstream Interpolation for Convective Kinematics with Estimated Streaming Terms (QUICKEST) scheme 
    409 proposed by \citet{leonard_CMAME79} is used when \np{ln\_traadv\_qck}\forcode{=.true.}. 
     409proposed by \citet{leonard_CMAME79} is used when \np{ln_traadv_qck}{ln\_traadv\_qck}\forcode{=.true.}. 
    410410QUICKEST implementation can be found in the \mdl{traadv\_qck} module. 
    411411 
     
    437437%------------------------------------------------------------------------------------------------------------- 
    438438 
    439 Options are defined through the \nam{tra\_ldf} namelist variables. 
     439Options are defined through the \nam{tra_ldf}{tra\_ldf} namelist variables. 
    440440They are regrouped in four items, allowing to specify 
    441441$(i)$   the type of operator used (none, laplacian, bilaplacian), 
     
    452452except for the pure vertical component that appears when a rotation tensor is used. 
    453453This latter component is solved implicitly together with the vertical diffusion term (see \autoref{chap:TD}). 
    454 When \np{ln\_traldf\_msc}\forcode{=.true.}, a Method of Stabilizing Correction is used in which 
     454When \np{ln_traldf_msc}{ln\_traldf\_msc}\forcode{=.true.}, a Method of Stabilizing Correction is used in which 
    455455the pure vertical component is split into an explicit and an implicit part \citep{lemarie.debreu.ea_OM12}. 
    456456 
     
    458458%        Type of operator 
    459459% ------------------------------------------------------------------------------------------------------------- 
    460 \subsection[Type of operator (\forcode{ln_traldf_}\{\forcode{OFF,lap,blp}\})]{Type of operator (\protect\np{ln\_traldf\_OFF}, \protect\np{ln\_traldf\_lap}, or \protect\np{ln\_traldf\_blp})} 
     460\subsection[Type of operator (\forcode{ln_traldf_}\{\forcode{OFF,lap,blp}\})]{Type of operator (\protect\np{ln_traldf_OFF}{ln\_traldf\_OFF}, \protect\np{ln_traldf_lap}{ln\_traldf\_lap}, or \protect\np{ln_traldf_blp}{ln\_traldf\_blp})} 
    461461\label{subsec:TRA_ldf_op} 
    462462 
     
    464464 
    465465\begin{description} 
    466 \item[\np{ln\_traldf\_OFF}\forcode{=.true.}:] 
     466\item[\np{ln_traldf_OFF}{ln\_traldf\_OFF}\forcode{=.true.}:] 
    467467  no operator selected, the lateral diffusive tendency will not be applied to the tracer equation. 
    468468  This option can be used when the selected advection scheme is diffusive enough (MUSCL scheme for example). 
    469 \item[\np{ln\_traldf\_lap}\forcode{=.true.}:] 
     469\item[\np{ln_traldf_lap}{ln\_traldf\_lap}\forcode{=.true.}:] 
    470470  a laplacian operator is selected. 
    471471  This harmonic operator takes the following expression:  $\mathcal{L}(T) = \nabla \cdot A_{ht} \; \nabla T $, 
    472472  where the gradient operates along the selected direction (see \autoref{subsec:TRA_ldf_dir}), 
    473473  and $A_{ht}$ is the eddy diffusivity coefficient expressed in $m^2/s$ (see \autoref{chap:LDF}). 
    474 \item[\np{ln\_traldf\_blp}\forcode{=.true.}]: 
     474\item[\np{ln_traldf_blp}{ln\_traldf\_blp}\forcode{=.true.}]: 
    475475  a bilaplacian operator is selected. 
    476476  This biharmonic operator takes the following expression: 
     
    492492%        Direction of action 
    493493% ------------------------------------------------------------------------------------------------------------- 
    494 \subsection[Action direction (\forcode{ln_traldf_}\{\forcode{lev,hor,iso,triad}\})]{Direction of action (\protect\np{ln\_traldf\_lev}, \protect\np{ln\_traldf\_hor}, \protect\np{ln\_traldf\_iso}, or \protect\np{ln\_traldf\_triad})} 
     494\subsection[Action direction (\forcode{ln_traldf_}\{\forcode{lev,hor,iso,triad}\})]{Direction of action (\protect\np{ln_traldf_lev}{ln\_traldf\_lev}, \protect\np{ln_traldf_hor}{ln\_traldf\_hor}, \protect\np{ln_traldf_iso}{ln\_traldf\_iso}, or \protect\np{ln_traldf_triad}{ln\_traldf\_triad})} 
    495495\label{subsec:TRA_ldf_dir} 
    496496 
    497497The choice of a direction of action determines the form of operator used. 
    498498The operator is a simple (re-entrant) laplacian acting in the (\textbf{i},\textbf{j}) plane when 
    499 iso-level option is used (\np{ln\_traldf\_lev}\forcode{=.true.}) or 
     499iso-level option is used (\np{ln_traldf_lev}{ln\_traldf\_lev}\forcode{=.true.}) or 
    500500when a horizontal (\ie\ geopotential) operator is demanded in \textit{z}-coordinate 
    501 (\np{ln\_traldf\_hor} and \np{ln\_zco}\forcode{=.true.}). 
     501(\np{ln_traldf_hor}{ln\_traldf\_hor} and \np{ln_zco}{ln\_zco}\forcode{=.true.}). 
    502502The associated code can be found in the \mdl{traldf\_lap\_blp} module. 
    503503The operator is a rotated (re-entrant) laplacian when 
    504504the direction along which it acts does not coincide with the iso-level surfaces, 
    505505that is when standard or triad iso-neutral option is used 
    506 (\np{ln\_traldf\_iso} or \np{ln\_traldf\_triad} = \forcode{.true.}, 
     506(\np{ln_traldf_iso}{ln\_traldf\_iso} or \np{ln_traldf_triad}{ln\_traldf\_triad} = \forcode{.true.}, 
    507507see \mdl{traldf\_iso} or \mdl{traldf\_triad} module, resp.), or 
    508508when a horizontal (\ie\ geopotential) operator is demanded in \textit{s}-coordinate 
    509 (\np{ln\_traldf\_hor} and \np{ln\_sco} = \forcode{.true.}) 
     509(\np{ln_traldf_hor}{ln\_traldf\_hor} and \np{ln_sco}{ln\_sco} = \forcode{.true.}) 
    510510\footnote{In this case, the standard iso-neutral operator will be automatically selected}. 
    511511In that case, a rotation is applied to the gradient(s) that appears in the operator so that 
     
    518518%       iso-level operator 
    519519% ------------------------------------------------------------------------------------------------------------- 
    520 \subsection[Iso-level (bi-)laplacian operator (\forcode{ln_traldf_iso})]{Iso-level (bi-)laplacian operator ( \protect\np{ln\_traldf\_iso})} 
     520\subsection[Iso-level (bi-)laplacian operator (\forcode{ln_traldf_iso})]{Iso-level (bi-)laplacian operator ( \protect\np{ln_traldf_iso}{ln\_traldf\_iso})} 
    521521\label{subsec:TRA_ldf_lev} 
    522522 
     
    536536It is a \textit{horizontal} operator (\ie acting along geopotential surfaces) in 
    537537the $z$-coordinate with or without partial steps, but is simply an iso-level operator in the $s$-coordinate. 
    538 It is thus used when, in addition to \np{ln\_traldf\_lap} or \np{ln\_traldf\_blp}\forcode{=.true.}, 
    539 we have \np{ln\_traldf\_lev}\forcode{=.true.} or \np{ln\_traldf\_hor}~=~\np{ln\_zco}\forcode{=.true.}. 
     538It is thus used when, in addition to \np{ln_traldf_lap}{ln\_traldf\_lap} or \np{ln_traldf_blp}{ln\_traldf\_blp}\forcode{=.true.}, 
     539we have \np{ln_traldf_lev}{ln\_traldf\_lev}\forcode{=.true.} or \np{ln_traldf_hor}{ln\_traldf\_hor}~=~\np{ln_zco}{ln\_zco}\forcode{=.true.}. 
    540540In both cases, it significantly contributes to diapycnal mixing. 
    541541It is therefore never recommended, even when using it in the bilaplacian case. 
    542542 
    543 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{=.true.}), 
     543Note that in the partial step $z$-coordinate (\np{ln_zps}{ln\_zps}\forcode{=.true.}), 
    544544tracers in horizontally adjacent cells are located at different depths in the vicinity of the bottom. 
    545545In this case, horizontal derivatives in (\autoref{eq:TRA_ldf_lap}) at the bottom level require a specific treatment. 
     
    573573$r_1$ and $r_2$ are the slopes between the surface of computation ($z$- or $s$-surfaces) and 
    574574the surface along which the diffusion operator acts (\ie\ horizontal or iso-neutral surfaces). 
    575 It is thus used when, in addition to \np{ln\_traldf\_lap}\forcode{=.true.}, 
    576 we have \np{ln\_traldf\_iso}\forcode{=.true.}, 
    577 or both \np{ln\_traldf\_hor}\forcode{=.true.} and \np{ln\_zco}\forcode{=.true.}. 
     575It is thus used when, in addition to \np{ln_traldf_lap}{ln\_traldf\_lap}\forcode{=.true.}, 
     576we have \np{ln_traldf_iso}{ln\_traldf\_iso}\forcode{=.true.}, 
     577or both \np{ln_traldf_hor}{ln\_traldf\_hor}\forcode{=.true.} and \np{ln_zco}{ln\_zco}\forcode{=.true.}. 
    578578The way these slopes are evaluated is given in \autoref{sec:LDF_slp}. 
    579579At the surface, bottom and lateral boundaries, the turbulent fluxes of heat and salt are set to zero using 
     
    591591any additional background horizontal diffusion \citep{guilyardi.madec.ea_CD01}. 
    592592 
    593 Note that in the partial step $z$-coordinate (\np{ln\_zps}\forcode{=.true.}), 
     593Note that in the partial step $z$-coordinate (\np{ln_zps}{ln\_zps}\forcode{=.true.}), 
    594594the horizontal derivatives at the bottom level in \autoref{eq:TRA_ldf_iso} require a specific treatment. 
    595595They are calculated in module zpshde, described in \autoref{sec:TRA_zpshde}. 
     
    597597%&&     Triad rotated (bi-)laplacian operator 
    598598%&&  ------------------------------------------- 
    599 \subsubsection[Triad rotated (bi-)laplacian operator (\forcode{ln_traldf_triad})]{Triad rotated (bi-)laplacian operator (\protect\np{ln\_traldf\_triad})} 
     599\subsubsection[Triad rotated (bi-)laplacian operator (\forcode{ln_traldf_triad})]{Triad rotated (bi-)laplacian operator (\protect\np{ln_traldf_triad}{ln\_traldf\_triad})} 
    600600\label{subsec:TRA_ldf_triad} 
    601601 
    602602An alternative scheme developed by \cite{griffies.gnanadesikan.ea_JPO98} which ensures tracer variance decreases 
    603 is also available in \NEMO\ (\np{ln\_traldf\_triad}\forcode{=.true.}). 
     603is also available in \NEMO\ (\np{ln_traldf_triad}{ln\_traldf\_triad}\forcode{=.true.}). 
    604604A complete description of the algorithm is given in \autoref{apdx:TRIADS}. 
    605605 
     
    619619 
    620620\begin{itemize} 
    621 \item \np{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 
    622 \item \np{rn\_slpmax} = slope limit (both operators) 
    623 \item \np{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 
    624 \item \np{rn\_sw\_triad} $= 1$ switching triad; $= 0$ all 4 triads used (triad only) 
    625 \item \np{ln\_botmix\_triad} = lateral mixing on bottom (triad only) 
     621\item \np{ln_traldf_msc}{ln\_traldf\_msc} = Method of Stabilizing Correction (both operators) 
     622\item \np{rn_slpmax}{rn\_slpmax} = slope limit (both operators) 
     623\item \np{ln_triad_iso}{ln\_triad\_iso} = pure horizontal mixing in ML (triad only) 
     624\item \np{rn_sw_triad}{rn\_sw\_triad} $= 1$ switching triad; $= 0$ all 4 triads used (triad only) 
     625\item \np{ln_botmix_triad}{ln\_botmix\_triad} = lateral mixing on bottom (triad only) 
    626626\end{itemize} 
    627627 
     
    647647respectively. 
    648648Generally, $A_w^{vT} = A_w^{vS}$ except when double diffusive mixing is parameterised 
    649 (\ie\ \np{ln\_zdfddm}\forcode{=.true.},). 
     649(\ie\ \np{ln_zdfddm}{ln\_zdfddm}\forcode{=.true.},). 
    650650The way these coefficients are evaluated is given in \autoref{chap:ZDF} (ZDF). 
    651651Furthermore, when iso-neutral mixing is used, both mixing coefficients are increased by 
     
    722722Such time averaging prevents the divergence of odd and even time step (see \autoref{chap:TD}). 
    723723 
    724 In the linear free surface case (\np{ln\_linssh}\forcode{=.true.}), an additional term has to be added on 
     724In the linear free surface case (\np{ln_linssh}{ln\_linssh}\forcode{=.true.}), an additional term has to be added on 
    725725both temperature and salinity. 
    726726On temperature, this term remove the heat content associated with mass exchange that has been added to $Q_{ns}$. 
     
    756756%-------------------------------------------------------------------------------------------------------------- 
    757757 
    758 Options are defined through the \nam{tra\_qsr} namelist variables. 
    759 When the penetrative solar radiation option is used (\np{ln\_traqsr}\forcode{=.true.}), 
     758Options are defined through the \nam{tra_qsr}{tra\_qsr} namelist variables. 
     759When the penetrative solar radiation option is used (\np{ln_traqsr}{ln\_traqsr}\forcode{=.true.}), 
    760760the solar radiation penetrates the top few tens of meters of the ocean. 
    761 If it is not used (\np{ln\_traqsr}\forcode{=.false.}) all the heat flux is absorbed in the first ocean level. 
     761If it is not used (\np{ln_traqsr}{ln\_traqsr}\forcode{=.false.}) all the heat flux is absorbed in the first ocean level. 
    762762Thus, in the former case a term is added to the time evolution equation of temperature \autoref{eq:MB_PE_tra_T} and 
    763763the surface boundary condition is modified to take into account only the non-penetrative part of the surface 
     
    782782heating the upper few tens of centimetres. 
    783783The fraction of $Q_{sr}$ that resides in these almost non-penetrative wavebands, $R$, is $\sim 58\%$ 
    784 (specified through namelist parameter \np{rn\_abs}). 
     784(specified through namelist parameter \np{rn_abs}{rn\_abs}). 
    785785It is assumed to penetrate the ocean with a decreasing exponential profile, with an e-folding depth scale, $\xi_0$, 
    786 of a few tens of centimetres (typically $\xi_0 = 0.35~m$ set as \np{rn\_si0} in the \nam{tra\_qsr} namelist). 
     786of a few tens of centimetres (typically $\xi_0 = 0.35~m$ set as \np{rn_si0}{rn\_si0} in the \nam{tra_qsr}{tra\_qsr} namelist). 
    787787For shorter wavelengths (400-700~nm), the ocean is more transparent, and solar energy propagates to 
    788788larger depths where it contributes to local heating. 
    789789The way this second part of the solar energy penetrates into the ocean depends on which formulation is chosen. 
    790 In the simple 2-waveband light penetration scheme (\np{ln\_qsr\_2bd}\forcode{=.true.}) 
     790In the simple 2-waveband light penetration scheme (\np{ln_qsr_2bd}{ln\_qsr\_2bd}\forcode{=.true.}) 
    791791a chlorophyll-independent monochromatic formulation is chosen for the shorter wavelengths, 
    792792leading to the following expression \citep{paulson.simpson_JPO77}: 
     
    796796\] 
    797797where $\xi_1$ is the second extinction length scale associated with the shorter wavelengths. 
    798 It is usually chosen to be 23~m by setting the \np{rn\_si0} namelist parameter. 
     798It is usually chosen to be 23~m by setting the \np{rn_si0}{rn\_si0} namelist parameter. 
    799799The set of default values ($\xi_0, \xi_1, R$) corresponds to a Type I water in Jerlov's (1968) classification 
    800800(oligotrophic waters). 
     
    816816The 2-bands formulation does not reproduce the full model very well. 
    817817 
    818 The RGB formulation is used when \np{ln\_qsr\_rgb}\forcode{=.true.}. 
     818The RGB formulation is used when \np{ln_qsr_rgb}{ln\_qsr\_rgb}\forcode{=.true.}. 
    819819The RGB attenuation coefficients (\ie\ the inverses of the extinction length scales) are tabulated over 
    82082061 nonuniform chlorophyll classes ranging from 0.01 to 10 g.Chl/L 
     
    823823 
    824824\begin{description} 
    825 \item[\np{nn\_chldta}\forcode{=0}] 
     825\item[\np{nn_chldta}{nn\_chldta}\forcode{=0}] 
    826826  a constant 0.05 g.Chl/L value everywhere ; 
    827 \item[\np{nn\_chldta}\forcode{=1}] 
     827\item[\np{nn_chldta}{nn\_chldta}\forcode{=1}] 
    828828  an observed time varying chlorophyll deduced from satellite surface ocean color measurement spread uniformly in 
    829829  the vertical direction; 
    830 \item[\np{nn\_chldta}\forcode{=2}] 
     830\item[\np{nn_chldta}{nn\_chldta}\forcode{=2}] 
    831831  same as previous case except that a vertical profile of chlorophyl is used. 
    832832  Following \cite{morel.berthon_LO89}, the profile is computed from the local surface chlorophyll value; 
    833 \item[\np{ln\_qsr\_bio}\forcode{=.true.}] 
     833\item[\np{ln_qsr_bio}{ln\_qsr\_bio}\forcode{=.true.}] 
    834834  simulated time varying chlorophyll by TOP biogeochemical model. 
    835835  In this case, the RGB formulation is used to calculate both the phytoplankton light limitation in 
     
    868868%        Bottom Boundary Condition 
    869869% ------------------------------------------------------------------------------------------------------------- 
    870 \subsection[Bottom boundary condition (\textit{trabbc.F90}) - \forcode{ln_trabbc})]{Bottom boundary condition (\protect\mdl{trabbc} - \protect\np{ln\_trabbc})} 
     870\subsection[Bottom boundary condition (\textit{trabbc.F90}) - \forcode{ln_trabbc})]{Bottom boundary condition (\protect\mdl{trabbc} - \protect\np{ln_trabbc}{ln\_trabbc})} 
    871871\label{subsec:TRA_bbc} 
    872872%--------------------------------------------nambbc-------------------------------------------------------- 
     
    899899 
    900900Options are defined through the \nam{bbc} namelist variables. 
    901 The presence of geothermal heating is controlled by setting the namelist parameter \np{ln\_trabbc} to true. 
    902 Then, when \np{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose value is given by 
    903 the \np{rn\_geoflx\_cst}, which is also a namelist parameter. 
    904 When \np{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is introduced which is provided in 
     901The presence of geothermal heating is controlled by setting the namelist parameter \np{ln_trabbc}{ln\_trabbc} to true. 
     902Then, when \np{nn_geoflx}{nn\_geoflx} is set to 1, a constant geothermal heating is introduced whose value is given by 
     903the \np{rn_geoflx_cst}{rn\_geoflx\_cst}, which is also a namelist parameter. 
     904When \np{nn_geoflx}{nn\_geoflx} is set to 2, a spatially varying geothermal heat flux is introduced which is provided in 
    905905the \ifile{geothermal\_heating} NetCDF file (\autoref{fig:TRA_geothermal}) \citep{emile-geay.madec_OS09}. 
    906906 
     
    908908% Bottom Boundary Layer 
    909909% ================================================================ 
    910 \section[Bottom boundary layer (\textit{trabbl.F90} - \forcode{ln_trabbl})]{Bottom boundary layer (\protect\mdl{trabbl} - \protect\np{ln\_trabbl})} 
     910\section[Bottom boundary layer (\textit{trabbl.F90} - \forcode{ln_trabbl})]{Bottom boundary layer (\protect\mdl{trabbl} - \protect\np{ln_trabbl}{ln\_trabbl})} 
    911911\label{sec:TRA_bbl} 
    912912%--------------------------------------------nambbl--------------------------------------------------------- 
     
    944944%        Diffusive BBL 
    945945% ------------------------------------------------------------------------------------------------------------- 
    946 \subsection[Diffusive bottom boundary layer (\forcode{nn_bbl_ldf=1})]{Diffusive bottom boundary layer (\protect\np{nn\_bbl\_ldf}\forcode{=1})} 
     946\subsection[Diffusive bottom boundary layer (\forcode{nn_bbl_ldf=1})]{Diffusive bottom boundary layer (\protect\np{nn_bbl_ldf}{nn\_bbl\_ldf}\forcode{=1})} 
    947947\label{subsec:TRA_bbl_diff} 
    948948 
    949 When applying sigma-diffusion (\np{ln\_trabbl}\forcode{=.true.} and \np{nn\_bbl\_ldf} set to 1), 
     949When applying sigma-diffusion (\np{ln_trabbl}{ln\_trabbl}\forcode{=.true.} and \np{nn_bbl_ldf}{nn\_bbl\_ldf} set to 1), 
    950950the diffusive flux between two adjacent cells at the ocean floor is given by 
    951951\[ 
     
    966966      \end{cases} 
    967967\end{equation} 
    968 where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist parameter \np{rn\_ahtbbl} and 
     968where $A_{bbl}$ is the BBL diffusivity coefficient, given by the namelist parameter \np{rn_ahtbbl}{rn\_ahtbbl} and 
    969969usually set to a value much larger than the one used for lateral mixing in the open ocean. 
    970970The constraint in \autoref{eq:TRA_bbl_coef} implies that sigma-like diffusion only occurs when 
     
    983983%        Advective BBL 
    984984% ------------------------------------------------------------------------------------------------------------- 
    985 \subsection[Advective bottom boundary layer (\forcode{nn_bbl_adv=1,2})]{Advective bottom boundary layer (\protect\np{nn\_bbl\_adv}\forcode{=1,2})} 
     985\subsection[Advective bottom boundary layer (\forcode{nn_bbl_adv=1,2})]{Advective bottom boundary layer (\protect\np{nn_bbl_adv}{nn\_bbl\_adv}\forcode{=1,2})} 
    986986\label{subsec:TRA_bbl_adv} 
    987987 
     
    10141014%%%gmcomment   :  this section has to be really written 
    10151015 
    1016 When applying an advective BBL (\np{nn\_bbl\_adv}\forcode{=1..2}), an overturning circulation is added which 
     1016When applying an advective BBL (\np{nn_bbl_adv}{nn\_bbl\_adv}\forcode{=1..2}), an overturning circulation is added which 
    10171017connects two adjacent bottom grid-points only if dense water overlies less dense water on the slope. 
    10181018The density difference causes dense water to move down the slope. 
    10191019 
    1020 \np{nn\_bbl\_adv}\forcode{=1}: 
     1020\np{nn_bbl_adv}{nn\_bbl\_adv}\forcode{=1}: 
    10211021the downslope velocity is chosen to be the Eulerian ocean velocity just above the topographic step 
    10221022(see black arrow in \autoref{fig:TRA_bbl}) \citep{beckmann.doscher_JPO97}. 
     
    10251025if the velocity is directed towards greater depth (\ie\ $\vect U \cdot \nabla H > 0$). 
    10261026 
    1027 \np{nn\_bbl\_adv}\forcode{=2}: 
     1027\np{nn_bbl_adv}{nn\_bbl\_adv}\forcode{=2}: 
    10281028the downslope velocity is chosen to be proportional to $\Delta \rho$, 
    10291029the density difference between the higher cell and lower cell densities \citep{campin.goosse_T99}. 
     
    10361036  u^{tr}_{bbl} = \gamma g \frac{\Delta \rho}{\rho_o} e_{1u} \, min ({e_{3u}}_{kup},{e_{3u}}_{kdwn}) 
    10371037\] 
    1038 where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as \np{rn\_gambbl}, 
     1038where $\gamma$, expressed in seconds, is the coefficient of proportionality provided as \np{rn_gambbl}{rn\_gambbl}, 
    10391039a namelist parameter, and \textit{kup} and \textit{kdwn} are the vertical index of the higher and lower cells, 
    10401040respectively. 
     
    10951095where $\gamma$ is the inverse of a time scale, and $T_o$ and $S_o$ are given temperature and salinity fields 
    10961096(usually a climatology). 
    1097 Options are defined through the  \nam{tra\_dmp} namelist variables. 
    1098 The restoring term is added when the namelist parameter \np{ln\_tradmp} is set to true. 
    1099 It also requires that both \np{ln\_tsd\_init} and \np{ln\_tsd\_dmp} are set to true in 
    1100 \nam{tsd} namelist as well as \np{sn\_tem} and \np{sn\_sal} structures are correctly set 
     1097Options are defined through the  \nam{tra_dmp}{tra\_dmp} namelist variables. 
     1098The restoring term is added when the namelist parameter \np{ln_tradmp}{ln\_tradmp} is set to true. 
     1099It also requires that both \np{ln_tsd_init}{ln\_tsd\_init} and \np{ln_tsd_dmp}{ln\_tsd\_dmp} are set to true in 
     1100\nam{tsd} namelist as well as \np{sn_tem}{sn\_tem} and \np{sn_sal}{sn\_sal} structures are correctly set 
    11011101(\ie\ that $T_o$ and $S_o$ are provided in input files and read using \mdl{fldread}, 
    11021102see \autoref{subsec:SBC_fldread}). 
    11031103The restoring coefficient $\gamma$ is a three-dimensional array read in during the \rou{tra\_dmp\_init} routine. 
    1104 The file name is specified by the namelist variable \np{cn\_resto}. 
     1104The file name is specified by the namelist variable \np{cn_resto}{cn\_resto}. 
    11051105The DMP\_TOOLS tool is provided to allow users to generate the netcdf file. 
    11061106 
     
    11221122It tends to prevent deep convection and subsequent deep-water formation, by stabilising the water column too much. 
    11231123 
    1124 The namelist parameter \np{nn\_zdmp} sets whether the damping should be applied in the whole water column or 
     1124The namelist parameter \np{nn_zdmp}{nn\_zdmp} sets whether the damping should be applied in the whole water column or 
    11251125only below the mixed layer (defined either on a density or $S_o$ criterion). 
    11261126It is common to set the damping to zero in the mixed layer as the adjustment time scale is short here 
     
    11521152$\gamma$ is the Asselin coefficient, and $S$ is the total forcing applied on $T$ 
    11531153(\ie\ fluxes plus content in mass exchanges). 
    1154 $\gamma$ is initialized as \np{rn\_atfp} (\textbf{namelist} parameter). 
    1155 Its default value is \np{rn\_atfp}\forcode{=10.e-3}. 
     1154$\gamma$ is initialized as \np{rn_atfp}{rn\_atfp} (\textbf{namelist} parameter). 
     1155Its default value is \np{rn_atfp}{rn\_atfp}\forcode{=10.e-3}. 
    11561156Note that the forcing correction term in the filter is not applied in linear free surface 
    11571157(\jp{ln\_linssh}\forcode{=.true.}) (see \autoref{subsec:TRA_sbc}). 
     
    11821182%        Equation of State 
    11831183% ------------------------------------------------------------------------------------------------------------- 
    1184 \subsection[Equation of seawater (\forcode{ln_}\{\forcode{teos10,eos80,seos}\})]{Equation of seawater (\protect\np{ln\_teos10}, \protect\np{ln\_teos80}, or \protect\np{ln\_seos})} 
     1184\subsection[Equation of seawater (\forcode{ln_}\{\forcode{teos10,eos80,seos}\})]{Equation of seawater (\protect\np{ln_teos10}{ln\_teos10}, \protect\np{ln_teos80}{ln\_teos80}, or \protect\np{ln_seos}{ln\_seos})} 
    11851185\label{subsec:TRA_eos} 
    11861186 
     
    12161216 
    12171217\begin{description} 
    1218 \item[\np{ln\_teos10}\forcode{=.true.}] 
     1218\item[\np{ln_teos10}{ln\_teos10}\forcode{=.true.}] 
    12191219  the polyTEOS10-bsq equation of seawater \citep{roquet.madec.ea_OM15} is used. 
    12201220  The accuracy of this approximation is comparable to the TEOS-10 rational function approximation, 
     
    12351235  either computing the air-sea and ice-sea fluxes (forced mode) or 
    12361236  sending the SST field to the atmosphere (coupled mode). 
    1237 \item[\np{ln\_eos80}\forcode{=.true.}] 
     1237\item[\np{ln_eos80}{ln\_eos80}\forcode{=.true.}] 
    12381238  the polyEOS80-bsq equation of seawater is used. 
    12391239  It takes the same polynomial form as the polyTEOS10, but the coefficients have been optimized to 
     
    12471247  Nevertheless, a severe assumption is made in order to have a heat content ($C_p T_p$) which 
    12481248  is conserved by the model: $C_p$ is set to a constant value, the TEOS10 value. 
    1249 \item[\np{ln\_seos}\forcode{=.true.}] 
     1249\item[\np{ln_seos}{ln\_seos}\forcode{=.true.}] 
    12501250  a simplified EOS (S-EOS) inspired by \citet{vallis_bk06} is chosen, 
    12511251  the coefficients of which has been optimized to fit the behavior of TEOS10 
     
    12841284    coeff.     & computer name   & S-EOS           & description                      \\ 
    12851285    \hline 
    1286     $a_0$       & \np{rn\_a0}     & $1.6550~10^{-1}$ & linear thermal expansion coeff. \\ 
     1286    $a_0$       & \np{rn_a0}{rn\_a0}     & $1.6550~10^{-1}$ & linear thermal expansion coeff. \\ 
    12871287    \hline 
    1288     $b_0$         & \np{rn\_b0}     & $7.6554~10^{-1}$ & linear haline  expansion coeff. \\ 
     1288    $b_0$         & \np{rn_b0}{rn\_b0}       & $7.6554~10^{-1}$ & linear haline  expansion coeff. \\ 
    12891289    \hline 
    1290     $\lambda_1$   & \np{rn\_lambda1}& $5.9520~10^{-2}$ & cabbeling coeff. in $T^2$       \\ 
     1290    $\lambda_1$   & \np{rn_lambda1}{rn\_lambda1}& $5.9520~10^{-2}$ & cabbeling coeff. in $T^2$       \\ 
    12911291    \hline 
    1292     $\lambda_2$   & \np{rn\_lambda2}& $5.4914~10^{-4}$ & cabbeling coeff. in $S^2$       \\ 
     1292    $\lambda_2$   & \np{rn_lambda2}{rn\_lambda2}& $5.4914~10^{-4}$ & cabbeling coeff. in $S^2$       \\ 
    12931293    \hline 
    1294     $\nu$       & \np{rn\_nu}     & $2.4341~10^{-3}$ & cabbeling coeff. in $T \, S$      \\ 
     1294    $\nu$       & \np{rn_nu}{rn\_nu}     & $2.4341~10^{-3}$ & cabbeling coeff. in $T \, S$     \\ 
    12951295    \hline 
    1296     $\mu_1$     & \np{rn\_mu1}   & $1.4970~10^{-4}$ & thermobaric coeff. in T         \\ 
     1296    $\mu_1$     & \np{rn_mu1}{rn\_mu1}    & $1.4970~10^{-4}$ & thermobaric coeff. in T         \\ 
    12971297    \hline 
    1298     $\mu_2$     & \np{rn\_mu2}   & $1.1090~10^{-5}$ & thermobaric coeff. in S         \\ 
     1298    $\mu_2$     & \np{rn_mu2}{rn\_mu2}    & $1.1090~10^{-5}$ & thermobaric coeff. in S         \\ 
    12991299    \hline 
    13001300  \end{tabular} 
     
    13671367I've changed "derivative" to "difference" and "mean" to "average"} 
    13681368 
    1369 With partial cells (\np{ln\_zps}\forcode{=.true.}) at bottom and top (\np{ln\_isfcav}\forcode{=.true.}), 
     1369With partial cells (\np{ln_zps}{ln\_zps}\forcode{=.true.}) at bottom and top (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.}), 
    13701370in general, tracers in horizontally adjacent cells live at different depths. 
    13711371Horizontal gradients of tracers are needed for horizontal diffusion (\mdl{traldf} module) and 
    13721372the hydrostatic pressure gradient calculations (\mdl{dynhpg} module). 
    1373 The partial cell properties at the top (\np{ln\_isfcav}\forcode{=.true.}) are computed in the same way as 
     1373The partial cell properties at the top (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.}) are computed in the same way as 
    13741374for the bottom. 
    13751375So, only the bottom interpolation is explained below. 
     
    13871387  the $z$-partial step coordinate]{ 
    13881388    Discretisation of the horizontal difference and average of tracers in 
    1389     the $z$-partial step coordinate (\protect\np{ln\_zps}\forcode{=.true.}) in 
     1389    the $z$-partial step coordinate (\protect\np{ln_zps}{ln\_zps}\forcode{=.true.}) in 
    13901390    the case $(e3w_k^{i + 1} - e3w_k^i) > 0$. 
    13911391    A linear interpolation is used to estimate $\widetilde T_k^{i + 1}$, 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_ZDF.tex

    r11571 r11577  
    2828At the surface they are prescribed from the surface forcing (see \autoref{chap:SBC}), 
    2929while at the bottom they are set to zero for heat and salt, 
    30 unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie\ \np{ln\_trabbc} defined, 
     30unless a geothermal flux forcing is prescribed as a bottom boundary condition (\ie\ \np{ln_trabbc}{ln\_trabbc} defined, 
    3131see \autoref{subsec:TRA_bbc}), and specified through a bottom friction parameterisation for momentum 
    3232(see \autoref{sec:ZDF_drg}). 
     
    4242are computed and added to the general trend in the \mdl{dynzdf} and \mdl{trazdf} modules, respectively. 
    4343%These trends can be computed using either a forward time stepping scheme 
    44 %(namelist parameter \np{ln\_zdfexp}\forcode{=.true.}) or a backward time stepping scheme 
    45 %(\np{ln\_zdfexp}\forcode{=.false.}) depending on the magnitude of the mixing coefficients, 
     44%(namelist parameter \np{ln_zdfexp}{ln\_zdfexp}\forcode{=.true.}) or a backward time stepping scheme 
     45%(\np{ln_zdfexp}{ln\_zdfexp}\forcode{=.false.}) depending on the magnitude of the mixing coefficients, 
    4646%and thus of the formulation used (see \autoref{chap:TD}). 
    4747 
     
    5858%        Constant 
    5959% ------------------------------------------------------------------------------------------------------------- 
    60 \subsection[Constant (\forcode{ln_zdfcst})]{Constant (\protect\np{ln\_zdfcst})} 
     60\subsection[Constant (\forcode{ln_zdfcst})]{Constant (\protect\np{ln_zdfcst}{ln\_zdfcst})} 
    6161\label{subsec:ZDF_cst} 
    6262 
    6363Options are defined through the \nam{zdf} namelist variables. 
    64 When \np{ln\_zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to 
     64When \np{ln_zdfcst}{ln\_zdfcst} is defined, the momentum and tracer vertical eddy coefficients are set to 
    6565constant values over the whole ocean. 
    6666This is the crudest way to define the vertical ocean physics. 
     
    7272\end{align*} 
    7373 
    74 These values are set through the \np{rn\_avm0} and \np{rn\_avt0} namelist parameters. 
     74These values are set through the \np{rn_avm0}{rn\_avm0} and \np{rn_avt0}{rn\_avt0} namelist parameters. 
    7575In all cases, do not use values smaller that those associated with the molecular viscosity and diffusivity, 
    7676that is $\sim10^{-6}~m^2.s^{-1}$ for momentum, $\sim10^{-7}~m^2.s^{-1}$ for temperature and 
     
    8080%        Richardson Number Dependent 
    8181% ------------------------------------------------------------------------------------------------------------- 
    82 \subsection[Richardson number dependent (\forcode{ln_zdfric})]{Richardson number dependent (\protect\np{ln\_zdfric})} 
     82\subsection[Richardson number dependent (\forcode{ln_zdfric})]{Richardson number dependent (\protect\np{ln_zdfric}{ln\_zdfric})} 
    8383\label{subsec:ZDF_ric} 
    8484 
     
    9292%-------------------------------------------------------------------------------------------------------------- 
    9393 
    94 When \np{ln\_zdfric}\forcode{=.true.}, a local Richardson number dependent formulation for the vertical momentum and 
    95 tracer eddy coefficients is set through the \nam{zdf\_ric} namelist variables. 
     94When \np{ln_zdfric}{ln\_zdfric}\forcode{=.true.}, a local Richardson number dependent formulation for the vertical momentum and 
     95tracer eddy coefficients is set through the \nam{zdf_ric}{zdf\_ric} namelist variables. 
    9696The vertical mixing coefficients are diagnosed from the large scale variables computed by the model. 
    9797\textit{In situ} measurements have been used to link vertical turbulent activity to large scale ocean structures. 
     
    114114(see \autoref{subsec:ZDF_cst}), and $A_{ric}^{vT} = 10^{-4}~m^2.s^{-1}$ is the maximum value that 
    115115can be reached by the coefficient when $Ri\leq 0$, $a=5$ and $n=2$. 
    116 The last three values can be modified by setting the \np{rn\_avmri}, \np{rn\_alp} and 
    117 \np{nn\_ric} namelist parameters, respectively. 
     116The last three values can be modified by setting the \np{rn_avmri}{rn\_avmri}, \np{rn_alp}{rn\_alp} and 
     117\np{nn_ric}{nn\_ric} namelist parameters, respectively. 
    118118 
    119119A simple mixing-layer model to transfer and dissipate the atmospheric forcings 
    120 (wind-stress and buoyancy fluxes) can be activated setting the \np{ln\_mldw}\forcode{=.true.} in the namelist. 
     120(wind-stress and buoyancy fluxes) can be activated setting the \np{ln_mldw}{ln\_mldw}\forcode{=.true.} in the namelist. 
    121121 
    122122In this case, the local depth of turbulent wind-mixing or "Ekman depth" $h_{e}(x,y,t)$ is evaluated and 
     
    134134\] 
    135135is computed from the wind stress vector $|\tau|$ and the reference density $ \rho_o$. 
    136 The final $h_{e}$ is further constrained by the adjustable bounds \np{rn\_mldmin} and \np{rn\_mldmax}. 
     136The final $h_{e}$ is further constrained by the adjustable bounds \np{rn_mldmin}{rn\_mldmin} and \np{rn_mldmax}{rn\_mldmax}. 
    137137Once $h_{e}$ is computed, the vertical eddy coefficients within $h_{e}$ are set to 
    138 the empirical values \np{rn\_wtmix} and \np{rn\_wvmix} \citep{lermusiaux_JMS01}. 
     138the empirical values \np{rn_wtmix}{rn\_wtmix} and \np{rn_wvmix}{rn\_wvmix} \citep{lermusiaux_JMS01}. 
    139139 
    140140% ------------------------------------------------------------------------------------------------------------- 
    141141%        TKE Turbulent Closure Scheme 
    142142% ------------------------------------------------------------------------------------------------------------- 
    143 \subsection[TKE turbulent closure scheme (\forcode{ln_zdftke})]{TKE turbulent closure scheme (\protect\np{ln\_zdftke})} 
     143\subsection[TKE turbulent closure scheme (\forcode{ln_zdftke})]{TKE turbulent closure scheme (\protect\np{ln_zdftke}{ln\_zdftke})} 
    144144\label{subsec:ZDF_tke} 
    145145%--------------------------------------------namzdf_tke-------------------------------------------------- 
     
    184184The constants $C_k =  0.1$ and $C_\epsilon = \sqrt {2} /2$ $\approx 0.7$ are designed to deal with 
    185185vertical mixing at any depth \citep{gaspar.gregoris.ea_JGR90}. 
    186 They are set through namelist parameters \np{nn\_ediff} and \np{nn\_ediss}. 
     186They are set through namelist parameters \np{nn_ediff}{nn\_ediff} and \np{nn_ediss}{nn\_ediss}. 
    187187$P_{rt}$ can be set to unity or, following \citet{blanke.delecluse_JPO93}, be a function of the local Richardson number, $R_i$: 
    188188\begin{align*} 
     
    195195  \end{cases} 
    196196\end{align*} 
    197 The choice of $P_{rt}$ is controlled by the \np{nn\_pdl} namelist variable. 
     197The choice of $P_{rt}$ is controlled by the \np{nn_pdl}{nn\_pdl} namelist variable. 
    198198 
    199199At the sea surface, the value of $\bar{e}$ is prescribed from the wind stress field as 
    200 $\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn\_ebb} namelist parameter. 
     200$\bar{e}_o = e_{bb} |\tau| / \rho_o$, with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter. 
    201201The default value of $e_{bb}$ is 3.75. \citep{gaspar.gregoris.ea_JGR90}), however a much larger value can be used when 
    202202taking into account the surface wave breaking (see below Eq. \autoref{eq:ZDF_Esbc}). 
     
    204204The time integration of the $\bar{e}$ equation may formally lead to negative values because 
    205205the numerical scheme does not ensure its positivity. 
    206 To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn\_emin} namelist parameter). 
     206To overcome this problem, a cut-off in the minimum value of $\bar{e}$ is used (\np{rn_emin}{rn\_emin} namelist parameter). 
    207207Following \citet{gaspar.gregoris.ea_JGR90}, the cut-off value is set to $\sqrt{2}/2~10^{-6}~m^2.s^{-2}$. 
    208208This allows the subsequent formulations to match that of \citet{gargett_JMR84} for the diffusion in 
     
    210210In addition, a cut-off is applied on $K_m$ and $K_\rho$ to avoid numerical instabilities associated with 
    211211too weak vertical diffusion. 
    212 They must be specified at least larger than the molecular values, and are set through \np{rn\_avm0} and 
    213 \np{rn\_avt0} (\nam{zdf} namelist, see \autoref{subsec:ZDF_cst}). 
     212They must be specified at least larger than the molecular values, and are set through \np{rn_avm0}{rn\_avm0} and 
     213\np{rn_avt0}{rn\_avt0} (\nam{zdf} namelist, see \autoref{subsec:ZDF_cst}). 
    214214 
    215215\subsubsection{Turbulent length scale} 
     
    217217For computational efficiency, the original formulation of the turbulent length scales proposed by 
    218218\citet{gaspar.gregoris.ea_JGR90} has been simplified. 
    219 Four formulations are proposed, the choice of which is controlled by the \np{nn\_mxl} namelist parameter. 
     219Four formulations are proposed, the choice of which is controlled by the \np{nn_mxl}{nn\_mxl} namelist parameter. 
    220220The first two are based on the following first order approximation \citep{blanke.delecluse_JPO93}: 
    221221\begin{equation} 
     
    225225which is valid in a stable stratified region with constant values of the Brunt-Vais\"{a}l\"{a} frequency. 
    226226The resulting length scale is bounded by the distance to the surface or to the bottom 
    227 (\np{nn\_mxl}\forcode{=0}) or by the local vertical scale factor (\np{nn\_mxl}\forcode{=1}). 
     227(\np{nn_mxl}{nn\_mxl}\forcode{=0}) or by the local vertical scale factor (\np{nn\_mxl}\forcode{=1}). 
    228228\citet{blanke.delecluse_JPO93} notice that this simplification has two major drawbacks: 
    229229it makes no sense for locally unstable stratification and the computation no longer uses all 
    230230the information contained in the vertical density profile. 
    231 To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np{nn\_mxl}\forcode{=2, 3} cases, 
     231To overcome these drawbacks, \citet{madec.delecluse.ea_NPM98} introduces the \np{nn_mxl}{nn\_mxl}\forcode{=2, 3} cases, 
    232232which add an extra assumption concerning the vertical gradient of the computed length scale. 
    233233So, the length scales are first evaluated as in \autoref{eq:ZDF_tke_mxl0_1} and then bounded such that: 
     
    267267where $l^{(k)}$ is computed using \autoref{eq:ZDF_tke_mxl0_1}, \ie\ $l^{(k)} = \sqrt {2 {\bar e}^{(k)} / {N^2}^{(k)} }$. 
    268268 
    269 In the \np{nn\_mxl}\forcode{=2} case, the dissipation and mixing length scales take the same value: 
    270 $ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np{nn\_mxl}\forcode{=3} case, 
     269In the \np{nn_mxl}{nn\_mxl}\forcode{=2} case, the dissipation and mixing length scales take the same value: 
     270$ l_k=  l_\epsilon = \min \left(\ l_{up} \;,\;  l_{dwn}\ \right)$, while in the \np{nn_mxl}{nn\_mxl}\forcode{=3} case, 
    271271the dissipation and mixing turbulent length scales are give as in \citet{gaspar.gregoris.ea_JGR90}: 
    272272\[ 
     
    278278\] 
    279279 
    280 At the ocean surface, a non zero length scale is set through the  \np{rn\_mxl0} namelist parameter. 
     280At the ocean surface, a non zero length scale is set through the  \np{rn_mxl0}{rn\_mxl0} namelist parameter. 
    281281Usually the surface scale is given by $l_o = \kappa \,z_o$ where $\kappa = 0.4$ is von Karman's constant and 
    282282$z_o$ the roughness parameter of the surface. 
    283 Assuming $z_o=0.1$~m \citep{craig.banner_JPO94} leads to a 0.04~m, the default value of \np{rn\_mxl0}. 
     283Assuming $z_o=0.1$~m \citep{craig.banner_JPO94} leads to a 0.04~m, the default value of \np{rn_mxl0}{rn\_mxl0}. 
    284284In the ocean interior a minimum length scale is set to recover the molecular viscosity when 
    285285$\bar{e}$ reach its minimum value ($1.10^{-6}= C_k\, l_{min} \,\sqrt{\bar{e}_{min}}$ ). 
     
    312312$\alpha_{CB} = 100$ the Craig and Banner's value. 
    313313As the surface boundary condition on TKE is prescribed through $\bar{e}_o = e_{bb} |\tau| / \rho_o$, 
    314 with $e_{bb}$ the \np{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds 
     314with $e_{bb}$ the \np{rn_ebb}{rn\_ebb} namelist parameter, setting \np{rn\_ebb}\forcode{ = 67.83} corresponds 
    315315to $\alpha_{CB} = 100$. 
    316 Further setting  \np{ln\_mxl0}\forcode{ =.true.},  applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale, 
     316Further setting  \np{ln_mxl0}{ln\_mxl0}\forcode{ =.true.},  applies \autoref{eq:ZDF_Lsbc} as the surface boundary condition on the length scale, 
    317317with $\beta$ hard coded to the Stacey's value. 
    318 Note that a minimal threshold of \np{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the 
     318Note that a minimal threshold of \np{rn_emin0}{rn\_emin0}$=10^{-4}~m^2.s^{-2}$ (namelist parameters) is applied on the 
    319319surface $\bar{e}$ value. 
    320320 
     
    334334The parameterization, tuned against large-eddy simulation, includes the whole effect of LC in 
    335335an extra source term of TKE, $P_{LC}$. 
    336 The presence of $P_{LC}$ in \autoref{eq:ZDF_tke_e}, the TKE equation, is controlled by setting \np{ln\_lc} to 
    337 \forcode{.true.} in the \nam{zdf\_tke} namelist. 
     336The presence of $P_{LC}$ in \autoref{eq:ZDF_tke_e}, the TKE equation, is controlled by setting \np{ln_lc}{ln\_lc} to 
     337\forcode{.true.} in the \nam{zdf_tke}{zdf\_tke} namelist. 
    338338 
    339339By making an analogy with the characteristic convective velocity scale (\eg, \citet{dalessio.abdella.ea_JPO98}), 
     
    363363where $c_{LC} = 0.15$ has been chosen by \citep{axell_JGR02} as a good compromise to fit LES data. 
    364364The chosen value yields maximum vertical velocities $w_{LC}$ of the order of a few centimeters per second. 
    365 The value of $c_{LC}$ is set through the \np{rn\_lc} namelist parameter, 
     365The value of $c_{LC}$ is set through the \np{rn_lc}{rn\_lc} namelist parameter, 
    366366having in mind that it should stay between 0.15 and 0.54 \citep{axell_JGR02}. 
    367367 
     
    385385(\ie\ near-inertial oscillations and ocean swells and waves). 
    386386 
    387 When using this parameterization (\ie\ when \np{nn\_etau}\forcode{=1}), 
     387When using this parameterization (\ie\ when \np{nn_etau}{nn\_etau}\forcode{=1}), 
    388388the TKE input to the ocean ($S$) imposed by the winds in the form of near-inertial oscillations, 
    389389swell and waves is parameterized by \autoref{eq:ZDF_Esbc} the standard TKE surface boundary condition, 
     
    397397the penetration, and $f_i$ is the ice concentration 
    398398(no penetration if $f_i=1$, \ie\ if the ocean is entirely covered by sea-ice). 
    399 The value of $f_r$, usually a few percents, is specified through \np{rn\_efr} namelist parameter. 
    400 The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn\_etau}\forcode{=0}) or 
     399The value of $f_r$, usually a few percents, is specified through \np{rn_efr}{rn\_efr} namelist parameter. 
     400The vertical mixing length scale, $h_\tau$, can be set as a 10~m uniform value (\np{nn_etau}{nn\_etau}\forcode{=0}) or 
    401401a latitude dependent value (varying from 0.5~m at the Equator to a maximum value of 30~m at high latitudes 
    402 (\np{nn\_etau}\forcode{=1}). 
    403  
    404 Note that two other option exist, \np{nn\_etau}\forcode{=2, 3}. 
     402(\np{nn_etau}{nn\_etau}\forcode{=1}). 
     403 
     404Note that two other option exist, \np{nn_etau}{nn\_etau}\forcode{=2, 3}. 
    405405They correspond to applying \autoref{eq:ZDF_Ehtau} only at the base of the mixed layer, 
    406406or to using the high frequency part of the stress to evaluate the fraction of TKE that penetrates the ocean. 
     
    409409 
    410410% This should be explain better below what this rn_eice parameter is meant for: 
    411 In presence of Sea Ice, the value of this mixing can be modulated by the \np{rn\_eice} namelist parameter. 
     411In presence of Sea Ice, the value of this mixing can be modulated by the \np{rn_eice}{rn\_eice} namelist parameter. 
    412412This parameter varies from \forcode{0} for no effect to \forcode{4} to suppress the TKE input into the ocean when Sea Ice concentration 
    413413is greater than 25\%. 
     
    424424%        GLS Generic Length Scale Scheme 
    425425% ------------------------------------------------------------------------------------------------------------- 
    426 \subsection[GLS: Generic Length Scale (\forcode{ln_zdfgls})]{GLS: Generic Length Scale (\protect\np{ln\_zdfgls})} 
     426\subsection[GLS: Generic Length Scale (\forcode{ln_zdfgls})]{GLS: Generic Length Scale (\protect\np{ln_zdfgls}{ln\_zdfgls})} 
    427427\label{subsec:ZDF_gls} 
    428428 
     
    483483the choice of the turbulence model. 
    484484Four different turbulent models are pre-defined (\autoref{tab:ZDF_GLS}). 
    485 They are made available through the \np{nn\_clo} namelist parameter. 
     485They are made available through the \np{nn_clo}{nn\_clo} namelist parameter. 
    486486 
    487487%--------------------------------------------------TABLE-------------------------------------------------- 
     
    494494    \hline 
    495495    \hline 
    496     \np{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\ 
     496    \np{nn_clo}{nn\_clo}     & \textbf{0} &   \textbf{1}  &   \textbf{2}   &    \textbf{3}   \\ 
    497497    \hline 
    498498    $( p , n , m )$         &   ( 0 , 1 , 1 )   & ( 3 , 1.5 , -1 )   & ( -1 , 0.5 , -1 )    &  ( 2 , 1 , -0.67 )  \\ 
     
    508508  \caption[Set of predefined GLS parameters or equivalently predefined turbulence models available]{ 
    509509    Set of predefined GLS parameters, or equivalently predefined turbulence models available with 
    510     \protect\np{ln\_zdfgls}\forcode{=.true.} and controlled by 
    511     the \protect\np{nn\_clos} namelist variable in \protect\nam{zdf\_gls}.} 
     510    \protect\np{ln_zdfgls}{ln\_zdfgls}\forcode{=.true.} and controlled by 
     511    the \protect\np{nn_clos}{nn\_clos} namelist variable in \protect\nam{zdf_gls}{zdf\_gls}.} 
    512512  \label{tab:ZDF_GLS} 
    513513\end{table} 
     
    519519$C_{\mu}$ and $C_{\mu'}$ are calculated from stability function proposed by \citet{galperin.kantha.ea_JAS88}, 
    520520or by \citet{kantha.clayson_JGR94} or one of the two functions suggested by \citet{canuto.howard.ea_JPO01} 
    521 (\np{nn\_stab\_func}\forcode{=0, 3}, resp.). 
     521(\np{nn_stab_func}{nn\_stab\_func}\forcode{=0, 3}, resp.). 
    522522The value of $C_{0\mu}$ depends on the choice of the stability function. 
    523523 
    524524The surface and bottom boundary condition on both $\bar{e}$ and $\psi$ can be calculated thanks to Dirichlet or 
    525 Neumann condition through \np{nn\_bc\_surf} and \np{nn\_bc\_bot}, resp. 
     525Neumann condition through \np{nn_bc_surf}{nn\_bc\_surf} and \np{nn_bc_bot}{nn\_bc\_bot}, resp. 
    526526As for TKE closure, the wave effect on the mixing is considered when 
    527 \np{rn\_crban}\forcode{ > 0.} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}. 
    528 The \np{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and 
    529 \np{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 
     527\np{rn_crban}{rn\_crban}\forcode{ > 0.} \citep{craig.banner_JPO94, mellor.blumberg_JPO04}. 
     528The \np{rn_crban}{rn\_crban} namelist parameter is $\alpha_{CB}$ in \autoref{eq:ZDF_Esbc} and 
     529\np{rn_charn}{rn\_charn} provides the value of $\beta$ in \autoref{eq:ZDF_Lsbc}. 
    530530 
    531531The $\psi$ equation is known to fail in stably stratified flows, and for this reason 
     
    536536the entrainment depth predicted in stably stratified situations, 
    537537and that its value has to be chosen in accordance with the algebraic model for the turbulent fluxes. 
    538 The clipping is only activated if \np{ln\_length\_lim}\forcode{=.true.}, 
    539 and the $c_{lim}$ is set to the \np{rn\_clim\_galp} value. 
     538The clipping is only activated if \np{ln_length_lim}{ln\_length\_lim}\forcode{=.true.}, 
     539and the $c_{lim}$ is set to the \np{rn_clim_galp}{rn\_clim\_galp} value. 
    540540 
    541541The time and space discretization of the GLS equations follows the same energetic consideration as for 
     
    548548%        OSM OSMOSIS BL Scheme 
    549549% ------------------------------------------------------------------------------------------------------------- 
    550 \subsection[OSM: OSMosis boundary layer scheme (\forcode{ln_zdfosm})]{OSM: OSMosis boundary layer scheme (\protect\np{ln\_zdfosm})} 
     550\subsection[OSM: OSMosis boundary layer scheme (\forcode{ln_zdfosm})]{OSM: OSMosis boundary layer scheme (\protect\np{ln_zdfosm}{ln\_zdfosm})} 
    551551\label{subsec:ZDF_osm} 
    552552%--------------------------------------------namzdf_osm--------------------------------------------------------- 
     
    682682%       Non-Penetrative Convective Adjustment 
    683683% ------------------------------------------------------------------------------------------------------------- 
    684 \subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc})]{Non-penetrative convective adjustment (\protect\np{ln\_tranpc})} 
     684\subsection[Non-penetrative convective adjustment (\forcode{ln_tranpc})]{Non-penetrative convective adjustment (\protect\np{ln_tranpc}{ln\_tranpc})} 
    685685\label{subsec:ZDF_npc} 
    686686 
     
    707707 
    708708Options are defined through the \nam{zdf} namelist variables. 
    709 The non-penetrative convective adjustment is used when \np{ln\_zdfnpc}\forcode{=.true.}. 
    710 It is applied at each \np{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of 
     709The non-penetrative convective adjustment is used when \np{ln_zdfnpc}{ln\_zdfnpc}\forcode{=.true.}. 
     710It is applied at each \np{nn_npc}{nn\_npc} time step and mixes downwards instantaneously the statically unstable portion of 
    711711the water column, but only until the density structure becomes neutrally stable 
    712712(\ie\ until the mixed portion of the water column has \textit{exactly} the density of the water just below) 
     
    747747%       Enhanced Vertical Diffusion 
    748748% ------------------------------------------------------------------------------------------------------------- 
    749 \subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd})]{Enhanced vertical diffusion (\protect\np{ln\_zdfevd})} 
     749\subsection[Enhanced vertical diffusion (\forcode{ln_zdfevd})]{Enhanced vertical diffusion (\protect\np{ln_zdfevd}{ln\_zdfevd})} 
    750750\label{subsec:ZDF_evd} 
    751751 
    752752Options are defined through the  \nam{zdf} namelist variables. 
    753 The enhanced vertical diffusion parameterisation is used when \np{ln\_zdfevd}\forcode{=.true.}. 
     753The enhanced vertical diffusion parameterisation is used when \np{ln_zdfevd}{ln\_zdfevd}\forcode{=.true.}. 
    754754In this case, the vertical eddy mixing coefficients are assigned very large values 
    755755in regions where the stratification is unstable 
    756756(\ie\ when $N^2$ the Brunt-Vais\"{a}l\"{a} frequency is negative) \citep{lazar_phd97, lazar.madec.ea_JPO99}. 
    757 This is done either on tracers only (\np{nn\_evdm}\forcode{=0}) or 
    758 on both momentum and tracers (\np{nn\_evdm}\forcode{=1}). 
    759  
    760 In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np{nn\_evdm}\forcode{=1}, 
     757This is done either on tracers only (\np{nn_evdm}{nn\_evdm}\forcode{=0}) or 
     758on both momentum and tracers (\np{nn_evdm}{nn\_evdm}\forcode{=1}). 
     759 
     760In practice, where $N^2\leq 10^{-12}$, $A_T^{vT}$ and $A_T^{vS}$, and if \np{nn_evdm}{nn\_evdm}\forcode{=1}, 
    761761the four neighbouring $A_u^{vm} \;\mbox{and}\;A_v^{vm}$ values also, are set equal to 
    762 the namelist parameter \np{rn\_avevd}. 
     762the namelist parameter \np{rn_avevd}{rn\_avevd}. 
    763763A typical value for $rn\_avevd$ is between 1 and $100~m^2.s^{-1}$. 
    764764This parameterisation of convective processes is less time consuming than 
     
    778778 
    779779The turbulent closure schemes presented in \autoref{subsec:ZDF_tke}, \autoref{subsec:ZDF_gls} and 
    780 \autoref{subsec:ZDF_osm} (\ie\ \np{ln\_zdftke} or \np{ln\_zdfgls} or \np{ln\_zdfosm} defined) deal, in theory, 
     780\autoref{subsec:ZDF_osm} (\ie\ \np{ln_zdftke}{ln\_zdftke} or \np{ln_zdfgls}{ln\_zdfgls} or \np{ln_zdfosm}{ln\_zdfosm} defined) deal, in theory, 
    781781with statically unstable density profiles. 
    782782In such a case, the term corresponding to the destruction of turbulent kinetic energy through stratification in 
     
    790790because the mixing length scale is bounded by the distance to the sea surface. 
    791791It can thus be useful to combine the enhanced vertical diffusion with the turbulent closure scheme, 
    792 \ie\ setting the \np{ln\_zdfnpc} namelist parameter to true and 
    793 defining the turbulent closure (\np{ln\_zdftke} or \np{ln\_zdfgls} = \forcode{.true.}) all together. 
     792\ie\ setting the \np{ln_zdfnpc}{ln\_zdfnpc} namelist parameter to true and 
     793defining the turbulent closure (\np{ln_zdftke}{ln\_zdftke} or \np{ln_zdfgls}{ln\_zdfgls} = \forcode{.true.}) all together. 
    794794 
    795795The OSMOSIS turbulent closure scheme already includes enhanced vertical diffusion in the case of convection, 
    796796%as governed by the variables $bvsqcon$ and $difcon$ found in \mdl{zdfkpp}, 
    797 therefore \np{ln\_zdfevd}\forcode{=.false.} should be used with the OSMOSIS scheme. 
     797therefore \np{ln_zdfevd}{ln\_zdfevd}\forcode{=.false.} should be used with the OSMOSIS scheme. 
    798798% gm%  + one word on non local flux with KPP scheme trakpp.F90 module... 
    799799 
     
    801801% Double Diffusion Mixing 
    802802% ================================================================ 
    803 \section[Double diffusion mixing (\forcode{ln_zdfddm})]{Double diffusion mixing (\protect\np{ln\_zdfddm})} 
     803\section[Double diffusion mixing (\forcode{ln_zdfddm})]{Double diffusion mixing (\protect\np{ln_zdfddm}{ln\_zdfddm})} 
    804804\label{subsec:ZDF_ddm} 
    805805 
     
    811811 
    812812This parameterisation has been introduced in \mdl{zdfddm} module and is controlled by the namelist parameter 
    813 \np{ln\_zdfddm} in \nam{zdf}. 
     813\np{ln_zdfddm}{ln\_zdfddm} in \nam{zdf}. 
    814814Double diffusion occurs when relatively warm, salty water overlies cooler, fresher water, or vice versa. 
    815815The former condition leads to salt fingering and the latter to diffusive convection. 
     
    976976%       Linear Bottom Friction 
    977977% ------------------------------------------------------------------------------------------------------------- 
    978 \subsection[Linear top/bottom friction (\forcode{ln_lin})]{Linear top/bottom friction (\protect\np{ln\_lin})} 
     978\subsection[Linear top/bottom friction (\forcode{ln_lin})]{Linear top/bottom friction (\protect\np{ln_lin}{ln\_lin})} 
    979979\label{subsec:ZDF_drg_linear} 
    980980 
     
    995995and assuming an ocean depth $H = 4000$~m, the resulting friction coefficient is $r = 4\;10^{-4}$~m\;s$^{-1}$. 
    996996This is the default value used in \NEMO. It corresponds to a decay time scale of 115~days. 
    997 It can be changed by specifying \np{rn\_Uc0} (namelist parameter). 
     997It can be changed by specifying \np{rn_Uc0}{rn\_Uc0} (namelist parameter). 
    998998 
    999999 For the linear friction case the drag coefficient used in the general expression \autoref{eq:ZDF_bfr_bdef} is: 
     
    10021002    c_b^T = - r 
    10031003\] 
    1004 When \np{ln\_lin} \forcode{= .true.}, the value of $r$ used is \np{rn\_Uc0}*\np{rn\_Cd0}. 
    1005 Setting \np{ln\_OFF} \forcode{= .true.} (and \forcode{ln_lin=.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition. 
     1004When \np{ln_lin}{ln\_lin} \forcode{= .true.}, the value of $r$ used is \np{rn_Uc0}{rn\_Uc0}*\np{rn_Cd0}{rn\_Cd0}. 
     1005Setting \np{ln_OFF}{ln\_OFF} \forcode{= .true.} (and \forcode{ln_lin=.true.}) is equivalent to setting $r=0$ and leads to a free-slip boundary condition. 
    10061006 
    10071007These values are assigned in \mdl{zdfdrg}. 
    10081008Note that there is support for local enhancement of these values via an externally defined 2D mask array 
    1009 (\np{ln\_boost}\forcode{=.true.}) given in the \ifile{bfr\_coef} input NetCDF file. 
     1009(\np{ln_boost}{ln\_boost}\forcode{=.true.}) given in the \ifile{bfr\_coef} input NetCDF file. 
    10101010The mask values should vary from 0 to 1. 
    10111011Locations with a non-zero mask value will have the friction coefficient increased by 
    1012 $mask\_value$ * \np{rn\_boost} * \np{rn\_Cd0}. 
     1012$mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}. 
    10131013 
    10141014% ------------------------------------------------------------------------------------------------------------- 
    10151015%       Non-Linear Bottom Friction 
    10161016% ------------------------------------------------------------------------------------------------------------- 
    1017 \subsection[Non-linear top/bottom friction (\forcode{ln_non_lin})]{Non-linear top/bottom friction (\protect\np{ln\_non\_lin})} 
     1017\subsection[Non-linear top/bottom friction (\forcode{ln_non_lin})]{Non-linear top/bottom friction (\protect\np{ln_non_lin}{ln\_non\_lin})} 
    10181018\label{subsec:ZDF_drg_nonlinear} 
    10191019 
     
    10301030$e_b = 2.5\;10^{-3}$m$^2$\;s$^{-2}$, while the FRAM experiment \citep{killworth_JPO92} uses $C_D = 1.4\;10^{-3}$ and 
    10311031$e_b =2.5\;\;10^{-3}$m$^2$\;s$^{-2}$. 
    1032 The CME choices have been set as default values (\np{rn\_Cd0} and \np{rn\_ke0} namelist parameters). 
     1032The CME choices have been set as default values (\np{rn_Cd0}{rn\_Cd0} and \np{rn_ke0}{rn\_ke0} namelist parameters). 
    10331033 
    10341034As for the linear case, the friction is imposed in the code by adding the trend due to 
     
    10411041 
    10421042The coefficients that control the strength of the non-linear friction are initialised as namelist parameters: 
    1043 $C_D$= \np{rn\_Cd0}, and $e_b$ =\np{rn\_bfeb2}. 
    1044 Note that for applications which consider tides explicitly, a low or even zero value of \np{rn\_bfeb2} is recommended. A local enhancement of $C_D$ is again possible via an externally defined 2D mask array 
    1045 (\np{ln\_boost}\forcode{=.true.}). 
     1043$C_D$= \np{rn_Cd0}{rn\_Cd0}, and $e_b$ =\np{rn_bfeb2}{rn\_bfeb2}. 
     1044Note that for applications which consider tides explicitly, a low or even zero value of \np{rn_bfeb2}{rn\_bfeb2} is recommended. A local enhancement of $C_D$ is again possible via an externally defined 2D mask array 
     1045(\np{ln_boost}{ln\_boost}\forcode{=.true.}). 
    10461046This works in the same way as for the linear friction case with non-zero masked locations increased by 
    1047 $mask\_value$ * \np{rn\_boost} * \np{rn\_Cd0}. 
     1047$mask\_value$ * \np{rn_boost}{rn\_boost} * \np{rn_Cd0}{rn\_Cd0}. 
    10481048 
    10491049% ------------------------------------------------------------------------------------------------------------- 
    10501050%       Bottom Friction Log-layer 
    10511051% ------------------------------------------------------------------------------------------------------------- 
    1052 \subsection[Log-layer top/bottom friction (\forcode{ln_loglayer})]{Log-layer top/bottom friction (\protect\np{ln\_loglayer})} 
     1052\subsection[Log-layer top/bottom friction (\forcode{ln_loglayer})]{Log-layer top/bottom friction (\protect\np{ln_loglayer}{ln\_loglayer})} 
    10531053\label{subsec:ZDF_drg_loglayer} 
    10541054 
    10551055In the non-linear friction case, the drag coefficient, $C_D$, can be optionally enhanced using 
    10561056a "law of the wall" scaling. This assumes that the model vertical resolution can capture the logarithmic layer which typically occur for layers thinner than 1 m or so. 
    1057 If  \np{ln\_loglayer} \forcode{= .true.}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness): 
     1057If  \np{ln_loglayer}{ln\_loglayer} \forcode{= .true.}, $C_D$ is no longer constant but is related to the distance to the wall (or equivalently to the half of the top/bottom layer thickness): 
    10581058\[ 
    10591059  C_D = \left ( {\kappa \over {\mathrm log}\left ( 0.5 \; e_{3b} / rn\_{z0} \right ) } \right )^2 
    10601060\] 
    10611061 
    1062 \noindent where $\kappa$ is the von-Karman constant and \np{rn\_z0} is a roughness length provided via the namelist. 
     1062\noindent where $\kappa$ is the von-Karman constant and \np{rn_z0}{rn\_z0} is a roughness length provided via the namelist. 
    10631063 
    10641064The drag coefficient is bounded such that it is kept greater or equal to 
    1065 the base \np{rn\_Cd0} value which occurs where layer thicknesses become large and presumably logarithmic layers are not resolved at all. For stability reason, it is also not allowed to exceed the value of an additional namelist parameter: 
    1066 \np{rn\_Cdmax}, \ie 
     1065the base \np{rn_Cd0}{rn\_Cd0} value which occurs where layer thicknesses become large and presumably logarithmic layers are not resolved at all. For stability reason, it is also not allowed to exceed the value of an additional namelist parameter: 
     1066\np{rn_Cdmax}{rn\_Cdmax}, \ie 
    10671067\[ 
    10681068  rn\_Cd0 \leq C_D \leq rn\_Cdmax 
     
    10701070 
    10711071\noindent The log-layer enhancement can also be applied to the top boundary friction if 
    1072 under ice-shelf cavities are activated (\np{ln\_isfcav}\forcode{=.true.}). 
    1073 %In this case, the relevant namelist parameters are \np{rn\_tfrz0}, \np{rn\_tfri2} and \np{rn\_tfri2\_max}. 
     1072under ice-shelf cavities are activated (\np{ln_isfcav}{ln\_isfcav}\forcode{=.true.}). 
     1073%In this case, the relevant namelist parameters are \np{rn_tfrz0}{rn\_tfrz0}, \np{rn_tfri2}{rn\_tfri2} and \np{rn_tfri2_max}{rn\_tfri2\_max}. 
    10741074 
    10751075% ------------------------------------------------------------------------------------------------------------- 
    10761076%       Explicit bottom Friction 
    10771077% ------------------------------------------------------------------------------------------------------------- 
    1078 \subsection[Explicit top/bottom friction (\forcode{ln_drgimp=.false.})]{Explicit top/bottom friction (\protect\np{ln\_drgimp}\forcode{=.false.})} 
     1078\subsection[Explicit top/bottom friction (\forcode{ln_drgimp=.false.})]{Explicit top/bottom friction (\protect\np{ln_drgimp}{ln\_drgimp}\forcode{=.false.})} 
    10791079\label{subsec:ZDF_drg_stability} 
    10801080 
    1081 Setting \np{ln\_drgimp} \forcode{= .false.} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads: 
     1081Setting \np{ln_drgimp}{ln\_drgimp} \forcode{= .false.} means that bottom friction is treated explicitly in time, which has the advantage of simplifying the interaction with the split-explicit free surface (see \autoref{subsec:ZDF_drg_ts}). The latter does indeed require the knowledge of bottom stresses in the course of the barotropic sub-iteration, which becomes less straightforward in the implicit case. In the explicit case, top/bottom stresses can be computed using \textit{before} velocities and inserted in the overall momentum tendency budget. This reads: 
    10821082 
    10831083At the top (below an ice shelf cavity): 
     
    11371137%       Implicit Bottom Friction 
    11381138% ------------------------------------------------------------------------------------------------------------- 
    1139 \subsection[Implicit top/bottom friction (\forcode{ln_drgimp=.true.})]{Implicit top/bottom friction (\protect\np{ln\_drgimp}\forcode{=.true.})} 
     1139\subsection[Implicit top/bottom friction (\forcode{ln_drgimp=.true.})]{Implicit top/bottom friction (\protect\np{ln_drgimp}{ln\_drgimp}\forcode{=.true.})} 
    11401140\label{subsec:ZDF_drg_imp} 
    11411141 
    11421142An optional implicit form of bottom friction has been implemented to improve model stability. 
    11431143We recommend this option for shelf sea and coastal ocean applications. %, especially for split-explicit time splitting. 
    1144 This option can be invoked by setting \np{ln\_drgimp} to \forcode{.true.} in the \nam{drg} namelist. 
    1145 %This option requires \np{ln\_zdfexp} to be \forcode{.false.} in the \nam{zdf} namelist. 
     1144This option can be invoked by setting \np{ln_drgimp}{ln\_drgimp} to \forcode{.true.} in the \nam{drg} namelist. 
     1145%This option requires \np{ln_zdfexp}{ln\_zdfexp} to be \forcode{.false.} in the \nam{zdf} namelist. 
    11461146 
    11471147This implementation is performed in \mdl{dynzdf} where the following boundary conditions are set while solving the fully implicit diffusion step: 
     
    11701170\label{subsec:ZDF_drg_ts} 
    11711171 
    1172 With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np{ln\_drgimp}\forcode{= .false.} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw=.false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np{ln\_drgimp}\forcode{= .true.},  stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 
     1172With split-explicit free surface, the sub-stepping of barotropic equations needs the knowledge of top/bottom stresses. An obvious way to satisfy this is to take them as constant over the course of the barotropic integration and equal to the value used to update the baroclinic momentum trend. Provided \np{ln_drgimp}{ln\_drgimp}\forcode{= .false.} and a centred or \textit{leap-frog} like integration of barotropic equations is used (\ie\ \forcode{ln_bt_fw=.false.}, cf \autoref{subsec:DYN_spg_ts}), this does ensure that barotropic and baroclinic dynamics feel the same stresses during one leapfrog time step. However, if \np{ln\_drgimp}\forcode{= .true.},  stresses depend on the \textit{after} value of the velocities which themselves depend on the barotropic iteration result. This cyclic dependency makes difficult obtaining consistent stresses in 2d and 3d dynamics. Part of this mismatch is then removed when setting the final barotropic component of 3d velocities to the time splitting estimate. This last step can be seen as a necessary evil but should be minimized since it interferes with the adjustment to the boundary conditions. 
    11731173 
    11741174The strategy to handle top/bottom stresses with split-explicit free surface in \NEMO\ is as follows: 
     
    11841184% Internal wave-driven mixing 
    11851185% ================================================================ 
    1186 \section[Internal wave-driven mixing (\forcode{ln_zdfiwm})]{Internal wave-driven mixing (\protect\np{ln\_zdfiwm})} 
     1186\section[Internal wave-driven mixing (\forcode{ln_zdfiwm})]{Internal wave-driven mixing (\protect\np{ln_zdfiwm}{ln\_zdfiwm})} 
    11871187\label{subsec:ZDF_tmx_new} 
    11881188 
     
    12061206where $R_f$ is the mixing efficiency and $\epsilon$ is a specified three dimensional distribution of 
    12071207the energy available for mixing. 
    1208 If the \np{ln\_mevar} namelist parameter is set to \forcode{.false.}, the mixing efficiency is taken as constant and 
     1208If the \np{ln_mevar}{ln\_mevar} namelist parameter is set to \forcode{.false.}, the mixing efficiency is taken as constant and 
    12091209equal to 1/6 \citep{osborn_JPO80}. 
    12101210In the opposite (recommended) case, $R_f$ is instead a function of 
     
    12161216 
    12171217In addition to the mixing efficiency, the ratio of salt to heat diffusivities can chosen to vary 
    1218 as a function of $Re_b$ by setting the \np{ln\_tsdiff} parameter to \forcode{.true.}, a recommended choice. 
     1218as a function of $Re_b$ by setting the \np{ln_tsdiff}{ln\_tsdiff} parameter to \forcode{.true.}, a recommended choice. 
    12191219This parameterization of differential mixing, due to \cite{jackson.rehmann_JPO14}, 
    12201220is implemented as in \cite{de-lavergne.madec.ea_JPO16}. 
     
    12341234  h_{wkb} = H \, \frac{ \int_{-H}^{z} N \, dz' } { \int_{-H}^{\eta} N \, dz'  } \; , 
    12351235\] 
    1236 The $n_p$ parameter (given by \np{nn\_zpyc} in \nam{zdf\_iwm} namelist) 
     1236The $n_p$ parameter (given by \np{nn_zpyc}{nn\_zpyc} in \nam{zdf_iwm}{zdf\_iwm} namelist) 
    12371237controls the stratification-dependence of the pycnocline-intensified dissipation. 
    12381238It can take values of $1$ (recommended) or $2$. 
     
    12481248% surface wave-induced mixing 
    12491249% ================================================================ 
    1250 \section[Surface wave-induced mixing (\forcode{ln_zdfswm})]{Surface wave-induced mixing (\protect\np{ln\_zdfswm})} 
     1250\section[Surface wave-induced mixing (\forcode{ln_zdfswm})]{Surface wave-induced mixing (\protect\np{ln_zdfswm}{ln\_zdfswm})} 
    12511251\label{subsec:ZDF_swm} 
    12521252 
     
    12811281% Adaptive-implicit vertical advection 
    12821282% ================================================================ 
    1283 \section[Adaptive-implicit vertical advection (\forcode{ln_zad_Aimp})]{Adaptive-implicit vertical advection(\protect\np{ln\_zad\_Aimp})} 
     1283\section[Adaptive-implicit vertical advection (\forcode{ln_zad_Aimp})]{Adaptive-implicit vertical advection(\protect\np{ln_zad_Aimp}{ln\_zad\_Aimp})} 
    12841284\label{subsec:ZDF_aimp} 
    12851285 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_cfgs.tex

    r11571 r11577  
    253253 
    254254The GYRE configuration is set like an analytical configuration. 
    255 Through \np{ln\_read\_cfg}\forcode{ = .false.} in \nam{cfg} namelist defined in 
     255Through \np{ln_read_cfg}{ln\_read\_cfg}\forcode{ = .false.} in \nam{cfg} namelist defined in 
    256256the reference configuration \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg} 
    257257analytical definition of grid in GYRE is done in usrdef\_hrg, usrdef\_zgr routines. 
    258258Its horizontal resolution (and thus the size of the domain) is determined by 
    259 setting \np{nn\_GYRE} in \nam{usr\_def}: \\ 
    260  
    261 \jp{jpiglo} $= 30 \times$ \np{nn\_GYRE} + 2   \\ 
    262  
    263 \jp{jpjglo} $= 20 \times$ \np{nn\_GYRE} + 2   \\ 
     259setting \np{nn_GYRE}{nn\_GYRE} in \nam{usr_def}{usr\_def}: \\ 
     260 
     261\jp{jpiglo} $= 30 \times$ \np{nn_GYRE}{nn\_GYRE} + 2   \\ 
     262 
     263\jp{jpjglo} $= 20 \times$ \np{nn_GYRE}{nn\_GYRE} + 2   \\ 
    264264 
    265265Obviously, the namelist parameters have to be adjusted to the chosen resolution, 
     
    271271For example, keeping a same model size on each processor while increasing the number of processor used is very easy, 
    272272even though the physical integrity of the solution can be compromised. 
    273 Benchmark is activate via \np{ln\_bench}\forcode{ = .true.} in \nam{usr\_def} in 
     273Benchmark is activate via \np{ln_bench}{ln\_bench}\forcode{ = .true.} in \nam{usr_def}{usr\_def} in 
    274274namelist \path{./cfgs/GYRE_PISCES/EXPREF/namelist_cfg}. 
    275275 
     
    299299In particular, the AMM uses $s$-coordinates in the vertical rather than $z$-coordinates and 
    300300is forced with tidal lateral boundary conditions using a Flather boundary condition from the BDY module. 
    301 Also specific to the AMM configuration is the use of the GLS turbulence scheme (\np{ln\_zdfgls} \forcode{= .true.}). 
     301Also specific to the AMM configuration is the use of the GLS turbulence scheme (\np{ln_zdfgls}{ln\_zdfgls} \forcode{= .true.}). 
    302302 
    303303In addition to the tidal boundary condition the model may also take open boundary conditions from 
    304304a North Atlantic model. 
    305 Boundaries may be completely omitted by setting \np{ln\_bdy} to false. 
     305Boundaries may be completely omitted by setting \np{ln_bdy}{ln\_bdy} to false. 
    306306Sample surface fluxes, river forcing and a sample initial restart file are included to test a realistic model run. 
    307307The Baltic boundary is included within the river input file and is specified as a river source. 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_misc.tex

    r11571 r11577  
    5353\begin{itemize} 
    5454 
    55 \item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn\_domcfg} file. These 2D 
     55\item Add \texttt{e1e2u} and \texttt{e1e2v} arrays to the \np{cn_domcfg}{cn\_domcfg} file. These 2D 
    5656arrays should contain the products of the unaltered values of: $\texttt{e1u}*\texttt{e2u}$ 
    5757and $\texttt{e1u}*\texttt{e2v}$ respectively. That is the original surface areas of $u$- 
    5858and $v$- cells respectively.  These areas are usually defined by the corresponding product 
    5959within the \NEMO\ code but the presence of \texttt{e1e2u} and \texttt{e1e2v} in the 
    60 \np{cn\_domcfg} file will suppress this calculation and use the supplied fields instead. 
     60\np{cn_domcfg}{cn\_domcfg} file will suppress this calculation and use the supplied fields instead. 
    6161If the model domain is provided by user-supplied code in \mdl{usrdef\_hgr}, then this 
    6262routine should also return \texttt{e1e2u} and \texttt{e1e2v} and set the integer return 
     
    6464will suppress the calculation of the areas. 
    6565 
    66 \item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn\_domcfg} file or 
     66\item Change values of \texttt{e2u} or \texttt{e1v} (either in the \np{cn_domcfg}{cn\_domcfg} file or 
    6767via code in  \mdl{usrdef\_hgr}), whereever a Strait reduction is required. The choice of 
    6868whether to alter \texttt{e2u} or \texttt{e1v} depends. respectively,  on whether the 
     
    198198maintain different sets of input fields for use with or without active ice cavities.  This 
    199199subsetting operates for the j-direction only and works by optionally looking for and using 
    200 a global file attribute (named: \np{open\_ocean\_jstart}) to determine the starting j-row 
     200a global file attribute (named: \np{open_ocean_jstart}{open\_ocean\_jstart}) to determine the starting j-row 
    201201for input.  The use of this option is best explained with an example: 
    202202\medskip 
     
    206206This file define a horizontal domain of 362x332.  The first row with 
    207207open ocean wet points in the non-isf bathymetry for this set is row 42 (\fortran\ indexing) 
    208 then the formally correct setting for \np{open\_ocean\_jstart} is 41.  Using this value as 
     208then the formally correct setting for \np{open_ocean_jstart}{open\_ocean\_jstart} is 41.  Using this value as 
    209209the first row to be read will result in a 362x292 domain which is the same size as the 
    210210original ORCA1 domain.  Thus the extended domain configuration file can be used with all 
     
    218218\end{cmds} 
    219219 
    220 \item Add the logical switch \np{ln\_use\_jattr} to \nam{cfg} in the configuration 
    221 namelist (if it is not already there) and set \np{.true.} 
     220\item Add the logical switch \np{ln_use_jattr}{ln\_use\_jattr} to \nam{cfg} in the configuration 
     221namelist (if it is not already there) and set \forcode{.true.} 
    222222\end{itemize} 
    223223 
    224224\noindent Note that with this option, the j-size of the global domain is (extended 
    225 j-size minus \np{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value 
     225j-size minus \np{open_ocean_jstart}{open\_ocean\_jstart} + 1 ) and this must match the \texttt{jpjglo} value 
    226226for the configuration. This means an alternative version of \ifile{eORCA1\_domcfg.nc} must 
    227 be created for when \np{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a 
     227be created for when \np{ln_use_jattr}{ln\_use\_jattr} is active. The \texttt{ncap2} tool provides a 
    228228convenient way of achieving this: 
    229229 
     
    237237\texttt{open\_ocean\_jstart} attribute to the file's global attributes. 
    238238In particular this is true for any field that is read by \NEMO\ using the following optional argument to 
    239 the appropriate call to \np{iom\_get}. 
     239the appropriate call to \np{iom_get}{iom\_get}. 
    240240 
    241241\begin{forlines} 
     
    332332This alternative method should give identical results to the default \textsc{ALLGATHER} method and 
    333333is recommended for large values of \np{jpni}. 
    334 The new method is activated by setting \np{ln\_nnogather} to be true (\nam{mpp}). 
     334The new method is activated by setting \np{ln_nnogather}{ln\_nnogather} to be true (\nam{mpp}). 
    335335The reproducibility of results using the two methods should be confirmed for each new, 
    336336non-reference configuration. 
     
    364364\subsection{Control print} 
    365365 
    366 The \np{ln\_ctl} switch was originally used as a debugging option in two modes: 
     366The \np{ln_ctl}{ln\_ctl} switch was originally used as a debugging option in two modes: 
    367367 
    368368\begin{enumerate} 
    369 \item{\np{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and 
     369\item{\np{ln_ctl}{ln\_ctl}: compute and print the trends averaged over the interior domain in all TRA, DYN, LDF and 
    370370ZDF modules. 
    371371This option is very helpful when diagnosing the origin of an undesired change in model results. } 
    372372 
    373 \item{also \np{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between 
     373\item{also \np{ln_ctl}{ln\_ctl} but using the nictl and njctl namelist parameters to check the source of differences between 
    374374mono and multi processor runs.} 
    375375\end{enumerate} 
    376376 
    377377However, in recent versions it has also been used to force all processors to assume the 
    378 reporting role. Thus when \np{ln\_ctl} is true all processors produce their own versions 
     378reporting role. Thus when \np{ln_ctl}{ln\_ctl} is true all processors produce their own versions 
    379379of files such as: ocean.output, layout.dat, etc.  All such files, beyond the the normal 
    380380reporting processor (narea == 1), are named with a \_XXXX extension to their name, where 
     
    382382such as run.stat (and its netCDF counterpart: run.stat.nc) and tracer.stat contain global 
    383383information and are only ever produced by the reporting master (narea == 1). For version 
    384 4.0 a start has been made to return \np{ln\_ctl} to its original function by introducing 
     3844.0 a start has been made to return \np{ln_ctl}{ln\_ctl} to its original function by introducing 
    385385a new control structure which allows finer control over which files are produced. This 
    386386feature is still evolving but it does already allow the user to: select individually the 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_model_basics_zstar.tex

    r11571 r11577  
    7979%\nlst{nam_dynspg} 
    8080%------------------------------------------------------------------------------------------------------------ 
    81 Options are defined through the \nam{\_dynspg} namelist variables. 
     81Options are defined through the \nam{_dynspg}{\_dynspg} namelist variables. 
    8282The surface pressure gradient term is related to the representation of the free surface (\autoref{sec:MB_hor_pg}). 
    8383The main distinction is between the fixed volume case (linear free surface or rigid lid) and 
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_time_domain.tex

    r11567 r11577  
    8585\end{equation} 
    8686where the subscript $F$ denotes filtered values and $\gamma$ is the Asselin coefficient. 
    87 $\gamma$ is initialized as \np{rn\_atfp} (namelist parameter). 
    88 Its default value is \np{rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:TD_mLF}), 
     87$\gamma$ is initialized as \np{rn_atfp}{rn\_atfp} (namelist parameter). 
     88Its default value is \np{rn_atfp}{rn\_atfp}\forcode{ = 10.e-3} (see \autoref{sec:TD_mLF}), 
    8989causing only a weak dissipation of high frequency motions (\citep{farge-coulombier_phd87}). 
    9090The addition of a time filter degrades the accuracy of the calculation from second to first order. 
     
    172172 
    173173The leapfrog environment supports a centred in time computation of the surface pressure, \ie\ evaluated 
    174 at \textit{now} time step. This refers to as the explicit free surface case in the code (\np{ln\_dynspg\_exp}\forcode{=.true.}). 
     174at \textit{now} time step. This refers to as the explicit free surface case in the code (\np{ln_dynspg_exp}{ln\_dynspg\_exp}\forcode{=.true.}). 
    175175This choice however imposes a strong constraint on the time step which should be small enough to resolve the propagation 
    176176of external gravity waves. As a matter of fact, one rather use in a realistic setup, a split-explicit free surface 
    177 (\np{ln\_dynspg\_ts}\forcode{=.true.}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc 
     177(\np{ln_dynspg_ts}{ln\_dynspg\_ts}\forcode{=.true.}) in which barotropic and baroclinic dynamical equations are solved separately with ad-hoc 
    178178time steps. The use of the time-splitting (in combination with non-linear free surface) imposes some constraints on the design of 
    179179the overall flowchart, in particular to ensure exact tracer conservation (see \autoref{fig:TD_TimeStep_flowchart}). 
     
    297297When restarting, if the time step has been changed, or one of the prognostic variables at \textit{before} time step 
    298298is missing, an Euler time stepping scheme is imposed. A forward initial step can still be enforced by the user by setting 
    299 the namelist variable \np{nn\_euler}\forcode{=0}. Other options to control the time integration of the model 
     299the namelist variable \np{nn_euler}{nn\_euler}\forcode{=0}. Other options to control the time integration of the model 
    300300are defined through the  \nam{run} namelist variables. 
    301301%%% 
  • NEMO/trunk/doc/latex/global/document.tex

    r11572 r11577  
    1111 
    1212%% Document layout 
    13 \documentclass[fontsize = 10pt, twoside, abstract, draft]{scrreprt} 
     13\documentclass[fontsize = 10pt, twoside, abstract]{scrreprt} 
    1414 
    1515%% Load configurations 
  • NEMO/trunk/doc/latex/global/index.ist

    r11572 r11577  
    11headings_flag 1 
    2 heading_prefix "{\\medskip\\hfill\\large{" 
    3 heading_suffix "}}\\hfill}\\smallskip\n" 
     2heading_prefix "\\medskip\\hfill\\textnormal{" 
     3heading_suffix "}\\hfill\\smallskip\n" 
    44 
    55delim_0 "\\dotfill~" 
  • NEMO/trunk/doc/latex/global/indexes.tex

    r11572 r11577  
    11 
    22\usepackage{imakeidx} 
     3 
     4%% Naming customization 
     5\renewcommand{\listingname}{namelist} 
     6\renewcommand{\listlistingname}{List of Namelists} 
    37 
    48%% Index entries (italic font for files, preformat for code) 
     
    812\newcommand{\key}[1]{  \index[keys]{#1@\texttt{\textbf{key\_#1}}} \texttt{\textbf{key\_#1}}} 
    913\newcommand{\mdl}[1]{  \index[modules]{#1@\textit{#1.F90}}        \textit{#1.F90}          } 
    10 \newcommand{\nam}[1]{  \index[blocks]{#1@\texttt{\&nam#1}}        \forcode{&nam#1}         } 
    11 \newcommand{\np}[1]{   \index[parameters]{#1@\texttt{#1}}         \texttt{#1}              } 
    12 \newcommand{\npnew}[2][]{\index[parameters]{#2@\texttt{#2}}       \forcode{#2#1}           } 
     14\newcommand{\nam}[2]{  \index[blocks]{\texttt{\&nam#2}}   \forcode{&nam#1} (\autoref{lst:nam#1})         } 
     15\newcommand{\np}[3][]{\index[parameters]{\texttt{#3}}       \forcode{#2#1}           } 
     16%\newcommand{\nam}[1]{  \index[blocks]{\texttt{\&nam#1}}           \forcode{&nam#1}         } 
     17%\newcommand{\np}[1]{   \index[parameters]{\texttt{#1}}            \forcode{#1}              } 
    1318\newcommand{\rou}[1]{  \index[subroutines]{#1@\texttt{#1}}        \texttt{#1}              } 
     19 
    1420 
    1521\indexsetup{toclevel=section, othercode=\small} 
  • NEMO/trunk/doc/latex/global/preamble.tex

    r11572 r11577  
    2323\renewcommand{\equationautorefname}{equation} 
    2424\renewcommand{\figureautorefname}{figure} 
    25 %\renewcommand{\listingautorefname}{namelist} 
    2625\renewcommand{\tableautorefname}{table} 
Note: See TracChangeset for help on using the changeset viewer.