** Next:** setopenbc.F
** Up:** The Proudman Oceanographic Laboratory
** Previous:** saltflux.F

**Subsections**

#

scoordset.F

##

subroutine scoordset

**
A horizontally-varying vertical coordinate (s-coordinate) is
derived as an alternative to the -coordinate calculated
in sigmaset.F. In water of depth less than some critical depth
, the s-levels are identical to -levels, that is,
they are equally spaced in the vertical. Where the water depth
exceeds , 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
-levels.
**
**Let for
be equally spaced
values between and
.
If the depth at the location is less than
then
, otherwise
**

**The deviation from the usual -levels is given by
**

**
where and are parameters read in from the file
scoord_params.dat. For example, the values and
give increased resolution at the surface only while
and 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.
**

- none

**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
-levels.
**dsc** , the separation between 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 .
**sds** intermediate variable to ensure correct sum
for **ds**.
**theta, bb** variables and used in the
calculation of the deviation of the s-levels from the usual
-levels.
**s** array containing equally-spaced values from
-1 to 0.
**temp3d** array of the s-levels at each point in the
model grid.

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

**1** input file scoord_params.dat contains parameters
defining the s-coordinates - and .
**66** output file scoord.dat to write out 3D array of
the horizontally varying vertical coordinate.

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

- copy1d
- Exch3DS, Exch3DR
- out3d

- b3dgrid

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

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

- none

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