# Diffusive Part -- Forward or Backward Scheme

The leapfrog differencing scheme is unsuitable for the representation of diffusion and damping processes. For a tendancy , representing a diffusion term or a restoring term to a tracer climatology (when present, see § 5.6), a forward time differencing scheme is used :

 (3.3)

This is diffusive in time and conditionally stable. The conditions for stability of second and fourth order horizontal diffusion schemes are [Griffies, 2004]:

where is the smallest grid size in the two horizontal directions and is the mixing coefficient. The linear constraint (3.4) is a necessary condition, but not sufficient. If it is not satisfied, even mildly, then the model soon becomes wildly unstable. The instability can be removed by either reducing the length of the time steps or reducing the mixing coefficient.

For the vertical diffusion terms, a forward time differencing scheme can be used, but usually the numerical stability condition imposes a strong constraint on the time step. Two solutions are available in NEMO to overcome the stability constraint: a forward time differencing scheme using a time splitting technique (ln_zdfexp = true) or a backward (or implicit) time differencing scheme (ln_zdfexp = false). In , the master time step t is cut into fractional time steps so that the stability criterion is reduced by a factor of . The computation is performed as follows:

 (3.5)

with DF a vertical diffusion term. The number of fractional time steps, , is given by setting nn_zdfexp, (namelist parameter). The scheme is unconditionally stable but diffusive. It can be written as follows:

 RHS (3.6)

This scheme is rather time consuming since it requires a matrix inversion, but it becomes attractive since a value of 3 or more is needed for N in the forward time differencing scheme. For example, the finite difference approximation of the temperature equation is:

 RHS (3.7)

where RHS is the right hand side of the equation except for the vertical diffusion term. We rewrite (3.6) as:

 (3.8)

where

(3.8) is a linear system of equations with an associated matrix which is tridiagonal. Moreover, and are positive and the diagonal term is greater than the sum of the two extra-diagonal terms, therefore a special adaptation of the Gauss elimination procedure is used to find the solution (see for example Richtmyer and Morton [1967]).

Gurvan Madec and the NEMO Team
NEMO European Consortium2017-02-17