transTide
Overview
transTide translates Australian (“Oz”) and CHS 81-byte fixed-record tide gauge files (each containing 12 fifteen-minute tide heights in centimeters across a 3-hour block) into the 4-column JHC ASCII tide format (jday hour min tide_m).
Syntax & CLI Options
transTide [OPTIONS] -tide <tidefilename> <outfilename>
| Option | Description | Default |
|---|---|---|
-tide <filename> | Required. Input 81-byte fixed-record tide file. | None |
<outfilename> | Required. Output 4-column JHC ASCII tide file (jday hour min tide_m). | None |
-v | Print parsed 4-character station header, date/hour, and 15-minute values to stdout. | Disabled |
How It Works
- Reads 81-byte blocks continuously (
fread(line, 81, 1, tidefile)) until EOF. - Extracts 2-digit
year(bytes11..12),month(bytes13..14),day(bytes15..16), andhourindex (bytes18..19). - Converts
(month, day)to leap-year day-of-year (1..366). - Loops over the 12 three-character integer centimeter tide readings (
line[22 + 5 * i]fori = 0..11), divides each by100.0to convert to meters, and writesday (hour + i)/4 15*(i%4) tide_mto<outfilename>.
Examples
Convert an 81-byte Australian tide file to binary OMG tide format:
transTide -tide oz_tide.dat oz_tide.asc
binTide -year 1993 oz_tide.asc oz_tide.bin
mergeTide -tide oz_tide.bin merged/*.merged
Workflow Context
- See Also:
quebecTide. - Downstream:
binTide$\rightarrow$mergeTide.