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

Ignore:
Timestamp:
2019-09-13T15:57:52+02:00 (5 years ago)
Author:
nicolasmartin
Message:

Implementation of convention for labelling references + files renaming
Now each reference is supposed to have the information of the chapter in its name
to identify quickly which file contains the reference (\label{$prefix:$chap_...)

Rename the appendices from 'annex_' to 'apdx_' to conform with the prefix used in labels (apdx:...)
Suppress the letter numbering

File:
1 edited

Legend:

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

    r11537 r11543  
    5757 
    5858\[ 
    59   % \label{eq:lbc_aaaa} 
     59  % \label{eq:LBC_aaaa} 
    6060  \frac{A^{lT} }{e_1 }\frac{\partial T}{\partial i}\equiv \frac{A_u^{lT} 
    6161  }{e_{1u} } \; \delta_{i+1 / 2} \left[ T \right]\;\;mask_u 
     
    134134  the no-slip boundary condition, simply by multiplying it by the mask$_{f}$ : 
    135135  \[ 
    136     % \label{eq:lbc_bbbb} 
     136    % \label{eq:LBC_bbbb} 
    137137    \zeta \equiv \frac{1}{e_{1f} {\kern 1pt}e_{2f} }\left( {\delta_{i+1/2} 
    138138        \left[ {e_{2v} \,v} \right]-\delta_{j+1/2} \left[ {e_{1u} \,u} \right]} 
     
    226226The north fold boundary condition has been introduced in order to handle the north boundary of 
    227227a three-polar ORCA grid. 
    228 Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh}, 
    229 and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 
     228Such a grid has two poles in the northern hemisphere (\autoref{fig:CFGS_ORCA_msh}, 
     229and thus requires a specific treatment illustrated in \autoref{fig:LBC_North_Fold_T}. 
    230230Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 
    231231 
     
    235235    \includegraphics[width=\textwidth]{Fig_North_Fold_T} 
    236236    \caption{ 
    237       \protect\label{fig:North_Fold_T} 
     237      \protect\label{fig:LBC_North_Fold_T} 
    238238      North fold boundary with a $T$-point pivot and cyclic east-west boundary condition ($jperio=4$), 
    239239      as used in ORCA 2, 1/4, and 1/12. 
     
    256256%----------------------------------------------------------------------------------------------- 
    257257 
    258 For massively parallel processing (mpp), a domain decomposition method is used. The basic idea of the method is to split the large computation domain of a numerical experiment into several smaller domains and solve the set of equations by addressing independent local problems. Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. The subdomain boundary conditions are specified through communications between processors which are organized by explicit statements (message passing method). The present implementation is largely inspired by Guyon's work [Guyon 1995]. 
     258For massively parallel processing (mpp), a domain decomposition method is used. 
     259The basic idea of the method is to split the large computation domain of a numerical experiment into several smaller domains and 
     260solve the set of equations by addressing independent local problems. 
     261Each processor has its own local memory and computes the model equation over a subdomain of the whole model domain. 
     262The subdomain boundary conditions are specified through communications between processors which are organized by 
     263explicit statements (message passing method). 
     264The present implementation is largely inspired by Guyon's work [Guyon 1995]. 
    259265 
    260266The parallelization strategy is defined by the physical characteristics of the ocean model. 
     
    272278each processor sends to its neighbouring processors the update values of the points corresponding to 
    273279the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). 
    274 Communications are first done according to the east-west direction and next according to the north-south direction. There is no specific communications for the corners. The communication is done through the Message Passing Interface (MPI) and requires \key{mpp\_mpi}. Use also \key{mpi2} if MPI3 is not available on your computer. 
     280Communications are first done according to the east-west direction and next according to the north-south direction. 
     281There is no specific communications for the corners. 
     282The communication is done through the Message Passing Interface (MPI) and requires \key{mpp\_mpi}. 
     283Use also \key{mpi2} if MPI3 is not available on your computer. 
    275284The data exchanges between processors are required at the very place where 
    276285lateral domain boundary conditions are set in the mono-domain computation: 
     
    285294    \includegraphics[width=\textwidth]{Fig_mpp} 
    286295    \caption{ 
    287       \protect\label{fig:mpp} 
     296      \protect\label{fig:LBC_mpp} 
    288297      Positioning of a sub-domain when massively parallel processing is used. 
    289298    } 
     
    292301%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    293302 
    294 In \NEMO, the splitting is regular and arithmetic. The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched (\ie\ mpirun -np x ./nemo will automatically give x subdomains). The i-axis is divided by \np{jpni} and the j-axis by \np{jpnj}. These parameters are defined in \nam{mpp} namelist. If \np{jpni} and \np{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition (see bellow). 
    295  
    296 Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory. For this reason, the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 
    297 These dimensions include the internal domain and the overlapping rows. The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce}, and must be kept to one until further notice). The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. The relationship between the whole domain and a sub-domain is: 
    298 \[ 
    299   jpi = ( jpiglo-2\times nn\_hls + (jpni-1) ) / jpni + 2\times nn\_hls 
    300 \] 
    301 \[ 
     303In \NEMO, the splitting is regular and arithmetic. 
     304The total number of subdomains corresponds to the number of MPI processes allocated to \NEMO\ when the model is launched 
     305(\ie\ mpirun -np x ./nemo will automatically give x subdomains). 
     306The i-axis is divided by \np{jpni} and the j-axis by \np{jpnj}. 
     307These parameters are defined in \nam{mpp} namelist. 
     308If \np{jpni} and \np{jpnj} are < 1, they will be automatically redefined in the code to give the best domain decomposition 
     309(see bellow). 
     310 
     311Each processor is independent and without message passing or synchronous process, programs run alone and access just its own local memory. 
     312For this reason, 
     313the main model dimensions are now the local dimensions of the subdomain (pencil) that are named \jp{jpi}, \jp{jpj}, \jp{jpk}. 
     314These dimensions include the internal domain and the overlapping rows. 
     315The number of rows to exchange (known as the halo) is usually set to one (nn\_hls=1, in \mdl{par\_oce}, 
     316and must be kept to one until further notice). 
     317The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 
     318The relationship between the whole domain and a sub-domain is: 
     319\begin{gather*} 
     320  jpi = ( jpiglo-2\times nn\_hls + (jpni-1) ) / jpni + 2\times nn\_hls \\ 
    302321  jpj = ( jpjglo-2\times nn\_hls + (jpnj-1) ) / jpnj + 2\times nn\_hls 
    303 \] 
    304  
    305 One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj. 
     322\end{gather*} 
     323 
     324One also defines variables nldi and nlei which correspond to the internal domain bounds, and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain (\autoref{fig:LBC_mpp}). Note that since the version 4, there is no more extra-halo area as defined in \autoref{fig:LBC_mpp} so \jp{jpi} is now always equal to nlci and \jp{jpj} equal to nlcj. 
    306325 
    307326An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 
    308327a global array (whole domain) by the relationship: 
    309328\[ 
    310   % \label{eq:lbc_nimpp} 
     329  % \label{eq:LBC_nimpp} 
    311330  T_{g} (i+nimpp-1,j+njmpp-1,k) = T_{l} (i,j,k), 
    312331\] 
     
    322341 
    323342If 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. 
    324 In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{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}, \np{jpni} \times \np{jpnj})$. For example, run the model on 40 nodes with ln\_list activated and $\np{jpni} = 10000$ and $\np{jpnj} = 1$, will print the list of optimum domains decomposition from 1 to about 10000.  
    325  
    326 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}$.  
     343In order to specify $N_{mpi}$ properly (minimize $N_{useless}$), you must run the model once with \np{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}, \np{jpni} \times \np{jpnj})$. For example, run the model on 40 nodes with ln\_list activated and $\np{jpni} = 10000$ and $\np{jpnj} = 1$, will print the list of optimum domains decomposition from 1 to about 10000. 
     344 
     345Processors 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}$. 
    327346 
    328347When land processors are eliminated, the value corresponding to these locations in the model output files is undefined. \np{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}). 
     
    332351  \begin{center} 
    333352    \includegraphics[width=\textwidth]{Fig_mppini2} 
    334     \caption { 
    335       \protect\label{fig:mppini2} 
     353    \caption[Atlantic domain]{ 
     354      \protect\label{fig:LBC_mppini2} 
    336355      Example of Atlantic domain defined for the CLIPPER projet. 
    337356      Initial grid is composed of 773 x 1236 horizontal points. 
     
    374393%---------------------------------------------- 
    375394\subsection{Namelists} 
    376 \label{subsec:BDY_namelist} 
     395\label{subsec:LBC_bdy_namelist} 
    377396 
    378397The BDY module is activated by setting \np{ln\_bdy}\forcode{=.true.} . 
     
    384403In the example above, there are two boundary sets, the first of which is defined via a file and 
    385404the second is defined in the namelist. 
    386 For more details of the definition of the boundary geometry see section \autoref{subsec:BDY_geometry}. 
     405For more details of the definition of the boundary geometry see section \autoref{subsec:LBC_bdy_geometry}. 
    387406 
    388407For each boundary set a boundary condition has to be chosen for the barotropic solution 
     
    441460%---------------------------------------------- 
    442461\subsection{Flow relaxation scheme} 
    443 \label{subsec:BDY_FRS_scheme} 
     462\label{subsec:LBC_bdy_FRS_scheme} 
    444463 
    445464The Flow Relaxation Scheme (FRS) \citep{davies_QJRMS76,engedahl_T95}, 
     
    448467Given a model prognostic variable $\Phi$ 
    449468\[ 
    450   % \label{eq:bdy_frs1} 
     469  % \label{eq:LBC_bdy_frs1} 
    451470  \Phi(d) = \alpha(d)\Phi_{e}(d) + (1-\alpha(d))\Phi_{m}(d)\;\;\;\;\; d=1,N 
    452471\] 
     
    457476the prognostic equation for $\Phi$ of the form: 
    458477\[ 
    459   % \label{eq:bdy_frs2} 
     478  % \label{eq:LBC_bdy_frs2} 
    460479  -\frac{1}{\tau}\left(\Phi - \Phi_{e}\right) 
    461480\] 
    462481where the relaxation time scale $\tau$ is given by a function of $\alpha$ and the model time step $\Delta t$: 
    463482\[ 
    464   % \label{eq:bdy_frs3} 
     483  % \label{eq:LBC_bdy_frs3} 
    465484  \tau = \frac{1-\alpha}{\alpha}  \,\rdt 
    466485\] 
     
    472491The function $\alpha$ is specified as a $tanh$ function: 
    473492\[ 
    474   % \label{eq:bdy_frs4} 
     493  % \label{eq:LBC_bdy_frs4} 
    475494  \alpha(d) = 1 - \tanh\left(\frac{d-1}{2}\right),       \quad d=1,N 
    476495\] 
     
    480499%---------------------------------------------- 
    481500\subsection{Flather radiation scheme} 
    482 \label{subsec:BDY_flather_scheme} 
     501\label{subsec:LBC_bdy_flather_scheme} 
    483502 
    484503The \citet{flather_JPO94} scheme is a radiation condition on the normal, 
    485504depth-mean transport across the open boundary. 
    486505It takes the form 
    487 \begin{equation}  \label{eq:bdy_fla1} 
    488 U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 
     506\begin{equation} 
     507  \label{eq:LBC_bdy_fla1} 
     508  U = U_{e} + \frac{c}{h}\left(\eta - \eta_{e}\right), 
    489509\end{equation} 
    490510where $U$ is the depth-mean velocity normal to the boundary and $\eta$ is the sea surface height, 
     
    495515the external depth-mean normal velocity, 
    496516plus a correction term that allows gravity waves generated internally to exit the model boundary. 
    497 Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary, 
     517Note that the sea-surface height gradient in \autoref{eq:LBC_bdy_fla1} is a spatial gradient across the model boundary, 
    498518so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 
    499519$U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. 
     
    501521%---------------------------------------------- 
    502522\subsection{Orlanski radiation scheme} 
    503 \label{subsec:BDY_orlanski_scheme} 
     523\label{subsec:LBC_bdy_orlanski_scheme} 
    504524 
    505525The Orlanski scheme is based on the algorithm described by \citep{marchesiello.mcwilliams.ea_OM01}, hereafter MMS. 
     
    507527The adaptive Orlanski condition solves a wave plus relaxation equation at the boundary: 
    508528\begin{equation} 
    509 \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = 
    510                                                 -\frac{1}{\tau}(\phi - \phi^{ext}) 
    511 \label{eq:wave_continuous} 
     529  \label{eq:LBC_wave_continuous} 
     530  \frac{\partial\phi}{\partial t} + c_x \frac{\partial\phi}{\partial x} + c_y \frac{\partial\phi}{\partial y} = 
     531  -\frac{1}{\tau}(\phi - \phi^{ext}) 
    512532\end{equation} 
    513533 
     
    515535velocities are diagnosed from the model fields as: 
    516536 
    517 \begin{equation} \label{eq:cx} 
    518 c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 
     537\begin{equation} 
     538  \label{eq:LBC_cx} 
     539  c_x = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial x}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 
    519540\end{equation} 
    520541\begin{equation} 
    521 \label{eq:cy} 
    522 c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 
     542  \label{eq:LBC_cy} 
     543  c_y = -\frac{\partial\phi}{\partial t}\frac{\partial\phi / \partial y}{(\partial\phi /\partial x)^2 + (\partial\phi /\partial y)^2} 
    523544\end{equation} 
    524545 
    525546(As noted by MMS, this is a circular diagnosis of the phase speeds which only makes sense on a discrete grid). 
    526 Equation (\autoref{eq:wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$. 
     547Equation (\autoref{eq:LBC_wave_continuous}) is defined adaptively depending on the sign of the phase velocity normal to the boundary $c_x$. 
    527548For $c_x$ outward, we have 
    528549 
     
    534555 
    535556\begin{equation} 
    536 \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 
    537 \label{eq:tau_in} 
     557  \label{eq:LBC_tau_in} 
     558  \tau = \tau_{in}\,\,\,;\,\,\, c_x = c_y = 0 
    538559\end{equation} 
    539560 
    540561Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
    541562points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 
    542 See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ 
     563See \autoref{subsec:LBC_bdy_relaxation} for detailed on the spatial shape of the scaling.\\ 
    543564The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 
    544 that $c_y$ is zero in equation (\autoref{eq:wave_continuous}), but including 
    545 this term in the denominator of equation (\autoref{eq:cx}). Both versions of the scheme are options in BDY. Equations 
    546 (\autoref{eq:wave_continuous}) - (\autoref{eq:tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\ 
     565that $c_y$ is zero in equation (\autoref{eq:LBC_wave_continuous}), but including 
     566this term in the denominator of equation (\autoref{eq:LBC_cx}). Both versions of the scheme are options in BDY. Equations 
     567(\autoref{eq:LBC_wave_continuous}) - (\autoref{eq:LBC_tau_in}) correspond to equations (13) - (15) and (2) - (3) in MMS.\\ 
    547568 
    548569%---------------------------------------------- 
    549570\subsection{Relaxation at the boundary} 
    550 \label{subsec:BDY_relaxation} 
     571\label{subsec:LBC_bdy_relaxation} 
    551572 
    552573In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 
     
    564585%---------------------------------------------- 
    565586\subsection{Boundary geometry} 
    566 \label{subsec:BDY_geometry} 
     587\label{subsec:LBC_bdy_geometry} 
    567588 
    568589Each open boundary set is defined as a list of points. 
     
    615636%---------------------------------------------- 
    616637\subsection{Input boundary data files} 
    617 \label{subsec:BDY_data} 
     638\label{subsec:LBC_bdy_data} 
    618639 
    619640The data files contain the data arrays in the order in which the points are defined in the $nbi$ and $nbj$ arrays. 
     
    655676%---------------------------------------------- 
    656677\subsection{Volume correction} 
    657 \label{subsec:BDY_vol_corr} 
     678\label{subsec:LBC_bdy_vol_corr} 
    658679 
    659680There is an option to force the total volume in the regional model to be constant. 
     
    672693%---------------------------------------------- 
    673694\subsection{Tidal harmonic forcing} 
    674 \label{subsec:BDY_tides} 
     695\label{subsec:LBC_bdy_tides} 
    675696 
    676697%-----------------------------------------nambdy_tide-------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.