cg3e_cmd
Overview
cg3e_cmd is a command-line program to take a raw CG-3 data file and
translate it to space-delimited columns for plotting or analysis. Column
headers and other non-data lines are preceeded by a '#' to mark a comment.
Usage
cg3e_cmd.py INFILE OUTFILE "FIELDS" [-d] [-e] [-T] [-v] [-E elevation] [-L] [-l] [-C lat lon] [-G] [-O offset]
where INFILE and OUTFILE are the filenames of the raw CG-3 data file
and the output file. FIELDS is a space-separated list of
field tokens (see below). Note that the list must be inclosed in
quotes to prevent the shell from interpeting each token as an argument.
Optional Arguments:
- -d: Remove meter-applied linear drift. This uses the drift
coeffecient and drift start date in the CG-3 header to remove the
on-line drift correction
- -e: Remove meter-applied Earth tide correction. This will remove
the Longman ETC applied by the meter.
- -T: Apply Tamura ETC to the data. Normally used in conjuction
with -e option.
- -v: Verbose output. Without this option, the program gives no
status information except for fatal errors. With this option, a
running status of the program is given on stdout. Nothing is ever
printed to stderr.
- -E elevation: Use the value "elevation" as the station elevation in
METERS for the Tamura ETC calculation.
- -L: Flip longitude of stations (i.e. multiply by -1)
- -l: Flip latitude of stations
- -C lat lon: Use lat/lon in decimal degrees for _all_ station
positions; must give both positions
- -G: Flip sign of GMT offset for stations
- -O offset: Use "offset" as the time difference from GMT, for all
stations. Can be combined with -G option
Field Tokens
The following tokens are recognized by the program:
RD - JD relative to first data point
AD - absolute Julian Date (JD)
TS - String representation of date/time
ID - Station ID string
G - Gravity reading
S - Reading standard deviation
TX - X tilt
TY - Y tilt
T - Temperature
ETC - Longman/meter ETC
TETC - computed Tamura ETC (using lat/lon and elevation of 0.0 m)
DUR - Reading duration
REJ - # of rejected samples
LAT - station latitude (from header)
LON - station longitude (from header)
CASE IS IMPORTANT! The tokens must be uppercase as shown here.
Unknown tokens are silently ignored. Field order is fixed; the order in the
token string is irrelevant.