Calculation of the stratification
INTERFACE:
subroutine stratification(nlev,buoy_method,dt,cnpar,nub,gamB)
DESCRIPTION:
This routine computes the mean potential density,
, the mean
potential buoyancy, , defined in (33), and the mean buoyancy
frequency,

(40) 
which is based on potential density or buoyancy such that for , the entropy
is constant in the whole water column and mixing does not work against buoyancy
forces. If GOTM used as a turbulence library in your own threedimensional model,
you have to insure that the computed by you, and passed to the turbulence
routines in GOTM, is consistent with the concept of potential density and your
equation of state.
The mean potential density is evaluated from the equation of state, (244),
according to

(41) 
where denotes the mean potential temperature, the mean salinity
and the mean reference pressure. The buoyancy frequency defined in
(40) can be decomposed into contributions due to
potential temperature and salinity stratification,

(42) 
where we introduced the quantities

(43) 
with the thermal expansion coefficient defined in (246), and

(44) 
with the saline contraction coefficient defined in (247). It is important
to note that in the actual code the reference pressure, , has been replaced by
the (approximate) hydrostatic pressure. Only if this dependence is replaced by
the constant reference pressure at the surface in the equation of state,
see section 8.8, the model is truely based on potential temperature and density.
Otherwise, the model is based on insitu quantities.
Alternatively to the procedure outlined above, depending on the values of the
parameter buoy_method, the buoyancy may be calculated by means of the
transport equation (34). This equation then replaces the computation of
and and is only recommended for idealized studies.
USES:
use meanflow, only: h,S,T,buoy,rho
use meanflow, only: NN,NNT,NNS
use meanflow, only: gravity,rho_0
use eqstate, only: eqstate1
IMPLICIT NONE
INPUT PARAMETERS:
number of vertical layers
integer, intent(in) :: nlev
method to compute buoyancy
integer, intent(in) :: buoy_method
time step (s)
REALTYPE, intent(in) :: dt
numerical "implicitness" parameter
REALTYPE, intent(in) :: cnpar
diffusivity of buoyancy (m^2/s)
REALTYPE, intent(in) :: nub(0:nlev)
nonlocal buoyancy flux (m^2/s^3)
REALTYPE, intent(in) :: gamb(0:nlev)
OUTPUT PARAMETERS:
REVISION HISTORY:
Original author(s): Karsten Bolding & Hans Burchard
Karsten Bolding
20121228