Computes the tendency due to vertical advection for an arbitrary quantity.
The advective tendency may be computed in advective form (for use in spectral models) or flux form. The spatial differencing may be centered (second or fourth order) or finite volume (van Leer) using a piecewise linear method.
fms_mod mpp_mod
use vert_advection_mod [, only: vert_advection, vert_advection_end, SECOND_CENTERED, FOURTH_CENTERED, SECOND_CENTERED_WTS, FOURTH_CENTERED_WTS, FINITE_VOLUME_LINEAR, VAN_LEER_LINEAR, FINITE_VOLUME_PARABOLIC, FINITE_VOLUME_PARABOLIC2, FLUX_FORM, ADVECTIVE_FORM, WEIGHTED_TENDENCY, OUTFLOW_BOUNDARY ]
call vert_advection ( dt, w, dz, r, rdt [, mask, scheme, form, flags] ) DESCRIPTION This routine computes the vertical advective tendency for an arbitrary quantity. The tendency can be computed using one of several different choices for spatial differencing and numerical form of the equations. These choices are controlled through optional arguments. There is no initialization routine necessary. INPUT dt time step in seconds [real] w advecting velocity at the vertical boundaries of the grid boxes does not assume velocities at top and bottom are zero units = [units of dz / second] [real, dimension(:,:,:)] [real, dimension(:,:)] [real, dimension(:)] dz depth of model layers in arbitrary units (usually pressure) [real, dimension(:,:,:)] [real, dimension(:,:)] [real, dimension(:)] r advected quantity in arbitrary units [real, dimension(:,:,:)] [real, dimension(:,:)] [real, dimension(:)] OUTPUT rdt advective tendency for quantity "r" weighted by depth of layer the units depend on optional flags argument default units = [units of r / second] if flags=WEIGHTED_TENDENCY then units = [units of r * units of dz / second] [real, dimension(:,:,:)] [real, dimension(:,:)] [real, dimension(:)] OPTIONAL INPUT mask mask for below ground layers, where mask > 0 for layers above ground [real, dimension(:,:,:)] [real, dimension(:,:)] [real, dimension(:)] scheme spatial differencing scheme, use one of these values: SECOND_CENTERED = second-order centered FOURTH_CENTERED = fourth-order centered SECOND_CENTERED_WTS = second-order centered with corrected weights for unequal vertical level spacing FOURTH_CENTERED_WTS = fourth-order centered with corrected weights for unequal vertical level spacing FINITE_VOLUME_LINEAR = piecewise linear, finite volume VAN_LEER_LINEAR = same as FINITE_VOLUME_LINEAR FINITE_VOLUME_PARABOLIC = piecewise parabolic, finite volume (PPM) FINITE_VOLUME_PARABOLIC2 = piecewise parabolic, finite volume (PPM) using relaxed montonicity constraint (Lin,2003) [integer, default=VAN_LEER_LINEAR] form form of equations, use one of these values: FLUX_FORM = solves for -d(w*r)/dt ADVECTIVE_FORM = solves for -w*d(r)/dt [integer, default=FLUX_FORM] flags additional optional flags WEIGHTED_TENDENCY = output tendency (rdt) has units = [units of r * units of dz / second] OUTFLOW_BOUNDARY = advection is computed at the top and bottom for outflow boundaries this option is only valid for finite volume schemes [integer, default=none] NOTE The input/output arrays may be 1d, 2d, or 3d. The last dimension is always the vertical dimension. For the vertical dimension the following must be true: size(w,3) == size(dz,3)+1 == size(r,3)+1 == size(rdt,3)+1 == size(mask,3)+1 All horizontal dimensions must have the same size (no check is done).
call vert_advection_end DESCRIPTION Termination routine for the vertical advection module. It is not mandatory that this routine be called. This routine releases any global storage that may have been allocated. The amount of memory that may be deallocated is relatively small. If a finite volume advection scheme was used, then the maximum CFL and the number of CFL violations are printed to standard output.