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