*INTERFACE:*

subroutine buoyancy(nlev,dt,cnpar,nub,gamb)

This subroutine solves a transport equation for the mean potential buoyancy,

where is the accelaration of gravity, and and are the mean potential density and the reference density, respectively. A simplified transport equation for can be written as

where denotes the material derivative of , and is the sum of the turbulent and viscous transport terms modelled according to

In this equation, and are the turbulent and molecular diffusivities of buoyancy, respectively, and denotes the non-local flux of buoyancy, see section 4. In the current version of GOTM, we set for simplicity. Source and sink terms are completely disregarded, and thus (34) mainly serves as a convenient tool for some idealized test cases in GOTM.

Diffusion is treated implicitly in space (see equations (7)-
(9)), and then solved by a
simplified Gauss elimination.
Vertical advection is included, and it must be non-conservative,
which is ensured by setting the local variable `adv_mode=0`,
see section 8.5 on page .

*USES:*

use meanflow, only: h,w,buoy,T,avh,init_buoyancy use meanflow, only: w_grid,grid_method use observations, only: b_obs_NN,b_obs_surf,b_obs_sbf use observations, only: w_adv_discr,w_adv_method use util, only: Dirichlet,Neumann use util, only: oneSided,zeroDivergence IMPLICIT NONE

number of vertical layers integer, intent(in) :: nlev 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) non-local buoyancy flux (m^2/s^3) REALTYPE, intent(in) :: gamb(0:nlev)

Original author(s): Hans Burchard & Karsten Bolding

Karsten Bolding 2012-12-28