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