Manage turbulence time-stepping

*INTERFACE:*

subroutine do_turbulence(nlev,dt,depth,u_taus,u_taub,z0s,z0b,h, & NN,SS,xP)

This routine is the central point of the
turbulence scheme. It determines the order, in which
turbulence variables are updated, and calls
other member functions updating
the TKE, the length-scale, the dissipation rate, the ASM etc.
Note, that the list of arguments in `do_turbulence()` corresponds
exactly to those mean flow and grid-related variables required to update
the turbulent quantities. These variables have to be passed
from a 3-D model, if the `turbulence` module of GOTM is used
for the computation of the turbulent fluxes. Do not forget to call
`init_turbulence()` from the 3-D model before the first call to
`do_turbulence()`.

The variable `turb_method` determines the essential structure
of the calls in `do_turbulence()`. At the moment, the following
model types are available:

`turb_method = 0`corresponds to the "convective adjustment" algorithm, see section 3.15. Since this model is not a real one-point turbulence closure, it is not called from`do_turbulence`but directly from the main GOTM loop.`turb_method = 1`corresponds to a purely algebraic description of the turbulent diffusivities.`turb_method = 2`corresponds to models computing the diffusivities from the TKE and the turbulent length scale according to (46). TKE and length scale are computed from dynamic PDEs or algebraic relations, an empirical (i.e. not derived from a second-order model) stability function is used, see section 4.7.12.`turb_method = 3`corresponds to a second-order model for the turbulent fluxes.

The second-order models fall into different categories, depending on the
value of `second_method`. These models, discussed in detail
in section 4.4, are listed in the following.

`second_method = 1`corresponds to algebraic quasi-equilibrium models with scaling in the spirit of Galperin et al. (1988), see section 4.27.`second_method = 2`corresponds to algebraic models assuming , and hence using (74). Furthermore, full equilibrium and is assumed for the computation of and in (67), see section 4.26`second_method = 3`corresponds to algebraic models assuming full equilibrium and for the computation of and in (67). Now, however, also an equation for (half) the buoyancy variance is solved, leading to the appearance of the counter-gradient term in (76), see section 4.25. This model is not yet fully tested and therefore not available.

*USES:*

IMPLICIT NONE interface subroutine production(nlev,NN,SS,xP) integer, intent(in) :: nlev REALTYPE, intent(in) :: NN(0:nlev) REALTYPE, intent(in) :: SS(0:nlev) REALTYPE, intent(in), optional :: xP(0:nlev) end subroutine production end interface

number of vertical layers integer, intent(in) :: nlev time step (s) REALTYPE, intent(in) :: dt distance between surface and bottom(m) REALTYPE, intent(in) :: depth surface and bottom friction velocity (m/s) REALTYPE, intent(in) :: u_taus,u_taub surface and bottom roughness length (m) REALTYPE, intent(in) :: z0s,z0b layer thickness (m) REALTYPE, intent(in) :: h(0:nlev) boyancy frequency squared (1/s^2) REALTYPE, intent(in) :: NN(0:nlev) shear-frequency squared (1/s^2) REALTYPE, intent(in) :: SS(0:nlev) TKE production due to seagrass friction (m^2/s^3) REALTYPE, intent(in), optional :: xP(0:nlev)

Original author(s): Karsten Bolding, Hans Burchard, Lars Umlauf

Karsten Bolding 2012-12-28