noaaTC_Tide
Overview
noaaTC_Tide converts water level files downloaded from the NOAA Tides & Currents web portal (station_id YYYYMMDD HH:MM predicted_tide verified_tide) into the 4-column JHC ASCII tide format (jday hour min tide).
Syntax & CLI Options
noaaTC_Tide [OPTIONS] -in <tidefilename> -out <mytideformatname>
| Option | Description | Default |
|---|---|---|
-in <filename> | Required. Input NOAA Tides & Currents ASCII file. | None |
-out <filename> | Required. Output JHC ASCII tide file (jday hour min tide). | None |
-skip <N> | Number of header lines to skip at the beginning of the input file. | 14 |
-v | Print parsed year, month, day, hour, minute, predicted tide, and observed tide for each line. | Disabled |
How It Works
- Header Skipping: Reads and discards the first
skiplines (default14). -
Column Parsing: Parses 5 whitespace-separated fields per line:
sscanf(linestring, "%s %s %s %f %f", am_pm, datestring, timestring, &ptide, &tide);where
datestringisYYYYMMDD,timestringisHH:MM,ptideis column 4 (predicted), andtideis column 5 (verified/observed). - Julian Day Conversion: Converts
(day, month, year)to Julian day (jday) viastdtime_dmy_to_jul_dayand outputsjday hour min tide(using the 5th columntide).
Examples
Convert a NOAA Tides & Currents verified 6-minute water level file:
noaaTC_Tide -skip 14 -in noaa_8410140_eastport.txt -out eastport.asc
binTide -year 2007 eastport.asc eastport.bin