PUBLIC INTERFACE ~ PUBLIC DATA ~ PUBLIC ROUTINES ~ NAMELIST ~ DIAGNOSTIC FIELDS ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

Module ocean_util_mod

Contact:  Ron Pacanowski Matt Harrison
Reviewers:  S. M. Griffies
Change History: WebCVS Log


OVERVIEW

This module contains many routines of use for mom4.

A utility module for mom4.


OTHER MODULES USED

    constants_mod
mpp_domains_mod
mpp_mod
time_manager_mod
ocean_domains_mod
ocean_types_mod

PUBLIC INTERFACE

ocean_util_init:
invtri:
invtri_bmf:
invtri_bmf_v1:
iplot:
matrix:
write_timestamp:


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. ocean_util_init

    DESCRIPTION
    Initialize mom4 utilities.


  2. invtri

    DESCRIPTION
    Solve the vertical diffusion equation implicitly using the method of inverting a tridiagonal matrix as described in Numerical Recipes in Fortran, The art of Scientific Computing, Second Edition, Press, Teukolsky, Vetterling, Flannery, 1992 pages 42,43.

    This routine assumes that the variables are defined at grid points, and the top and bottom b.c. are flux conditions.

    inputs:

    z = right hand side terms

    nk = number of vertical levels

    topbc = top boundary condition

    botbc = bottom boundary condition

    dcb = vertical mixing coeff at base of cell

    tdt = timestep over which do implicit update

    kmz = level indicator

    mask = land/sea mask

    outputs:

    z = returned solution



  3. invtri_bmf

    DESCRIPTION
    Solve the vertical diffusion equation implicitly using the method of inverting a tridiagonal matrix as described in Numerical Recipes in Fortran, The art of Scientific Computing, Second Edition, Press, Teukolsky, Vetterling, Flannery, 1992 pages 42,43.

    This routine assumes that the variables are defined at grid points, and the top b.c. is a flux condition. The bottom b.c. is assumed to be a bottom drag which is implemented implicitly, thus allowing for large values of the bottom drag coefficient.

    NOTE: This routine is generally only called when doing the bmf implicitly in time. The original invtri is used for explicit bmf. It differs from invtri only in the presence of a mask(i,j,kp1) multiplying unity in the definition of the coefficient b(i,k).

    NOTE: This routine is under development (SMG. Nov 2008)

    inputs:

    z = right hand side terms

    nk = number of vertical levels

    topbc = top boundary condition

    botbc = bottom boundary condition

    dcb = vertical mixing coeff at base of cell

    tdt = timestep over which do implicit update

    kmz = level indicator

    mask = land/sea mask

    outputs:

    z = returned solution



  4. invtri_bmf_v1

    DESCRIPTION
    Solve the vertical friction equation implicitly using the method of inverting a tridiagonal matrix as described in Numerical Recipes in Fortran, The art of Scientific Computing, Second Edition, Press, Teukolsky, Vetterling, Flannery, 1992 pages 42,43.

    This routine assumes that the variables are defined at grid points, and the top b.c. is a flux condition. The bottom b.c. is assumed to be a bottom drag which is implemented implicitly, thus allowing for large values of the bottom drag coefficient.

    NOTE: This routine is generally only called when doing the bmf implicitly in time. The original invtri is used for explicit bmf.

    NOTE: This routine is under development, and is presently not used. (SMG. Nov 2008)

    inputs:

    z = right hand side terms

    nk = number of vertical levels

    topbc = top boundary condition

    botbc = time explicit bottom boundary condition (zero in this routine, since bmf is implicit)

    gamma = botttom drag factor scaling the u(taup1) contribution to bottom drag

    dcb = vertical mixing coeff at base of cell

    tdt = timestep over which do implicit update

    kmz = level indicator

    mask = land/sea mask

    outputs:

    z = returned solution



  5. iplot

    DESCRIPTION
    map integer array "iarray" into characters for printing with format (a1) to provide a contour map of the integer field. note: max number of unique characters = 80

    inputs:

    iarray = integer array to be plotted

    is = starting index along inner dimension of "iarray"

    ie = ending index along inner dimension of "iarray"

    js = starting index along outer dimension of "iarray"

    je = ending index along outer dimension of "iarray"

    output: prints contour map of "iarray"



  6. matrix

    DESCRIPTION
    matrix is a general two-dimensional array printing routine, input:

    array = the array to be printed

    istrt = the 1st element of the 1st dimension to be printed

    im = the last element of the 1st dimension to be printed

    jstrt = the 1st element of the 2nd dimension to be printed

    jm = the last element of the 2nd dimension to be printed the 2nd dimension is printed in reverse order if both jstrt and jm are negative

    scale = a scaling factor by which array is divided before printing. (if this is zero, no scaling is done.) if scale=0, 10 columns are printed across in e format if scale>0, 20 columns are printed across in f format

    output: print "array" as a matrix



  7. write_timestamp

    DESCRIPTION
    Write the time stamp.



DATA SETS

None.


ERROR MESSAGES

None.


top