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 11512 for NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_LBC.tex – NEMO

Ignore:
Timestamp:
2019-09-09T12:05:20+02:00 (5 years ago)
Author:
smasson
Message:

dev_r10984_HPC-13 : merge with trunk@11511, see #2285

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10984_HPC-13_IRRMANN_BDY_optimization/doc/latex/NEMO/subfiles/chap_LBC.tex

    r11263 r11512  
    33\begin{document} 
    44% ================================================================ 
    5 % Chapter — Lateral Boundary Condition (LBC)  
     5% Chapter — Lateral Boundary Condition (LBC) 
    66% ================================================================ 
    77\chapter{Lateral Boundary Condition (LBC)} 
    88\label{chap:LBC} 
    99 
    10 \minitoc 
     10\chaptertoc 
    1111 
    1212\newpage 
     
    2222%--------------------------------------------nam_lbc------------------------------------------------------- 
    2323 
    24 \nlst{namlbc}  
     24\nlst{namlbc} 
    2525%-------------------------------------------------------------------------------------------------------------- 
    2626 
    27 %The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt (no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}).  
    28  
    29 %OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, and includes the use of a full or partial step representation of bottom topography. The computation is performed over the whole domain, \ie we do not try to restrict the computation to ocean-only points. This choice has two motivations. Firstly, working on ocean only grid points overloads the code and harms the code readability. Secondly, and more importantly, it drastically reduces the vector portion of the computation, leading to a dramatic increase of CPU time requirement on vector computers.  The current section describes how the masking affects the computation of the various terms of the equations with respect to the boundary condition at solid walls. The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 
    30  
    31 Options are defined through the \ngn{namlbc} namelist variables. 
     27%The lateral ocean boundary conditions contiguous to coastlines are Neumann conditions for heat and salt 
     28%(no flux across boundaries) and Dirichlet conditions for momentum (ranging from free-slip to "strong" no-slip). 
     29%They are handled automatically by the mask system (see \autoref{subsec:DOM_msk}). 
     30 
     31%OPA allows land and topography grid points in the computational domain due to the presence of continents or islands, 
     32%and includes the use of a full or partial step representation of bottom topography. 
     33%The computation is performed over the whole domain, \ie\ we do not try to restrict the computation to ocean-only points. 
     34%This choice has two motivations. 
     35%Firstly, working on ocean only grid points overloads the code and harms the code readability. 
     36%Secondly, and more importantly, it drastically reduces the vector portion of the computation, 
     37%leading to a dramatic increase of CPU time requirement on vector computers. 
     38%The current section describes how the masking affects the computation of the various terms of the equations 
     39%with respect to the boundary condition at solid walls. 
     40%The process of defining which areas are to be masked is described in \autoref{subsec:DOM_msk}. 
     41 
     42Options are defined through the \nam{lbc} namelist variables. 
    3243The discrete representation of a domain with complex boundaries (coastlines and bottom topography) leads to 
    3344arrays that include large portions where a computation is not required as the model variables remain at zero. 
     
    4152Since most of the boundary conditions consist of a zero flux across the solid boundaries, 
    4253they can be simply applied by multiplying variables by the correct mask arrays, 
    43 \ie the mask array of the grid point where the flux is evaluated. 
     54\ie\ the mask array of the grid point where the flux is evaluated. 
    4455For example, the heat flux in the \textbf{i}-direction is evaluated at $u$-points. 
    4556Evaluating this quantity as, 
     
    5263(where mask$_{u}$ is the mask array at a $u$-point) ensures that the heat flux is zero inside land and 
    5364at the boundaries, since mask$_{u}$ is zero at solid boundaries which in this case are defined at $u$-points 
    54 (normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}).  
     65(normal velocity $u$ remains zero at the coast) (\autoref{fig:LBC_uv}). 
    5566 
    5667%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    104115\item[free-slip boundary condition (\np{rn\_shlat}\forcode{ = 0}):] the tangential velocity at 
    105116  the coastline is equal to the offshore velocity, 
    106   \ie the normal derivative of the tangential velocity is zero at the coast, 
     117  \ie\ the normal derivative of the tangential velocity is zero at the coast, 
    107118  so the vorticity: mask$_{f}$ array is set to zero inside the land and just at the coast 
    108119  (\autoref{fig:LBC_shlat}-a). 
     
    114125  the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction 
    115126  (\autoref{fig:LBC_shlat}-b). 
    116   Therefore, the vorticity along the coastlines is given by:  
     127  Therefore, the vorticity along the coastlines is given by: 
    117128 
    118129  \[ 
     
    130141 
    131142\item["partial" free-slip boundary condition (0$<$\np{rn\_shlat}$<$2):] the tangential velocity at 
    132   the coastline is smaller than the offshore velocity, \ie there is a lateral friction but 
     143  the coastline is smaller than the offshore velocity, \ie\ there is a lateral friction but 
    133144  not strong enough to make the tangential velocity at the coast vanish (\autoref{fig:LBC_shlat}-c). 
    134145  This can be selected by providing a value of mask$_{f}$ strictly inbetween $0$ and $2$. 
     
    140151\end{description} 
    141152 
    142 Note that when the bottom topography is entirely represented by the $s$-coor-dinates (pure $s$-coordinate), 
     153Note that when the bottom topography is entirely represented by the $s$-coordinates (pure $s$-coordinate), 
    143154the lateral boundary condition on tangential velocity is of much less importance as 
    144155it is only applied next to the coast where the minimum water depth can be quite shallow. 
     
    149160% ================================================================ 
    150161\section[Model domain boundary condition (\texttt{jperio})] 
    151 {Model domain boundary condition (\protect\np{jperio})} 
     162{Model domain boundary condition (\protect\jp{jperio})} 
    152163\label{sec:LBC_jperio} 
    153164 
     
    155166closed, cyclic east-west, cyclic north-south, a north-fold, and combination closed-north fold or 
    156167bi-cyclic east-west and north-fold. 
    157 The north-fold boundary condition is associated with the 3-pole ORCA mesh.  
     168The north-fold boundary condition is associated with the 3-pole ORCA mesh. 
    158169 
    159170% ------------------------------------------------------------------------------------------------------------- 
    160 %        Closed, cyclic (\np{jperio}\forcode{ = 0..2})  
     171%        Closed, cyclic (\jp{jperio}\forcode{ = 0..2}) 
    161172% ------------------------------------------------------------------------------------------------------------- 
    162173\subsection[Closed, cyclic (\forcode{jperio = [0127]})] 
    163 {Closed, cyclic (\protect\np{jperio}\forcode{ = [0127]})} 
     174{Closed, cyclic (\protect\jp{jperio}\forcode{ = [0127]})} 
    164175\label{subsec:LBC_jperio012} 
    165176 
    166177The choice of closed or cyclic model domain boundary condition is made by 
    167 setting \np{jperio} to 0, 1, 2 or 7 in namelist \ngn{namcfg}. 
     178setting \jp{jperio} to 0, 1, 2 or 7 in namelist \nam{cfg}. 
    168179Each time such a boundary condition is needed, it is set by a call to routine \mdl{lbclnk}. 
    169180The computation of momentum and tracer trends proceeds from $i=2$ to $i=jpi-1$ and from $j=2$ to $j=jpj-1$, 
    170 \ie in the model interior. 
     181\ie\ in the model interior. 
    171182To choose a lateral model boundary condition is to specify the first and last rows and columns of 
    172 the model variables.  
     183the model variables. 
    173184 
    174185\begin{description} 
    175186 
    176 \item[For closed boundary (\np{jperio}\forcode{ = 0})], 
     187\item[For closed boundary (\jp{jperio}\forcode{ = 0})], 
    177188  solid walls are imposed at all model boundaries: 
    178189  first and last rows and columns are set to zero. 
    179190 
    180 \item[For cyclic east-west boundary (\np{jperio}\forcode{ = 1})], 
     191\item[For cyclic east-west boundary (\jp{jperio}\forcode{ = 1})], 
    181192  first and last rows are set to zero (closed) whilst the first column is set to 
    182193  the value of the last-but-one column and the last column to the value of the second one 
     
    184195  Whatever flows out of the eastern (western) end of the basin enters the western (eastern) end. 
    185196 
    186 \item[For cyclic north-south boundary (\np{jperio}\forcode{ = 2})], 
     197\item[For cyclic north-south boundary (\jp{jperio}\forcode{ = 2})], 
    187198  first and last columns are set to zero (closed) whilst the first row is set to 
    188199  the value of the last-but-one row and the last row to the value of the second one 
     
    190201  Whatever flows out of the northern (southern) end of the basin enters the southern (northern) end. 
    191202 
    192 \item[Bi-cyclic east-west and north-south boundary (\np{jperio}\forcode{ = 7})] combines cases 1 and 2. 
     203\item[Bi-cyclic east-west and north-south boundary (\jp{jperio}\forcode{ = 7})] combines cases 1 and 2. 
    193204 
    194205\end{description} 
     
    207218 
    208219% ------------------------------------------------------------------------------------------------------------- 
    209 %        North fold (\textit{jperio = 3 }to $6)$  
     220%        North fold (\textit{jperio = 3 }to $6)$ 
    210221% ------------------------------------------------------------------------------------------------------------- 
    211222\subsection[North-fold (\forcode{jperio = [3-6]})] 
    212 {North-fold (\protect\np{jperio}\forcode{ = [3-6]})} 
     223{North-fold (\protect\jp{jperio}\forcode{ = [3-6]})} 
    213224\label{subsec:LBC_north_fold} 
    214225 
     
    216227a three-polar ORCA grid. 
    217228Such a grid has two poles in the northern hemisphere (\autoref{fig:MISC_ORCA_msh}, 
    218 and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}.  
     229and thus requires a specific treatment illustrated in \autoref{fig:North_Fold_T}. 
    219230Further information can be found in \mdl{lbcnfd} module which applies the north fold boundary condition. 
    220231 
     
    234245 
    235246% ==================================================================== 
    236 % Exchange with neighbouring processors  
     247% Exchange with neighbouring processors 
    237248% ==================================================================== 
    238249\section[Exchange with neighbouring processors (\textit{lbclnk.F90}, \textit{lib\_mpp.F90})] 
     
    272283After a computation, a communication phase starts: 
    273284each processor sends to its neighbouring processors the update values of the points corresponding to 
    274 the interior overlapping area to its neighbouring sub-domain (\ie the innermost of the two overlapping rows). 
     285the interior overlapping area to its neighbouring sub-domain (\ie\ the innermost of the two overlapping rows). 
    275286The communication is done through the Message Passing Interface (MPI). 
    276287The data exchanges between processors are required at the very place where 
    277288lateral domain boundary conditions are set in the mono-domain computation: 
    278289the \rou{lbc\_lnk} routine (found in \mdl{lbclnk} module) which manages such conditions is interfaced with 
    279 routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie when \key{mpp\_mpi} defined). 
     290routines found in \mdl{lib\_mpp} module when running on an MPP computer (\ie\ when \key{mpp\_mpi} defined). 
    280291It has to be pointed out that when using the MPP version of the model, 
    281292the east-west cyclic boundary condition is done implicitly, 
     
    297308The i-axis is divided by \jp{jpni} and 
    298309the j-axis by \jp{jpnj} for a number of processors \jp{jpnij} most often equal to $jpni \times jpnj$ 
    299 (parameters set in  \ngn{nammpp} namelist). 
     310(parameters set in  \nam{mpp} namelist). 
    300311Each processor is independent and without message passing or synchronous process, 
    301312programs run alone and access just its own local memory. 
     
    304315These dimensions include the internal domain and the overlapping rows. 
    305316The number of rows to exchange (known as the halo) is usually set to one (\jp{jpreci}=1, in \mdl{par\_oce}). 
    306 The whole domain dimensions are named \np{jpiglo}, \np{jpjglo} and \jp{jpk}. 
     317The whole domain dimensions are named \jp{jpiglo}, \jp{jpjglo} and \jp{jpk}. 
    307318The relationship between the whole domain and a sub-domain is: 
    308319\[ 
     
    312323where \jp{jpni}, \jp{jpnj} are the number of processors following the i- and j-axis. 
    313324 
    314 One also defines variables nldi and nlei which correspond to the internal domain bounds,  
    315 and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain.  
     325One also defines variables nldi and nlei which correspond to the internal domain bounds, 
     326and the variables nimpp and njmpp which are the position of the (1,1) grid-point in the global domain. 
    316327An element of $T_{l}$, a local array (subdomain) corresponds to an element of $T_{g}$, 
    317 a global array (whole domain) by the relationship:  
     328a global array (whole domain) by the relationship: 
    318329\[ 
    319330  % \label{eq:lbc_nimpp} 
     
    337348 
    338349 
    339 The \NEMO model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 
     350The \NEMO\ model computes equation terms with the help of mask arrays (0 on land points and 1 on sea points). 
    340351It is easily readable and very efficient in the context of a computer with vectorial architecture. 
    341352However, in the case of a scalar processor, computations over the land regions become more expensive in 
    342 terms of CPU time.  
     353terms of CPU time. 
    343354It is worse when we use a complex configuration with a realistic bathymetry like the global ocean where 
    344355more than 50 \% of points are land points. 
     
    349360The user then chooses optimal parameters \jp{jpni}, \jp{jpnj} and \jp{jpnij} with $jpnij < jpni \times jpnj$, 
    350361leading to the elimination of $jpni \times jpnj - jpnij$ land processors. 
    351 When those parameters are specified in \ngn{nammpp} namelist, 
     362When those parameters are specified in \nam{mpp} namelist, 
    352363the algorithm in the \rou{inimpp2} routine sets each processor's parameters (nbound, nono, noea,...) so that 
    353364the land-only processors are not taken into account. 
    354365 
    355 \gmcomment{Note that the inimpp2 routine is general so that the original inimpp  
     366\gmcomment{Note that the inimpp2 routine is general so that the original inimpp 
    356367routine should be suppressed from the code.} 
    357368 
     
    360371Note that this is a problem for the meshmask file which requires to be defined over the whole domain. 
    361372Therefore, user should not eliminate land processors when creating a meshmask file 
    362 (\ie when setting a non-zero value to \np{nn\_msh}). 
     373(\ie\ when setting a non-zero value to \np{nn\_msh}). 
    363374 
    364375%>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
     
    381392 
    382393% ==================================================================== 
    383 % Unstructured open boundaries BDY  
     394% Unstructured open boundaries BDY 
    384395% ==================================================================== 
    385396\section{Unstructured open boundary conditions (BDY)} 
     
    388399%-----------------------------------------nambdy-------------------------------------------- 
    389400 
    390 \nlst{nambdy}  
     401\nlst{nambdy} 
    391402%----------------------------------------------------------------------------------------------- 
    392403%-----------------------------------------nambdy_dta-------------------------------------------- 
    393404 
    394 \nlst{nambdy_dta}  
     405\nlst{nambdy_dta} 
    395406%----------------------------------------------------------------------------------------------- 
    396407 
    397 Options are defined through the \ngn{nambdy} \ngn{nambdy\_dta} namelist variables. 
    398 The BDY module is the core implementation of open boundary conditions for regional configurations on  
    399 temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses). 
    400  
    401 The BDY module was modelled on the OBC module (see NEMO 3.4) and shares many features and 
     408Options are defined through the \nam{bdy} \nam{bdy\_dta} namelist variables. 
     409The BDY module is the core implementation of open boundary conditions for regional configurations on 
     410temperature, salinity, barotropic and baroclinic velocities, as well as ice concentration, ice and snow thicknesses. 
     411 
     412The BDY module was modelled on the OBC module (see \NEMO\ 3.4) and shares many features and 
    402413a similar coding structure \citep{chanut_rpt05}. 
    403414The specification of the location of the open boundary is completely flexible and 
    404 allows for example the open boundary to follow an isobath or other irregular contour.  
    405 Boundary data files used with versions of NEMO prior to Version 3.4 may need to be re-ordered to work with this version. 
     415allows any type of setup, from regular boundaries to irregular contour (it includes the possibility to set an open boundary able to follow an isobath). 
     416Boundary data files used with versions of \NEMO\ prior to Version 3.4 may need to be re-ordered to work with this version. 
    406417See the section on the Input Boundary Data Files for details. 
    407418 
     
    415426Each boundary set may be defined as a set of straight line segments in a namelist 
    416427(\np{ln\_coords\_file}\forcode{ = .false.}) or read in from a file (\np{ln\_coords\_file}\forcode{ = .true.}). 
    417 If the set is defined in a namelist, then the namelists \ngn{nambdy\_index} must be included separately, one for each set. 
     428If the set is defined in a namelist, then the namelists \nam{bdy\_index} must be included separately, one for each set. 
    418429If the set is defined by a file, then a ``\ifile{coordinates.bdy}'' file must be provided. 
    419 The coordinates.bdy file is analagous to the usual NEMO ``\ifile{coordinates}'' file. 
     430The coordinates.bdy file is analagous to the usual \NEMO\ ``\ifile{coordinates}'' file. 
    420431In the example above, there are two boundary sets, the first of which is defined via a file and 
    421432the second is defined in a namelist. 
     
    423434 
    424435For each boundary set a boundary condition has to be chosen for the barotropic solution 
    425 (``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''),  
     436(``u2d'':sea-surface height and barotropic velocities), for the baroclinic velocities (``u3d''), 
    426437for the active tracers \footnote{The BDY module does not deal with passive tracers at this version} (``tra''), and sea-ice (``ice''). 
    427438For each set of variables there is a choice of algorithm and a choice for the data, 
    428 eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\  
     439eg. for the active tracers the algorithm is set by \np{cn\_tra} and the choice of data is set by \np{nn\_tra\_dta}.\\ 
    429440 
    430441The choice of algorithm is currently as follows: 
     
    436447\item[\forcode{'neumann'}:] Value at the boundary are duplicated (No gradient). Only available for baroclinic velocity and tracer variables. 
    437448\item[\forcode{'frs'}:] Flow Relaxation Scheme (FRS) available for all variables. 
    438 \item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables.  
    439 \item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables.  
     449\item[\forcode{'Orlanski'}:] Orlanski radiation scheme (fully oblique) for barotropic, baroclinic and tracer variables. 
     450\item[\forcode{'Orlanski_npo'}:] Orlanski radiation scheme for barotropic, baroclinic and tracer variables. 
    440451\item[\forcode{'flather'}:] Flather radiation scheme for the barotropic variables only. 
    441452\end{description} 
     
    443454The main choice for the boundary data is to use initial conditions as boundary data 
    444455(\np{nn\_tra\_dta}\forcode{ = 0}) or to use external data from a file (\np{nn\_tra\_dta}\forcode{ = 1}). 
    445 In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity),  
     456In case the 3d velocity data contain the total velocity (ie, baroclinic and barotropic velocity), 
    446457the bdy code can derived baroclinic and barotropic velocities by setting \np{ln\_full\_vel}\forcode{ = .true. } 
    447458For the barotropic solution there is also the option to use tidal harmonic forcing either by 
    448459itself (\np{nn\_dyn2d\_dta}\forcode{ = 2}) or in addition to other external data (\np{nn\_dyn2d\_dta}\forcode{ = 3}).\\ 
    449 Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}.  
    450  
    451 If external boundary data is required then the \ngn{nambdy\_dta} namelist must be defined. 
    452 One \ngn{nambdy\_dta} namelist is required for each boundary set in the order in which 
    453 the boundary sets are defined in nambdy. 
    454 In the example given, two boundary sets have been defined. The first one is reading data file in the \ngn{nambdy\_dta} namelist shown above  
    455 and the second one is using data from intial condition (no namelist bloc needed). 
     460Sea-ice salinity, temperature and age data at the boundary are constant and defined repectively by \np{rn\_ice\_sal}, \np{rn\_ice\_tem} and \np{rn\_ice\_age}. 
     461 
     462If external boundary data is required then the \nam{bdy\_dta} namelist must be defined. 
     463One \nam{bdy\_dta} namelist is required for each boundary set, adopting the same order of indexes in which the boundary sets are defined in nambdy. 
     464In the example given, two boundary sets have been defined. The first one is reading data file in the \nam{bdy\_dta} namelist shown above 
     465and the second one is using data from intial condition (no namelist block needed). 
    456466The boundary data is read in using the fldread module, 
    457 so the \ngn{nambdy\_dta} namelist is in the format required for fldread. 
    458 For each variable required, the filename, the frequency of the files and 
    459 the frequency of the data in the files is given. 
     467so the \nam{bdy\_dta} namelist is in the format required for fldread. 
     468For each required variable, the filename, the frequency of the files and 
     469the frequency of the data in the files are given. 
    460470Also whether or not time-interpolation is required and whether the data is climatological (time-cyclic) data.\\ 
    461471 
    462472There is currently an option to vertically interpolate the open boundary data onto the native grid at run-time. 
    463 If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid.  
    464 However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data,  
    465 a bilinear interpolation onto the native grid will be triggered at runtime.  
    466 For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files.  
    467 These correspond to the depths and scale factors of the input data,  
     473If \np{nn\_bdy\_jpk} $< -1$, it is assumed that the lateral boundary data are already on the native grid. 
     474However, if \np{nn\_bdy\_jpk} is set to the number of vertical levels present in the boundary data, 
     475a bilinear interpolation onto the native grid will be triggered at runtime. 
     476For this to be successful the additional variables: $gdept$, $gdepu$, $gdepv$, $e3t$, $e3u$ and $e3v$, are required to be present in the lateral boundary files. 
     477These correspond to the depths and scale factors of the input data, 
    468478the latter used to make any adjustment to the velocity fields due to differences in the total water depths between the two vertical grids.\\ 
    469479 
    470 In the example namelists given, two boundary sets are defined. 
     480In the example of given namelists, two boundary sets are defined. 
    471481The first set is defined via a file and applies FRS conditions to temperature and salinity and 
    472482Flather conditions to the barotropic variables. No condition specified for the baroclinic velocity and sea-ice. 
     
    474484Tidal harmonic forcing is also used. 
    475485The second set is defined in a namelist. 
    476 FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files.  
     486FRS conditions are applied on temperature and salinity and climatological data is read from initial condition files. 
    477487 
    478488%---------------------------------------------- 
     
    505515is relaxed towards the external conditions over the rest of the FRS zone. 
    506516The application of a relaxation zone helps to prevent spurious reflection of 
    507 outgoing signals from the model boundary.  
     517outgoing signals from the model boundary. 
    508518 
    509519The function $\alpha$ is specified as a $tanh$ function: 
     
    534544Note that the sea-surface height gradient in \autoref{eq:bdy_fla1} is a spatial gradient across the model boundary, 
    535545so that $\eta_{e}$ is defined on the $T$ points with $nbr=1$ and $\eta$ is defined on the $T$ points with $nbr=2$. 
    536 $U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie between the two $T$ grid points. 
     546$U$ and $U_{e}$ are defined on the $U$ or $V$ points with $nbr=1$, \ie\ between the two $T$ grid points. 
    537547 
    538548%---------------------------------------------- 
     
    575585\end{equation} 
    576586 
    577 Generally the relaxation time scale at inward propagation points \np{(rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
     587Generally the relaxation time scale at inward propagation points (\np{rn\_time\_dmp}) is set much shorter than the time scale at outward propagation 
    578588points (\np{rn\_time\_dmp\_out}) so that the solution is constrained more strongly by the external data at inward propagation points. 
    579 See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\  
    580 The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming  
     589See \autoref{subsec:BDY_relaxation} for detailed on the spatial shape of the scaling.\\ 
     590The ``normal propagation of oblique radiation'' or NPO approximation (called \forcode{'orlanski_npo'}) involves assuming 
    581591that $c_y$ is zero in equation (\autoref{eq:wave_continuous}), but including 
    582592this term in the denominator of equation (\autoref{eq:cx}). Both versions of the scheme are options in BDY. Equations 
     
    587597\label{subsec:BDY_relaxation} 
    588598 
    589 In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available.  
     599In addition to a specific boundary condition specified as \np{cn\_tra} and \np{cn\_dyn3d}, relaxation on baroclinic velocities and tracers variables are available. 
    590600It is control by the namelist parameter \np{ln\_tra\_dmp} and \np{ln\_dyn3d\_dmp} for each boundary set. 
    591601 
    592 The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself.  
     602The relaxation time scale value (\np{rn\_time\_dmp} and \np{rn\_time\_dmp\_out}, $\tau$) are defined at the boundaries itself. 
    593603This time scale ($\alpha$) is weighted by the distance ($d$) from the boundary over \np{nn\_rimwidth} cells ($N$): 
    594604 
     
    597607\] 
    598608 
    599 The same scaling is applied in the Orlanski damping.  
     609The same scaling is applied in the Orlanski damping. 
    600610 
    601611%---------------------------------------------- 
     
    605615Each open boundary set is defined as a list of points. 
    606616The information is stored in the arrays $nbi$, $nbj$, and $nbr$ in the $idx\_bdy$ structure. 
    607 The $nbi$ and $nbj$ arrays define the local $(i,j)$ indices of each point in the boundary zone and 
    608 the $nbr$ array defines the discrete distance from the boundary with $nbr=1$ meaning that 
    609 the point is next to the edge of the model domain and $nbr>1$ showing that 
    610 the point is increasingly further away from the edge of the model domain. 
     617The $nbi$ and $nbj$ arrays define the local $(i,j)$ indexes of each point in the boundary zone and 
     618the $nbr$ array defines the discrete distance from the boundary: $nbr=1$ means that 
     619the boundary point is next to the edge of the model domain, while $nbr>1$ means that 
     620the boundary point is increasingly further away from the edge of the model domain. 
    611621A set of $nbi$, $nbj$, and $nbr$ arrays is defined for each of the $T$, $U$ and $V$ grids. 
    612 Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary.  
     622Figure \autoref{fig:LBC_bdy_geom} shows an example of an irregular boundary. 
    613623 
    614624The boundary geometry for each set may be defined in a namelist nambdy\_index or 
    615625by reading in a ``\ifile{coordinates.bdy}'' file. 
    616626The nambdy\_index namelist defines a series of straight-line segments for north, east, south and west boundaries. 
    617 One nambdy\_index namelist bloc is needed for each boundary condition defined by indexes.  
    618 For the northern boundary, \np{nbdysegn} gives the number of segments, 
    619 \np{jpjnob} gives the $j$ index for each segment and \np{jpindt} and 
    620 \np{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
     627One nambdy\_index namelist block is needed for each boundary condition defined by indexes. 
     628For the northern boundary, \texttt{nbdysegn} gives the number of segments, 
     629\jp{jpjnob} gives the $j$ index for each segment and \jp{jpindt} and 
     630\jp{jpinft} give the start and end $i$ indices for each segment with similar for the other boundaries. 
    621631These segments define a list of $T$ grid points along the outermost row of the boundary ($nbr\,=\, 1$). 
    622632The code deduces the $U$ and $V$ points and also the points for $nbr\,>\, 1$ if \np{nn\_rimwidth}\forcode{ > 1}. 
    623633 
    624634The boundary geometry may also be defined from a ``\ifile{coordinates.bdy}'' file. 
    625 Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file. 
     635Figure \autoref{fig:LBC_nc_header} gives an example of the header information from such a file, based on the description of geometrical setup given above. 
    626636The file should contain the index arrays for each of the $T$, $U$ and $V$ grids. 
    627637The arrays must be in order of increasing $nbr$. 
     
    629639Typically this file will be used to generate external boundary data via interpolation and so 
    630640will also contain the latitudes and longitudes of each point as shown. 
    631 However, this is not necessary to run the model.  
     641However, this is not necessary to run the model. 
    632642 
    633643For some choices of irregular boundary the model domain may contain areas of ocean which 
    634644are not part of the computational domain. 
    635 For example if an open boundary is defined along an isobath, say at the shelf break, 
     645For example, if an open boundary is defined along an isobath, say at the shelf break, 
    636646then the areas of ocean outside of this boundary will need to be masked out. 
    637647This can be done by reading a mask file defined as \np{cn\_mask\_file} in the nam\_bdy namelist. 
     
    658668a time dimension; 
    659669$xb$ which is the index of the boundary data point in the horizontal; 
    660 and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard NEMO I/O routines. 
    661 The 3D fields also have a depth dimension.  
     670and $yb$ which is a degenerate dimension of 1 to enable the file to be read by the standard \NEMO\ I/O routines. 
     671The 3D fields also have a depth dimension. 
    662672 
    663673From Version 3.4 there are new restrictions on the order in which the boundary points are defined 
     
    670680\item All the data for a particular boundary set must be in the same order. 
    671681  (Prior to 3.4 it was possible to define barotropic data in a different order to 
    672   the data for tracers and baroclinic velocities).  
     682  the data for tracers and baroclinic velocities). 
    673683\end{enumerate} 
    674684 
     
    697707This is controlled  by the \np{ln\_vol} parameter in the namelist. 
    698708A value of \np{ln\_vol}\forcode{ = .false.} indicates that this option is not used. 
    699 Two options to control the volume are available (\np{nn\_volctl}).  
     709Two options to control the volume are available (\np{nn\_volctl}). 
    700710If \np{nn\_volctl}\forcode{ = 0} then a correction is applied to the normal barotropic velocities around the boundary at 
    701711each timestep to ensure that the integrated volume flow through the boundary is zero. 
     
    713723%-----------------------------------------nambdy_tide-------------------------------------------- 
    714724 
    715 \nlst{nambdy_tide}  
     725\nlst{nambdy_tide} 
    716726%----------------------------------------------------------------------------------------------- 
    717727 
    718728Tidal forcing at open boundaries requires the activation of surface 
    719 tides (i.e., in \ngn{nam\_tide}, \np{ln\_tide} needs to be set to 
     729tides (i.e., in \nam{\_tide}, \np{ln\_tide} needs to be set to 
    720730\forcode{.true.} and the required constituents need to be activated by 
    721 including their names in the \np{cname} array; see 
     731including their names in the \np{clname} array; see 
    722732\autoref{sec:SBC_tide}). Specific options related to the reading in of 
    723733the complex harmonic amplitudes of elevation (SSH) and barotropic 
    724734velocity (u,v) at open boundaries are defined through the 
    725 \ngn{nambdy\_tide} namelist parameters.\\ 
     735\nam{bdy\_tide} namelist parameters.\\ 
    726736 
    727737The tidal harmonic data at open boundaries can be specified in two 
Note: See TracChangeset for help on using the changeset viewer.