With partial cells (ln_zps=true) at bottom and top (ln_isfcav=true), in general, tracers in horizontally adjacent cells live at different depths. Horizontal gradients of tracers are needed for horizontal diffusion (traldf.F90 module) and for the hydrostatic pressure gradient (dynhpg.F90 module) to be active.
Before taking horizontal gradients between the tracers next to the bottom, a linear interpolation in the vertical is used to approximate the deeper tracer as if it actually lived at the depth of the shallower tracer point (Fig. 5.5). For example, for temperature in the -direction the needed interpolated temperature, , is:
The computation of horizontal derivative of tracers as well as of density is performed once for all at each time step in zpshde.F90 module and stored in shared arrays to be used when needed. It has to be emphasized that the procedure used to compute the interpolated density, , is not the same as that used for and . Instead of forming a linear approximation of density, we compute from the interpolated values of and , and the pressure at a -point (in the equation of state pressure is approximated by depth, see §5.8.1 ) :
This is a much better approximation as the variation of with depth (and thus pressure) is highly non-linear with a true equation of state and thus is badly approximated with a linear interpolation. This approximation is used to compute both the horizontal pressure gradient (§6.4) and the slopes of neutral surfaces (§9.2)
Note that in almost all the advection schemes presented in this Chapter, both averaging and differencing operators appear. Yet (5.28) has not been used in these schemes: in contrast to diffusion and pressure gradient computations, no correction for partial steps is applied for advection. The main motivation is to preserve the domain averaged mean variance of the advected field when using the order centred scheme. Sensitivity of the advection schemes to the way horizontal averages are performed in the vicinity of partial cells should be further investigated in the near future.
If under ice shelf seas opened (ln_isfcav=true), the partial cell properties at the top are computed in the same way as for the bottom. Some extra variables are, however, computed to reduce the flow generated at the top and bottom if coordinates activated. The extra variables calculated and used by §6.4.4 are:
as described in (5.28)
to compute the pressure gradient correction term used by (6.20) in §6.4.4, with the depth of the point in case of coordinates (this term = 0 in z-coordinates)
Gurvan Madec and the NEMO Team
NEMO European Consortium2017-02-17