.if n .ds Q \&"
.if t .ds Q ``
.if n .ds U \&"
.if t .ds U ''
.TH sgeo_grd 3m "CODAS Utilities" "GFI"
.tr \&
.nr bi 0
.nr ll 0
.nr el 0
.de DS
..
.de DE
..
.de Pp
.ie \\n(ll>0 \{\
.ie \\n(bi=1 \{\
.nr bi 0
.if \\n(t\\n(ll=0 \{.IP \\(bu\}
.if \\n(t\\n(ll=1 \{.IP \\n+(e\\n(el.\}
.\}
.el .sp
.\}
.el \{\
.ie \\nh=1 \{\
.LP
.nr h 0
.\}
.el .PP
.\}
..
.SH NAME

.Pp
\fBsgeo_grd\fP - Calculate and plot geostrophic slope height

.SH SYNOPSIS

.Pp
\fBsgeo_grd\fP(\fIvg_file\fP, \fIout_file\fP, \fIyb\fP, \fIx\fP, \fIs0\fP,
\fIv_scale\fP , \fIs_scale\fP, \fIv_dir\fP, \fIdepths\fP, \fIplt\fP, \fIinfo\fP,
\fIinst\fP
)

.SH DESCRIPTION

.Pp
Read geostrophic current data from a grid ascii file, as output by C
utility \fBvgeo\fP(1) and compute the corresponding slope
heights. Generate a
plot for each of the specified depths and save data into an ascii file.
.Pp
The input file must contain the following columns:
.nr ll +1
.nr el +1
.nr t\n(ll 1
.nr e\n(el 0 1
.af e\n(el \*(f\n(el
.if \n(ll>1 .RS
.nr bi 1
.Pp
Time in decimal days
.nr bi 1
.Pp
Longitude in degrees
.nr bi 1
.Pp
Latitide in degrees
.nr bi 1
.Pp
Depth in meters
.nr bi 1
.Pp
Geostrophic current
.if \n(ll>1 .RE
.nr el -1
.nr ll -1
.Pp
This function requires a lot of parameters. The best way is to use it from
Matlab script \fBsgeo\fP(1m).
.SH PARAMETERS

.Pp
.nr ll +1
.nr t\n(ll 2
.if \n(ll>1 .RS
.IP "\fBvg_file\fP  "
.nr bi 1
.Pp
Name if input file with geostrophic current data.
.Pp
.IP "\fBout_file\fP  "
.nr bi 1
.Pp
Root name of output file. Suffixes are automatically added.
.Pp
.IP "\fByb\fP  "
.nr bi 1
.Pp
Base year used to determine the decimal days in the input file.
.Pp
.IP "\fBx\fP  "
.nr bi 1
.Pp
Column number to x-axis for plotting. It must be one of \fB1\fP,\fB2\fP or
\fB3\fP. If negative,the axis direction will be reversed.
.Pp
.IP "\fBs0\fP  "
.nr bi 1
.Pp
Initial slope value in meters.
.Pp
.IP "\fBv_scale\fP  "
.nr bi 1
.Pp
Factor to get geostrophic currents from input file in m/s.
.Pp
.IP "\fBs_scale\fP  "
.nr bi 1
.Pp
Scaling factor for plotting slope height points.
.Pp
.IP "\fBv_dir\fP  "
.nr bi 1
.Pp
The direction that was used to compute the geostrophic current. This is
necessary in order to get the correct slope variations. This is one of
\fBnorthward\fP,\fBsouthward\fP,\fBwestward\fP of \fBeastward\fP.
.Pp
.IP "\fBdepths\fP  "
.nr bi 1
.Pp
Array with depths values at which plotting of slope heights is desired.
The values must be present in the input file (i.e. no interpolation is
carried out here). If empty,all available depths in the input file
will be plotted.
.Pp
.IP "\fBplt\fP  "
.nr bi 1
.Pp
Title of plot.
.Pp
.IP "\fBinfo\fP  "
.nr bi 1
.Pp
Additionnal information string.
.Pp
.IP "\fBinst\fP  "
.nr bi 1
.Pp
Institute stamp.
.Pp
.if \n(ll>1 .RE
.nr ll -1
.SH OUTPUT

.Pp
The following files are generated:
.nr ll +1
.nr t\n(ll 2
.if \n(ll>1 .RS
.IP "\fB\fIout_file\fP\fB.ps\fP\fP  "
.nr bi 1
.Pp
Postcript output of plot.
.Pp
.IP "\fB\fIout_file\fP\fB.asc\fP\fP  "
.nr bi 1
.Pp
Ascii data of slope height values.
.Pp
.if \n(ll>1 .RE
.nr ll -1
.SH AUTHORS

.Pp
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999
