noaaTide
Overview
noaaTide converts legacy 8-column NOAA Data Collection Platform (DCP) ASCII water-level files (sid dcp YY/MM/DD HH:MM:SS tide flat rofc t_flag) into the 4-column JHC ASCII tide format (jday hour min tide).
Syntax & CLI Options
noaaTide [OPTIONS] <infilename> <outfilename>
| Option | Description | Default |
|---|---|---|
<infilename> | Required. Input legacy 8-column NOAA ASCII tide file. | None |
<outfilename> | Required. Output 4-column JHC ASCII tide file. | None |
-shift <days> <hours> <mins> | Apply an integer time shift (shift_day, shift_hour, shift_min) to each timestamp before computing day-of-year. | 0 0 0 |
-v | Print converted jday hour min tide records to stdout. | Disabled |
How It Works
-
Reads 8 whitespace-separated tokens per record:
fscanf(floatfile, "%d%d%s%s%f%d%d%d", &sid, &dcp, &str1, &str2, &rtide, &flat, &rofc, &t_flag) - Extracts 2-digit
year,month, anddayfromstr1(YY/MM/DD) andhour,min,secfromstr2(HH:MM:SS). - Applies any time offset specified via
-shift <days> <hours> <mins>, converts(month, day)to day-of-year (1..365), and writesday hour min rtideto<outfilename>.
Examples
Convert a legacy NOAA DCP tide file with a +5 hour timezone shift to UTC:
noaaTide -shift 0 5 0 noaa_dcp.raw noaa_utc.asc
binTide -year 1994 noaa_utc.asc noaa_utc.bin
Workflow Context
- Upstream: Legacy NOAA NOS/DCP water level logs.
- Modern Alternative: Use
noaaTC_Tidefor modern NOAA CO-OPS Tides & Currents web exports. - Downstream:
binTide$\rightarrow$mergeTide.