next up previous
Next: setopenbc.F Up: The Proudman Oceanographic Laboratory Previous: saltflux.F

Subsections


scoordset.F


subroutine scoordset

Description

A horizontally-varying vertical coordinate (s-coordinate) is derived as an alternative to the $\sigma $-coordinate calculated in sigmaset.F. In water of depth less than some critical depth $h_{c}$, the s-levels are identical to $\sigma $-levels, that is, they are equally spaced in the vertical. Where the water depth exceeds $h_{c}$, the vertical spacing of the s-levels is allowed to vary (controlled by parameters) to suit the application, for instance, in deep water, s-levels allow higher resolution to be maintained near the surface than would be the case using $\sigma $-levels.

Let $\sigma_{k}$ for $k=1,\ldots,n-1$ be $n-1$ equally spaced values between $\sigma_{1}=-1$ and $\sigma_{n-1}=0$. If the depth $h_{i,j}$ at the location $i,j$ is less than $h_{c}$ then $S_{k}=\sigma_{k}$, otherwise

\begin{displaymath}
S_{k}=\sigma_{k} + \frac{h_{i,j}-h_{c}}{h_{i,j}} \left(
C \left( \sigma_{k} \right) - \sigma_{k} \right).
\end{displaymath}

The deviation from the usual $\sigma $-levels is given by

\begin{displaymath}
C \left( \sigma_{k} \right) = \left( 1-B \right)
\frac{\si...
...5 \right]\right)} - \tanh{0.5 \theta}}
{2 \tanh{0.5 \theta}},
\end{displaymath}

where $\theta$ and $B$ are parameters read in from the file scoord_params.dat. For example, the values $\theta=5$ and $B=0.25$ give increased resolution at the surface only while $\theta = 6$ and $B = 0.8$ give increased near-bed resolution too.

The formulae above give the locations of the s-levels at which the vertical velocity, eddy viscosity and diffusivity and turbulent kinetic energy are calculated. The vertical levels used for temperature and salinity calculations lie between these points, with two extra levels - half a level above the sea surface and half a level below the bed, to facilitate the use of flux boundary conditions. The vertical levels used for horizontal current calculations are calculated in the same way but using levels from the four surrounding points.

Subroutine Arguments

none

Local variables

i, j, k indices.
tagsigo, tagsig, tagds, tagsigv, tagdsv, tagdsup tags used in exchanging data between processors for multi-processor applications.
cs the deviation of the s-levels from the usual $\sigma $-levels.
dsc $=1/(n-2)$, the separation between $n-1$ equally spaced points, used in the calculation of the array s.
ffh intermediate variable used in the calculation of the s-levels.
hc the critical depth $h_{c}$.
sds intermediate variable to ensure correct sum for ds.
theta, bb variables $\theta$ and $B$ used in the calculation of the deviation of the s-levels from the usual $\sigma $-levels.
s array containing $n-1$ equally-spaced values from -1 to 0.
temp3d array of the s-levels at each point in the model grid.

Global variables changed

sigo, sigov, sig, sigv, ds, dsu, dsv, dsuv, dsup

Logical units

1 input file scoord_params.dat contains parameters defining the s-coordinates - $h_{c}, \theta$ and $B$.
66 output file scoord.dat to write out 3D array of the horizontally varying vertical coordinate.

Order of Things

  1. Calculate s-coordinates for levels where the vertical velocity, eddy viscosity and diffusivity and turbulent kinetic energy are defined.
  2. Calculate s-coordinates for temperature and salinity points.
  3. Calculate s-coordinates for horizontal current points.

Calls

copy1d
Exch3DS, Exch3DR
out3d

Called By

b3dgrid

Options - Logical

scoord_even true if the s-levels are to be equally-spaced in the vertical (same as $\sigma $-levels), irrespective of the equilibrium depth.
outscoord true if output of the s-coordinate levels at each point of the model grid is required.

Options - Compiler

SCOORD - use horizontally varying vertical coordinate (s-coordinate).
DEBUG, DEBUG_B3DRUN, DEBUG_MODEL - output variables for debugging.

Known Issues

none


next up previous
Next: setopenbc.F Up: The Proudman Oceanographic Laboratory Previous: saltflux.F
The AMMP Project 2005-04-20