usgsTide
Overview
usgsTide converts 7-column USGS / Rich Signell ASCII tide model or gauge files (year month day hour min sec rtide) into the 4-column JHC ASCII tide format (jday hour min rtide).
Syntax & CLI Options
usgsTide [OPTIONS] -tide <tidefilename> <outfilename>
| Option | Description | Default |
|---|---|---|
-tide <filename> | Required. Input 7-column USGS ASCII tide file (year month day hour min sec rtide). | None |
<outfilename> | Required. Output 4-column JHC ASCII tide file (jday hour min rtide). | None |
-v | Print year month day hour diagnostics for each record. | Disabled |
How It Works
- Reads 7 whitespace-delimited fields per line (
fscanf(tidefile, "%d%d%d%d%d%d%f", &year, &month, &day, &hour, &min, &sec, &rtide)). - Converts
(month, day)to standard 365-day Julian day (day += month_offset). - Writes
day hour min rtide(with two decimal places%.2f) to bothstdoutand<outfilename>.
Examples
Convert a 7-column USGS tide file to OMG binary format:
usgsTide -tide signell_stellwagen.txt stellwagen.asc
binTide -year 1994 stellwagen.asc stellwagen.bin
mergeTide -tide stellwagen.bin merged/*.merged