advpbu.F

subroutine advpbu (ba, hin, hout )

subroutine advpbu (ba, hin, hout )

When followed by advpbv, which advects in the (or
) direction, followed by a further vertical advection, a complete
directionally
split advection cycle has been performed, and a final total depth has been
returned.
Since advection is performed on the longer baroclinic time step **DT**, the
final depth, which is given by the volume fluxes, should be equal to the final
depth over the corresponding number of barotropic time steps. This is ensured
by making the volume
fluxes used equal to the sum of barotropic volume fluxes. The routine
advect_sca controls the order of advection in the
two horizontal directions: this may alternate on successive time steps.

A laplacian horizontal diffusive flux can be included at the intermediate stage, with either a fixed or Smagorinsky diffusity (see htmlrefhorizdiffusivityhorizdiffusivity)

Consider an interval to , with
.
Put
. Then the parabola is

where and , where is the mean value of over the interval.

The edge values of the parabolas are given for equal intervals by where . For the formula for unequal intervals see Collela P. and Woodward P.R. 1984 Journal of Computational Physics 54:174-201. This formula is used in the vertical advection.

is replaced by

if , zero otherwise.

**Steepening** (optional) tests for the presence of a discontinuity. This is
deemed to occur if the third derivative is large, the second derivative
changes sign and the first and third derivatives have opposite signs.

If
,

let
if
and
, otherwise
.

Put
,
where , and are variable parameters.
Then, set the discontinuity values
and
, and for a smooth change replace
by
and
by
.

**Monotonisation** is enforced by the following conditions:

put
if

put
if
.

**ba**value of scalar variable, returns new value**hin**initial depth**hout**final depth

**b2**intermediate value of advected scalar**bl,br**value of parabola at left and right of interval**d2b**value of**dba**difference of**dfl2**flux difference**dmb**value of**ds2**difference between intermediate sigma levels**dsig**difference between intermediate and original sigma levels**fba**scalar flux**fuu**volume flux**sigo3**intermediate sigma levels**i,j,k,icg,jcg,ilb,iub**grid indices**tagba,tagdba,tagdmb,tagd2b,tagu,tagh,tagbr,tagbl ,tagfu,tagfba**integers used in Exch3DS and Exch3DR routines**a1,a2,a3,b6,bdl,bdr,delb,delb2,delb6**variables used in parabola calculations (see above description)**eti,ett**variables used in steepening option**e1,e2,eps**parameters used in steepening option**aip**mask variable used in flux calculations**rcdal**length of grid box side in lat-long coordinates**xdb**used in setting parabolas in vertical with uneven grid spacing**xi**length over which parabola is integrated to give flux**advmask**logical variable based on mask**ivi**0 or 1 whether or not vertical Courant number is**k1,k0,ka,kb,kc**vertical indices used in `new' vertical advection scheme**dsi**sigma coordinate differences used in `new' vertical advection scheme**baa,bab,bat**variables used in `new' vertical advection scheme**inv3,inv6**1/3,1/6**HD**imposed horizontal diffusive flux**pri**turbulent Prandlt number (inverse)

- none

- Calculate parabolas in horizontal
- Steepen (optional) and monotonise parabolas
- Calculate horizontal fluxes and intermediate levels
- Calculate parabolas in vertical
- Steepen (optional) and monotonise parabolas
- Calculate intermediate value of
**ba**with horizontal diffusion if required. - Redistribute on to original or levels

- Exch3DS, Exch3DR
- MPI_GatherV

- advect_sca

- adv_bc advective boundary conditions

- DEBUG, DEBUG_ADV outputs debugging information
- TIMING_ADV timing of advection routines
- SCOORD -level spacing varies horizontally
- NOSTEEP turns off steepening during horizontal calculation
- NOSTEEPZ turns off steepening during vertical calculation
- HORIZ_DIF_TS Horizontal diffusion of T and S on -levels