Subroutine VDIFFUSE

source: (poseidon.vdiffuse.f90)

poseidon.vdiffuse.f90

Description:

FUNCTION:

This routine updates a state to reflect the changes caused by vertical diffusion acting over a finite time interval. An implicit method is used with multiple passes in order to handle convective instability that may cascade over more than one layer. It solves

T^{n+1} = T^n + %DELTA t partial over{partial %zeta} left( %kappa over h {partial T^{n+1}over{partial %zeta} right) newline newline

S^{n+1} = S^n + %DELTA t partial over{partial %zeta} left( %kappa over h {partial S^{n+1}over{partial %zeta} right) newline newline

v^{n+1} = v^n + %DELTA t partial over{partial %zeta} left( %kappa over h {partial v^{n+1}over{partial %zeta} right) newline newline

If a tendency is needed rather than a state change, one would have to make a copy of the input state, do the diffusion on the copy, then compute the tendency from the difference.

The implicit technique allows for vanishing layer thicknesses.

Since the poseidon model has been re-defined to compute in a mass-oriented vertical distance, i.e.

h = mass in the layer / %rho_o

then h is not the true vertical distance separating coordinate surfaces, so the computation of a diffusive flux from

Flux = %kappa over h {partial T }over{partial %zeta}

should be written

Flux = {%kappa %alpha_o}over {h %alpha} {partial T }over{partial %zeta}

but the difference of %alpha_o over %alpha from 1 is far smaller than the uncertainty associated with the evaluation of %kappa itself.

At least the flux form of the equations is sufficient to conserve heat (or salt or momentum).

DIFFUSIVITY AND VISCOSITY

The diffusivity and viscosity are computed as dependent on the bulk Richardson number, through calls to VerticalDiffusivity and VerticalViscosity. The form of the dependence is set by the T_Vmix_Coefs.

If you are running more than instance of an ocean, each may have its own set of mixing parameters:

Due to the object-like nature of the code, there is a T_Vparams object (vp) that is required. This contains sub-objects (type T_Vmix_Coefs) for parameters to use for heat (vp%Kappa_T), salt (vp%Kappa_S), for momentm (vp%Nu), and for any number of tracers (vp%Kappa_Tr, a pointer to an array of T_Vmix_Coefs ).

Special Values:

With the external mode, the bottom diffusivity is set to zero. The bottom viscosity is set by vp%Nu%Bott. This viscosity is added over a region near the bottom defined by exp(-z^2/L^2) where L is a length scale contained in vp%Bottom_scale

Convection is deemed to occur when the richardson number falls below the value Ri_mix (a parameter of VDIFFUSE). When this occurs, diffusivities are set to vp%Kappa_?%Convect and viscosity to vp%Nu%Convect, and the Richardson-number dependent mixing values are ignored.

B- and C- GRID ISSUES

The Richardson number is evaluated at the mass points, and diffusivities and viscosities are computed there first. This includes the effects of convection. To compute the momentum mixing, the viscosities are averaged to the velocity points on the appropriate grid.

PASSES:

The time interval dtime is split into a number of sub-steps each of length dtime/npasses. On each pass, the Richardson number and mixing coefficients are determined, and convection is examined. If the coefficients are constant, the net effect of many passes would be the same as a single step. But when convection occurs, multiple passes help ensure thorough mixing.

The multiple passes is intended ONLY to ensure convective stability. If no new convection is found, then all remaining passes are gathered into one which acts over the remaining time. One could force all passes if we believed that an iteration of the Richardson number were important, but then we would probably want to do something different anyway.

EXTERNAL MODE:

This routine performs vertical dissipation on the total flow field. The change in the total field done here will be incorporated in the external mode through *MAKE_BT*.

DISGNOSTICS

The T_Diagnostics object diag may be loaded with Ri, %kappa, and %nu at u and v points:

Syntax:

TYPE (T_POSEIDON_GRID) :: g Grid object
INTEGER :: im Dimensions from grid object (redundant so be careful)
INTEGER :: jm Dimensions from grid object (redundant so be careful)
INTEGER :: km Dimensions from grid object (redundant so be careful)
INTEGER :: nx Dimensions from grid object (redundant so be careful)
TYPE (T_STATE) :: State State Object
TYPE (T_TIMEINTERVAL) :: dtime Time interval
TYPE (T_VPARAMS) :: vp Parameter object - things like mixing type, coefficients, etc.
INTEGER :: passes How many passes should be taken
TYPE (T_DIAGNOSTICS) :: diag Diagnostic object

call VDIFFUSE(g, im, jm, km, nx, State, dtime, vp, passes, [diag])

INTENT(IN) :: g,im,jm,km,nx,dtime,vp,passes


Legend:INTENT(INOUT)INTENT(IN)INTENT(OUT)[OPTIONAL]

Subroutines Called:

Richardson_Number, GHOST, SYNC_BUOYANCY
Subroutines Parameters Variables Use

Poseidon Ocean Model
Documentation automation by Paul Schopf's DocFort Perl scripts.