rel2abs [options] [file file ... ]
This utility converts relative currents into absolute ones. Ship velocities are read from a separate file specified with option -f. The latter is therefore required. If input files with relative currents are not specified, standard input is assumed. If the output file is not specified with option -o, standard output is assumed.
Synchronization of data from both input datasets is done using data present in both files. Ship velocities do not need to be defined on the same grid points as relative currents, as they are interpolated automatically. This utility can handle bad data which are defined as 1.0E38. Bad ship velocities are ignored.
Both input datasets can contain more data as required, in which case velocities and synchronization data can be specified on the command line. On output, all columns from the file containing relative currents are output.
On input, columns must be separated with white spaces. On output, data are written with %15.6f format and separated with a white space.
A typical application is given as an example later in this document.
The following options are implemented:
Specify the columns to read from the external file containing
ship velocities, where x is the column for synchronization
and interpolation of data, u and v are the column
containing eastward and northward ship velocities, respectively.
Default is 1,2,3.
Column numbering starts from one.
Name of file containing ship velocities. This option is
required.
Name of file for output data. If not specified, standard output
is assumed.
Specify the columns for corrections in the file containing relative currents, where X is the column for synchronization and interpolation of data, U and V are the column containing eastward and northward relative velocities, respectively. Default is 1,2,3. Column numbering starts from one.
The file specified with option -o contains the absolute current data.
As an example, assume one wants to generate a file with relative and absolute currents for each ensemble time. Using the
xtract(1) data extraction utility, create the contour file relative.con with the following columns:
With the same extraction utility, create the file ship.dat with the ship velocities:
Finally, convert the last two columns in the first file into absolute currents by running:
rel2abs -f ship.dat -c '1,2,3' -C '1,5,6' relative.con
Synchronization and interpolation of ship velocities will be carried out along time (first column number in options -c and -C). The output has the same number of columns as in relative.dat, but with the last two columns being absolute currents corrected from ship velocities.
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999.