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 for NEMO/trunk/doc/latex/NEMO/subfiles/chap_DYN.tex – NEMO

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

Legend:

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