next up previous contents
Next: SUBROUTINE UPSTREAMQ Up: The numerical -coordinate model Previous: SUBROUTINES DENS AND DENSUNESCO   Contents

SUBROUTINE MY2HALV

The subroutine MY2HALV is called from the main program to update the fields $q^2$ and $q^2 l$ taking into account all terms of equations (12) and (13) except for the advective terms which are treated by UPSTREAMQ. The approximation to $q^2$ and $q^2 l$ are stepped forward in time using an explicit method for the production terms and an fully implicit method for the loss terms. The $\frac{\partial \rho}{\partial z} $ terms may change sign, and depending on the sign explicit or implicit methods are applied. This has proved to be necessary to avoid negative values of $q^2$ and $q^2 l$ .

From $q^2$ and $q^2 l$ $K_M$, $K_H$ and $K_q$ are computed following equations (19), (20) and (21).

For stratified cases the loss terms will typically be dominating and the vertical viscosity and diffusivity will be determined not by the equations for $q^2$ and $q^2 l$, but by the minimum allowed values KHMIN and KMMIN defined in the computer code. Model results have proved to be sensitive to these values. We try to keep these as small as possible to maintain the density structure in the ocean as well as possible. Typically values are KHMIN = $1 \times 10^{-7} m^2 s^{-1}$ and KMMIN = $1 \times 10^{-5} m^2
s^{-1}$. Larger values of KHMIN, in particular, may cause unphysical down mixing of surface water in stratified areas.

KHMIN and KMMIN are given in setupfile.dat.


next up previous contents
Next: SUBROUTINE UPSTREAMQ Up: The numerical -coordinate model Previous: SUBROUTINES DENS AND DENSUNESCO   Contents
Helge Avlesen 2004-05-10