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_time_domain.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_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%%% 
Note: See TracChangeset for help on using the changeset viewer.