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