Subroutine HYDRO

source: (poseidon.hydro.f90)

poseidon.hydro.f90

Description:

HORIZONTAL HYDRODYNAMICS

This routine advances the state of the ocean due to horizontal hydrodynamics:

The state is advanced for one "timestep" by splitting the equations into an "internal" and "external" mode. The external mode is solved with much finer timesteps in order to resolve the fast external gravity waves.

The effects which are included here are:

CORIOL coriolis effect ( plus momentum advection in vector invariant form ) PRESS pressure gradient HDIFFUSE horizontal diffusion (explicit) SFLUX surface forcing PEN_RADIATION penetrating radiation HOR_ADV horizontal mass and heat advection

The effects which are not included:

vertical diffusion and viscosity (VDIFFUSE) vertical remapping (VVELOC and VERADV) Shapiro filtering (SHAPIRO and FILTER_H) (except that shapiro filtering on h creates a bolus flux which is applied here) Mixed layer (MIXDLYR)

BAROTROPIC MODE SPLITTING:

The momentum equations may be written in the form

{partial v}over{partial t} = - f k times v - g nabla %eta + A + P + F + D

where A is advection of momentum, P is pressure other than -g nabla %eta F is surface forcing and D is diffusion

We will solve this as

{partial v}over{partial t} = {partial v_E}over{partial t} - f k times v ' + {A}' + {P}' + {F}' + {D}'

where v_E is the external mode flow and X = overline{X} + X' is the separation in to vertical average and departure. Note that CORIOL routine computes both A and f k times v ' using the vector invariant form.

External Momentum Equation

{partial v_E}over{partial t} is integrated in STEP_EXTERNAL :

{partial v_E}over{partial t} = g nabla %eta + f k times V_E overline{A} + overline{P} + overline{F} + overline{D}

External Mass Equation

The vertically integrated mass equation is

{partial H }over{partial t} = - nabla cdot v_E H

where H is the total mass in a water column. This equation is integrated in STEP_EXTERNAL, and later enforced in HOR_ADV.

During STEP_EXTERNAL, surface height %eta is diagnosed from

%eta = H ( 1 + overline{%alpha} ) - D

where overline{%alpha} is the mass-averaged value of %alpha - %alpha_o , and D is the depth of the ocean. In STEP_EXTERNAL, only v_E and H (and thereby %eta) are allowed to change.

Time sequence

To advance the equations from t^{n-1} to t^{n+1}, we compute tendencies overline{%alpha}, overline{A} , overline{P} , overline{F} , overline{D} and {A}' , {P}' , {F}' , {D}' based on the state at t^{n} (and t^{n-1} for diffusive terms)

The external mode equations for partial v_E / partial t and partial H / partial t are advanced with short steps from t^{n-1} to t^{n+1}.

partial v / partial t is evaluated using partial v_E / partial t and {A}' , {P}' , {F}' , {D}'

Horizontal advection of mass, heat and salt is treated, requiring that the vertically integrated mass fluxes from v^{n}h^{n} are equal to the integrated mass fluxes used in the external mode equations.

EXTERNAL MODE SEPARATION FROM TOTAL MODE:

Bob Hallberg has pointed out that it is possible that the external mode may separate from the total solution, and that he uses a damping on the mass field, to keep the external mode estimate of the mass equal to that of the total field. This technique is provided for through the damping of the mass in the external mode forcing term Fp. Fp also includes the mass fluxes introduced in SFLUX (real mass sources for the external mode).

In the DOME experiments, we introduced mass at the bottom. In order to make this work easily, we put the mass flux terms in the routine SFLUX, so that the change in total mass is accounted directly.

BROWN-CAMPANA SPLITTING

The equations are advanced for the momentum change first, giving the value of u and v at time level n+1 Then an average is constructed of u and v from time levels n-1, n and n+1. This averaged velocity is then used to advance the horizontal advection of mass, heat, salt.

The factor %alpha_a is passed through the T_OParams object.

ERROR CHECKING

After horizontal advection of mass, the new layer thicknesses are checked for negative values. If any are found, the state is written to unit 201, and the model is stopped.

Syntax:

TYPE (T_POSEIDON_GRID) :: g Poseidon grid
INTEGER :: im Dimensions (passed here for convenience, but a hazzard exists that they might not agree with g%img, etc.
INTEGER :: jm Dimensions (passed here for convenience, but a hazzard exists that they might not agree with g%img, etc.
INTEGER :: km Dimensions (passed here for convenience, but a hazzard exists that they might not agree with g%img, etc.
INTEGER :: nx Dimensions (passed here for convenience, but a hazzard exists that they might not agree with g%img, etc.
TYPE (T_OPARAMS) :: param run control parameters
TYPE (T_STATE) :: past State objects
TYPE (T_STATE) :: now For leap-frog stepping
TYPE (T_STATE) :: next go from "past" to "next" using "now" "Next" and "past" can share space. "Now" is changed by action of the aselin time filter.
TYPE (T_TENDENCY) :: tend Tendency object. This is passed in only to save creating and destroying the object here.
TYPE (T_POSEIDON_FORCING) :: forcing Winds, heating, etc.
TYPE (T_FILTER) :: filter Holds bolus velocities from filter computations outside Hydro
TYPE (T_MIXED_LAYER) :: ml mixed layer parameters that need to be passed to vveloc (no longer used)
TYPE (T_TIMEINTERVAL) :: time_interval Size of time step
TYPE (T_BUDGETS) :: bu Ocean budget array
TYPE (T_DIAGNOSTICS) :: diag Diagnostics for passing to ohist

call HYDRO(g,im,jm,km,nx,param,past,now,next,tend,forcing,filter,ml,time_interval,&

bu, diag)

INTENT(IN) :: g,im,jm,km,nx,param,forcing,filter,ml,time_interval


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

Subroutines Called:

ASSERT, MAKE_BT, PRESS, CORIOL, SFLUX, PEN_RADIATION, TRACER_ACTIVITY, HDIFFUSE, GHOST, STEP_EXTERNAL, UPDATE_MOMENTUM, HOR_ADV, UPDATE_MASS, WRITE_NEWS_VAR, ERROR_EXIT
Subroutines Parameters Variables Use

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