dutchTide
Overview
dutchTide converts Dutch hydrographic tide gauge / model ASCII files (containing YYYYMMDD, HHMMSS, Easting, Northing, astronomical tide, surge, MSL water level, and MLLW water level in centimeters) into the 4-column JHC ASCII tide format (jday hour min tide_m).
Syntax & CLI Options
dutchTide [OPTIONS] -in <tidefilename> -out <mytideformatname>
| Option | Description | Default |
|---|---|---|
-in <filename> | Required. Input Dutch ASCII tide file (7-line header). | None |
-out <filename> | Required. Output JHC ASCII tide filename (jday hour min elev_m). | None |
-v | Print verbose date, time, and elevation values to stdout. | Disabled |
How It Works
- Header Skipping: Skips the first
7header lines of the input file. -
Record Parsing: Reads each data line using:
sscanf(linestring, "%s %s %s %s %d %d %d %d", datestring, timestring, eaststring, northstring, &tide, &surge, &MSLlevel, &MLLWlevel); - Date/Time & Unit Conversion:
- Extracts
YYYY,MM,DDfromdatestringandHH,MM,SSfromtimestring. - Computes Julian day (
jday) viastdtime_dmy_to_jul_day(day, month, year). - Converts
MLLWlevelfrom centimeters to meters ((float)MLLWlevel / 100.0) and writesjday hour min MLLW_mto the output file.
- Extracts
Examples
Convert a Dutch RWS tide file and compile to binary format:
dutchTide -in rws_ijmuiden.txt -out ijmuiden.asc
binTide -year 2003 ijmuiden.asc ijmuiden.bin