** Next:** SUBROUTINE UPSTREAMQ
** Up:** The numerical -coordinate model
** Previous:** SUBROUTINES DENS AND DENSUNESCO
** Contents**

The subroutine MY2HALV is called from the main program to update
the fields and taking into account all terms of equations
(12) and (13) except for the advective terms
which are treated by UPSTREAMQ.
The approximation to and are stepped forward in time
using an explicit method for the production terms and an fully implicit
method for the loss terms. The
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 and .
From and , and 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 and , 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 =
and KMMIN =
.
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:** SUBROUTINE UPSTREAMQ
** Up:** The numerical -coordinate model
** Previous:** SUBROUTINES DENS AND DENSUNESCO
** Contents**
Helge Avlesen
2004-05-10