!----------------------------------------------------------------------- &namlbc ! lateral momentum boundary condition !----------------------------------------------------------------------- rn_shlat = 2. ! shlat = 0 ! 0 < shlat < 2 ! shlat = 2 ! 2 < shlat ! free slip ! partial slip ! no slip ! strong slip ln_vorlat = .false. ! consistency of vorticity boundary condition with analytical eqs. /
Options are defined through the namlbc namelist variables.
The discrete representation of a domain with complex boundaries (coastlines and
bottom topography) leads to arrays that include large portions where a computation
is not required as the model variables remain at zero. Nevertheless, vectorial
supercomputers are far more efficient when computing over a whole array, and the
readability of a code is greatly improved when boundary conditions are applied in
an automatic way rather than by a specific computation before or after each
computational loop. An efficient way to work over the whole domain while specifying
the boundary conditions, is to use multiplication by mask arrays in the computation.
A mask array is a matrix whose elements are in the ocean domain and 0
elsewhere. A simple multiplication of a variable by its own mask ensures that it will
remain zero over land areas. Since most of the boundary conditions consist of a
zero flux across the solid boundaries, they can be simply applied by multiplying
variables by the correct mask arrays,
the mask array of the grid point where
the flux is evaluated. For example, the heat flux in the i-direction is evaluated
at
-points. Evaluating this quantity as,
![]() |
For momentum the situation is a bit more complex as two boundary conditions
must be provided along the coast (one each for the normal and tangential velocities).
The boundary of the ocean in the C-grid is defined by the velocity-faces.
For example, at a given -level, the lateral boundary (a coastline or an intersection
with the bottom topography) is made of segments joining
-points, and normal
velocity points are located between two
points (Fig. 8.1).
The boundary condition on the normal velocity (no flux through solid boundaries)
can thus be easily implemented using the mask system. The boundary condition
on the tangential velocity requires a more specific treatment. This boundary
condition influences the relative vorticity and momentum diffusive trends, and is
required in order to compute the vorticity at the coast. Four different types of
lateral boundary condition are available, controlled by the value of the rn_shlat
namelist parameter. (The value of the mask
array along the coastline is set
equal to this parameter.) These are:
![]() |
![]() |
Note that when the bottom topography is entirely represented by the -coor-dinates
(pure
-coordinate), the lateral boundary condition on tangential velocity is of much
less importance as it is only applied next to the coast where the minimum water depth
can be quite shallow.
The alternative numerical implementation of the no-slip boundary conditions for an
arbitrary coast line of Shchepetkin and O'Brien [1996] is also available through the
key_ noslip_accurate CPP key. It is based on a fourth order evaluation of the shear at the
coast which, in turn, allows a true second order scheme in the interior of the domain
( the numerical boundary scheme simulates the truncation error of the numerical
scheme used in the interior of the domain). Shchepetkin and O'Brien [1996] found that such a
technique considerably improves the quality of the numerical solution. In NEMO, such
spectacular improvements have not been found in the half-degree global ocean
(ORCA05), but significant reductions of numerically induced coastal upwellings were
found in an eddy resolving simulation of the Alboran Sea [Olivier, 2001].
Nevertheless, since a no-slip boundary condition is not recommended in an eddy
permitting or resolving simulation [Penduff et al., 2007], the use of this option is also
not recommended.
In practice, the no-slip accurate option changes the way the curl is evaluated at the coast (see divcur.F90 module), and requires the nature of each coastline grid point (convex or concave corners, straight north-south or east-west coast) to be specified. This is performed in routine dom_msk_nsa in the domask.F90 module.
Gurvan Madec and the NEMO Team
NEMO European Consortium2017-02-17