  1.  NAME

  sgeo_grd - Calculate and plot geostrophic slope height

  2.  SYNOPSIS

  sgeo_grd(vg_file, out_file, yb, x, s0, v_scale , s_scale, v_dir,
  depths, plt, info, inst )

  3.  DESCRIPTION

  Read geostrophic current data from a grid ascii file, as output by C
  utility vgeo(1) and compute the corresponding slope heights. Generate
  a plot for each of the specified depths and save data into an ascii
  file.

  The input file must contain the following columns:

  1. Time in decimal days

  2. Longitude in degrees

  3. Latitide in degrees

  4. Depth in meters

  5. Geostrophic current

  This function requires a lot of parameters. The best way is to use it
  from Matlab script sgeo(1m).

  4.  PARAMETERS

     vg_file
        Name if input file with geostrophic current data.

     out_file
        Root name of output file. Suffixes are automatically added.

     yb Base year used to determine the decimal days in the input file.

     x  Column number to x-axis for plotting. It must be one of 1,2 or
        3. If negative,the axis direction will be reversed.

     s0 Initial slope value in meters.

     v_scale
        Factor to get geostrophic currents from input file in m/s.

     s_scale
        Scaling factor for plotting slope height points.

     v_dir
        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 northward,southward,westward of eastward.
     depths
        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.

     plt
        Title of plot.

     info
        Additionnal information string.

     inst
        Institute stamp.

  5.  OUTPUT

  The following files are generated:

     out_file.ps
        Postcript output of plot.

     out_file.asc
        Ascii data of slope height values.

  6.  AUTHORS

  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999

