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

Ignore:
Timestamp:
2019-09-20T11:44:31+02:00 (5 years ago)
Author:
nicolasmartin
Message:

New LaTeX commands \nam and \np to mention namelist content (step 2)
Finally convert \forcode{...} following \np{}{} into optional arg of the new command \np[]{}{}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/latex/NEMO/subfiles/chap_LBC.tex

    r11578 r11582  
    11\documentclass[../main/NEMO_manual]{subfiles} 
     2 
     3\onlyinsubfile{\makeindex} 
    24 
    35\begin{document} 
     
    101103  \caption[Lateral boundary conditions]{ 
    102104    Lateral boundary conditions 
    103     (a) free-slip                       (\protect\np{rn_shlat}{rn\_shlat}\forcode{=0}); 
    104     (b) no-slip                         (\protect\np{rn_shlat}{rn\_shlat}\forcode{=2}); 
    105     (c) "partial" free-slip (\forcode{0<}\protect\np{rn_shlat}{rn\_shlat}\forcode{<2}) and 
     105    (a) free-slip                       (\protect\np[=0]{rn_shlat}{rn\_shlat}); 
     106    (b) no-slip                         (\protect\np[=2]{rn_shlat}{rn\_shlat}); 
     107    (c) "partial" free-slip (\forcode{0<}\protect\np[<2]{rn_shlat}{rn\_shlat}) and 
    106108    (d) "strong" no-slip    (\forcode{2<}\protect\np{rn_shlat}{rn\_shlat}). 
    107109    Implied "ghost" velocity inside land area is display in grey.} 
     
    112114\begin{description} 
    113115 
    114 \item[free-slip boundary condition (\np{rn_shlat}{rn\_shlat}\forcode{=0}):] the tangential velocity at 
     116\item[free-slip boundary condition ({\np[=0]{rn_shlat}{rn\_shlat}})] the tangential velocity at 
    115117  the coastline is equal to the offshore velocity, 
    116118  \ie\ the normal derivative of the tangential velocity is zero at the coast, 
     
    118120  (\autoref{fig:LBC_shlat}-a). 
    119121 
    120 \item[no-slip boundary condition (\np{rn_shlat}{rn\_shlat}\forcode{=2}):] the tangential velocity vanishes at the coastline. 
     122\item[no-slip boundary condition ({\np[=2]{rn_shlat}{rn\_shlat}})] the tangential velocity vanishes at the coastline. 
    121123  Assuming that the tangential velocity decreases linearly from 
    122124  the closest ocean velocity grid point to the coastline, 
     
    139141  \] 
    140142 
    141 \item["partial" free-slip boundary condition (0$<$\np{rn_shlat}{rn\_shlat}$<$2):] the tangential velocity at 
     143\item["partial" free-slip boundary condition (0$<$\np{rn_shlat}{rn\_shlat}$<$2)] the tangential velocity at 
    142144  the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but 
    143145  not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 
    144146  This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. 
    145147 
    146 \item["strong" no-slip boundary condition (2$<$\np{rn_shlat}{rn\_shlat}):] the viscous boundary layer is assumed to 
     148\item["strong" no-slip boundary condition (2$<$\np{rn_shlat}{rn\_shlat})] the viscous boundary layer is assumed to 
    147149  be smaller than half the grid size (\autoref{fig:LBC_shlat}-d). 
    148150  The friction is thus larger than in the no-slip case. 
     
    393395\label{subsec:LBC_bdy_namelist} 
    394396 
    395 The BDY module is activated by setting \np{ln_bdy}{ln\_bdy}\forcode{=.true.} . 
     397The BDY module is activated by setting \np[=.true.]{ln_bdy}{ln\_bdy} . 
    396398It is possible to define more than one boundary ``set'' and apply different boundary conditions to each set. 
    397399The number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}. 
    398400Each boundary set can be either defined as a series of straight line segments directly in the namelist 
    399 (\np{ln_coords_file}{ln\_coords\_file}\forcode{=.false.}, and a namelist block \nam{bdy_index}{bdy\_index} must be included for each set) or read in from a file (\np{ln_coords_file}{ln\_coords\_file}\forcode{=.true.}, and a ``\ifile{coordinates.bdy}'' file must be provided). 
     401(\np[=.false.]{ln_coords_file}{ln\_coords\_file}, and a namelist block \nam{bdy_index}{bdy\_index} must be included for each set) or read in from a file (\np[=.true.]{ln_coords_file}{ln\_coords\_file}, and a ``\ifile{coordinates.bdy}'' file must be provided). 
    400402The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 
    401403In the example above, there are two boundary sets, the first of which is defined via a file and 
     
    422424 
    423425The boundary data is either set to initial conditions 
    424 (\np{nn_tra_dta}{nn\_tra\_dta}\forcode{=0}) or forced with external data from a file (\np{nn_tra_dta}{nn\_tra\_dta}\forcode{=1}). 
     426(\np[=0]{nn_tra_dta}{nn\_tra\_dta}) or forced with external data from a file (\np[=1]{nn_tra_dta}{nn\_tra\_dta}). 
    425427In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 
    426 the bdy code can derived baroclinic and barotropic velocities by setting \np{ln_full_vel}{ln\_full\_vel}\forcode{=.true.} 
     428the bdy code can derived baroclinic and barotropic velocities by setting \np[=.true.]{ln_full_vel}{ln\_full\_vel} 
    427429For the barotropic solution there is also the option to use tidal harmonic forcing either by 
    428 itself (\np{nn_dyn2d_dta}{nn\_dyn2d\_dta}\forcode{=2}) or in addition to other external data (\np{nn_dyn2d_dta}{nn\_dyn2d\_dta}\forcode{=3}).\\ 
     430itself (\np[=2]{nn_dyn2d_dta}{nn\_dyn2d\_dta}) or in addition to other external data (\np[=3]{nn_dyn2d_dta}{nn\_dyn2d\_dta}).\\ 
    429431If not set to initial conditions, sea-ice salinity, temperatures and melt ponds data at the boundary can either be read in a file or defined as constant (by \np{rn_ice_sal}{rn\_ice\_sal}, \np{rn_ice_tem}{rn\_ice\_tem}, \np{rn_ice_apnd}{rn\_ice\_apnd}, \np{rn_ice_hpnd}{rn\_ice\_hpnd}). Ice age is constant and defined by \np{rn_ice_age}{rn\_ice\_age}. 
    430432 
     
    602604\jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
    603605These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 
    604 The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn_rimwidth}{nn\_rimwidth}\forcode{>1}. 
     606The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np[>1]{nn_rimwidth}{nn\_rimwidth}. 
    605607 
    606608The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 
     
    673675There is an option to force the total volume in the regional model to be constant. 
    674676This is controlled  by the \np{ln_vol}{ln\_vol} parameter in the namelist. 
    675 A value of \np{ln_vol}{ln\_vol}\forcode{=.false.} indicates that this option is not used. 
     677A value of \np[=.false.]{ln_vol}{ln\_vol} indicates that this option is not used. 
    676678Two options to control the volume are available (\np{nn_volctl}{nn\_volctl}). 
    677 If \np{nn_volctl}{nn\_volctl}\forcode{=0} then a correction is applied to the normal barotropic velocities around the boundary at 
     679If \np[=0]{nn_volctl}{nn\_volctl} then a correction is applied to the normal barotropic velocities around the boundary at 
    678680each timestep to ensure that the integrated volume flow through the boundary is zero. 
    679 If \np{nn_volctl}{nn\_volctl}\forcode{=1} then the calculation of the volume change on 
     681If \np[=1]{nn_volctl}{nn\_volctl} then the calculation of the volume change on 
    680682the timestep includes the change due to the freshwater flux across the surface and 
    681683the correction velocity corrects for this as well. 
     
    741743direction of rotation). %, e.g. anticlockwise or clockwise. 
    742744 
    743 \biblio 
    744  
    745 \pindex 
     745\onlyinsubfile{\bibliography{../main/bibliography}} 
     746 
     747\onlyinsubfile{\printindex} 
    746748 
    747749\end{document} 
Note: See TracChangeset for help on using the changeset viewer.