Boundary Condition at the Coast (rn_shlat)

!-----------------------------------------------------------------------
&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,

 (8.1)

(where mask is the mask array at a -point) ensures that the heat flux is zero inside land and at the boundaries, since mask is zero at solid boundaries which in this case are defined at -points (normal velocity remains zero at the coast) (Fig. 8.1).

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:

free-slip boundary condition (rn_shlat=0):
the tangential velocity at the coastline is equal to the offshore velocity, the normal derivative of the tangential velocity is zero at the coast, so the vorticity: mask array is set to zero inside the land and just at the coast (Fig. 8.2-a).

no-slip boundary condition (rn_shlat=2):
the tangential velocity vanishes at the coastline. Assuming that the tangential velocity decreases linearly from the closest ocean velocity grid point to the coastline, the normal derivative is evaluated as if the velocities at the closest land velocity gridpoint and the closest ocean velocity gridpoint were of the same magnitude but in the opposite direction (Fig. 8.2-b). Therefore, the vorticity along the coastlines is given by:

where and are masked fields. Setting the mask array to along the coastline provides a vorticity field computed with the no-slip boundary condition, simply by multiplying it by the mask :

 mask (8.2)

"partial" free-slip boundary condition (0rn_shlat2):
the tangential velocity at the coastline is smaller than the offshore velocity, there is a lateral friction but not strong enough to make the tangential velocity at the coast vanish (Fig. 8.2-c). This can be selected by providing a value of mask strictly inbetween 0 and .

"strong" no-slip boundary condition (2rn_shlat):
the viscous boundary layer is assumed to be smaller than half the grid size (Fig. 8.2-d). The friction is thus larger than in the no-slip case.

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