PUBLIC INTERFACE ~ PUBLIC ROUTINES ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

## module vert_advection_mod

Contact: Bruce Wyman
Reviewers:
Change History: WebCVS Log
Last Modified: $Date: 2004/09/28 20:15:30 $

#### OVERVIEW

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.

#### OTHER MODULES USED

         fms_mod
         mpp_mod

#### PUBLIC INTERFACE

    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 ]

vert_advection:
  Computes the vertical advective tendency for an arbitrary quantity. There is no initialization routine necessary.
vert_advection_end:
  Termination routine for the vertical advection module.

#### PUBLIC ROUTINES

1. #### vert_advection

       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).

2. #### vert_advection_end

       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.

#### ERROR MESSAGES

Errors in vert_advection_mod
  vertical dimension of input arrays inconsistent
  The following was not true: size(w,3) = size(r,3)+1.
  invalid value for optional argument scheme
  The value of optional argument scheme must be one of the public parameters SECOND_CENTERED, FOURTH_CENTERED, SECOND_CENTERED_WTS, FOURTH_CENTERED_WTS, FINITE_VOLUME_LINEAR, FINITE_VOLUME_PARABOLIC, or FINITE_VOLUME_PARABOLIC2, VAN_LEER_LINEAR.
  invalid value for optional argument form
  The value of optional argument form must be one of the public parameters FLUX_FORM or ADVECTIVE_FORM.

#### REFERENCES

1. Lin, S.-J., W.C. Chao, Y.C. Sud, and G.K. Walker, 1994: A class of the van Leer-type transport schemes and its application to the moisture in a general circulation model. Mon. Wea. Rev., 122, 1575-1593.
2. Colella, P. and P.R. Woodward, 1984: The piecewise parabolic method (PPM) for gas-dynamical simulations. J. Comput. Phys., 54, 174-201.

#### KNOWN BUGS

None.

#### NOTES

None.

#### FUTURE PLANS

Will be monitoring the maximum CFL number to consider whether or not to implement a Lagrangian-type scheme.