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

Ignore:
Timestamp:
2019-09-19T19:44:36+02:00 (5 years ago)
Author:
nicolasmartin
Message:

New LaTeX commands \nam and \np to mention namelist content (step 2)
So far so good, the manual compiles successfully 4 times and everything seems in its right place

File:
1 edited

Legend:

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

    r11577 r11578  
    4343%The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 
    4444 
    45 Options are defined through the \nam{lbc} namelist variables. 
     45Options are defined through the \nam{lbc}{lbc} namelist variables. 
    4646The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to 
    4747arrays that include large portions where a computation is not required as the model variables remain at zero. 
     
    173173 
    174174The choice of closed or cyclic model domain boundary condition is made by 
    175 setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}. 
     175setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}{cfg}. 
    176176Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 
    177177The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, 
     
    296296The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched 
    297297(\ie\ mpirun -np x ./nemo will automatically give x subdomains). 
    298 The i-axis is divided by \np{jpni} and the j-axis by \np{jpnj}. 
    299 These parameters are defined in \nam{mpp} namelist. 
    300 If \np{jpni} and \np{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition 
     298The i-axis is divided by \np{jpni}{jpni} and the j-axis by \np{jpnj}{jpnj}. 
     299These parameters are defined in \nam{mpp}{mpp} namelist. 
     300If \np{jpni}{jpni} and \np{jpnj}{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition 
    301301(see bellow). 
    302302 
     
    330330  N_{mpi} = jpni \times jpnj - N_{land} + N_{useless} 
    331331\] 
    332 $N_{land}$ is the total number of land subdomains in the domain decomposition defined by \np{jpni} and \np{jpnj}. $N_{useless}$ is the number of land subdomains that are kept in the compuational domain in order to make sure that $N_{mpi}$ MPI processes are indeed allocated to a given subdomain. The values of $N_{mpi}$, \np{jpni}, \np{jpnj},  $N_{land}$ and $N_{useless}$ are printed in the output file \texttt{ocean.output}. $N_{useless}$ must, of course, be as small as possible to limit the waste of ressources. A warning is issued in  \texttt{ocean.output} if $N_{useless}$ is not zero. Note that non-zero value of $N_{useless}$ is uselly required when using AGRIF as, up to now, the parent grid and each of the child grids must use all the $N_{mpi}$ processes. 
    333  
    334 If the domain decomposition is automatically defined (when \np{jpni} and \np{jpnj} are < 1), the decomposition chosen by the model will minimise the sub-domain size (defined as $max_{all domains}(jpi \times jpj)$) and maximize the number of eliminated land subdomains. This means that no other domain decomposition (a set of \np{jpni} and \np{jpnj} values) will use less processes than $(jpni  \times  jpnj - N_{land})$ and get a smaller subdomain size. 
    335 In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln_list}{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni} and \np{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, jpni \times jpnj)$. For example, run the model on 40 nodes with ln\_list activated and $jpni = 10000$ and $jpnj = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 
    336  
    337 Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}, \np{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$. 
     332$N_{land}$ is the total number of land subdomains in the domain decomposition defined by \np{jpni}{jpni} and \np{jpnj}{jpnj}. $N_{useless}$ is the number of land subdomains that are kept in the compuational domain in order to make sure that $N_{mpi}$ MPI processes are indeed allocated to a given subdomain. The values of $N_{mpi}$, \np{jpni}{jpni}, \np{jpnj}{jpnj},  $N_{land}$ and $N_{useless}$ are printed in the output file \texttt{ocean.output}. $N_{useless}$ must, of course, be as small as possible to limit the waste of ressources. A warning is issued in  \texttt{ocean.output} if $N_{useless}$ is not zero. Note that non-zero value of $N_{useless}$ is uselly required when using AGRIF as, up to now, the parent grid and each of the child grids must use all the $N_{mpi}$ processes. 
     333 
     334If the domain decomposition is automatically defined (when \np{jpni}{jpni} and \np{jpnj}{jpnj} are < 1), the decomposition chosen by the model will minimise the sub-domain size (defined as $max_{all domains}(jpi \times jpj)$) and maximize the number of eliminated land subdomains. This means that no other domain decomposition (a set of \np{jpni}{jpni} and \np{jpnj}{jpnj} values) will use less processes than $(jpni  \times  jpnj - N_{land})$ and get a smaller subdomain size. 
     335In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{ln_list}{ln\_list} activated. In this case, the model will start the initialisation phase, print the list of optimum decompositions ($N_{mpi}$, \np{jpni}{jpni} and \np{jpnj}{jpnj}) in \texttt{ocean.output} and directly abort. The maximum value of $N_{mpi}$ tested in this list is given by $max(N_{MPI\_tasks}, jpni \times jpnj)$. For example, run the model on 40 nodes with ln\_list activated and $jpni = 10000$ and $jpnj = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 
     336 
     337Processors are numbered from 0 to $N_{mpi} - 1$. Subdomains containning some ocean points are numbered first from 0 to $jpni * jpnj - N_{land} -1$. The remaining $N_{useless}$ land subdomains are numbered next, which means that, for a given (\np{jpni}{jpni}, \np{jpnj}{jpnj}), the numbers attributed to he ocean subdomains do not vary with $N_{useless}$. 
    338338 
    339339When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{ln_mskland}{ln\_mskland} must be activated in order avoid Not a Number values in output files. Note that it is better to not eliminate land processors when creating a meshmask file (\ie\ when setting a non-zero value to \np{nn_msh}{nn\_msh}). 
     
    378378%----------------------------------------------------------------------------------------------- 
    379379 
    380 Options are defined through the \nam{bdy} and \nam{bdy_dta}{bdy\_dta} namelist variables. 
     380Options are defined through the \nam{bdy}{bdy} and \nam{bdy_dta}{bdy\_dta} namelist variables. 
    381381The BDY module is the core implementation of open boundary conditions for regional configurations on 
    382382ocean temperature, salinity, barotropic-baroclinic velocities, ice-snow concentration, thicknesses, temperatures, salinity and melt ponds concentration and thickness. 
     
    397397The number of boundary sets is defined by \np{nb_bdy}{nb\_bdy}. 
    398398Each 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}\forcode{=.true.}, and a ``\ifile{coordinates.bdy}'' file must be provided). 
     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). 
    400400The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 
    401401In the example above, there are two boundary sets, the first of which is defined via a file and 
     
    422422 
    423423The 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}\forcode{=1}). 
     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}). 
    425425In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 
    426426the bdy code can derived baroclinic and barotropic velocities by setting \np{ln_full_vel}{ln\_full\_vel}\forcode{=.true.} 
    427427For 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}\forcode{=3}).\\ 
     428itself (\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}).\\ 
    429429If 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}. 
    430430 
     
    700700tides (i.e., in \nam{_tide}{\_tide}, \np{ln_tide}{ln\_tide} needs to be set to 
    701701\forcode{.true.} and the required constituents need to be activated by 
    702 including their names in the \np{clname} array; see 
     702including their names in the \np{clname}{clname} array; see 
    703703\autoref{sec:SBC_tide}). Specific options related to the reading in of 
    704704the complex harmonic amplitudes of elevation (SSH) and barotropic 
     
    715715separately: when two-dimensional data is used, variables 
    716716\textit{tcname\_z1} and \textit{tcname\_z2} for real and imaginary SSH, 
    717 respectively, are expected in input file \np{filtide} with suffix 
     717respectively, are expected in input file \np{filtide}{filtide} with suffix 
    718718\ifile{\_grid\_T}, variables \textit{tcname\_u1} and 
    719719\textit{tcname\_u2} for real and imaginary u, respectively, are 
    720 expected in input file \np{filtide} with suffix \ifile{\_grid\_U}, and 
     720expected in input file \np{filtide}{filtide} with suffix \ifile{\_grid\_U}, and 
    721721\textit{tcname\_v1} and \textit{tcname\_v2} for real and imaginary v, 
    722 respectively, are expected in input file \np{filtide} with suffix 
     722respectively, are expected in input file \np{filtide}{filtide} with suffix 
    723723\ifile{\_grid\_V}; when data along open boundary segments is used, 
    724724variables \textit{z1} and \textit{z2} (real and imaginary part of SSH) 
    725 are expected to be available from file \np{filtide} with suffix 
     725are expected to be available from file \np{filtide}{filtide} with suffix 
    726726\ifile{tcname\_grid\_T}, variables \textit{u1} and \textit{u2} (real 
    727727and imaginary part of u) are expected to be available from file 
    728 \np{filtide} with suffix \ifile{tcname\_grid\_U}, and variables 
     728\np{filtide}{filtide} with suffix \ifile{tcname\_grid\_U}, and variables 
    729729\textit{v1} and \textit{v2} (real and imaginary part of v) are 
    730 expected to be available from file \np{filtide} with suffix 
     730expected to be available from file \np{filtide}{filtide} with suffix 
    731731\ifile{tcname\_grid\_V}. If \np{ln_bdytide_conj}{ln\_bdytide\_conj} is set to 
    732732\forcode{.true.}, the data is expected to be in complex conjugate 
Note: See TracChangeset for help on using the changeset viewer.