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
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
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
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"
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