simradTide
Overview
simradTide converts Simrad multibeam ASCII tide files (fixed-column YYYYMMDDHHMM followed by water level) into the 4-column JHC ASCII tide format (jday hour min tide), inverting the sign of the water level (-MLLWlevel) to match OMG’s tide sign convention.
Syntax & CLI Options
simradTide [OPTIONS] -in <tidefilename> -out <mytideformatname>
| Option | Description | Default |
|---|---|---|
-in <filename> | Required. Input Simrad ASCII tide file (1 header line). | None |
-out <filename> | Required. Output 4-column JHC ASCII tide file (jday hour min tide). | None |
-v | Print parsed year, month, day, hour, minute, and water level to stdout. | Disabled |
How It Works
- Header Skipping: Reads and discards
1header line at the top of the input file. - Fixed-Column Slicing: For each subsequent line:
- Bytes
[0..3]: 4-digityear(YYYY) - Bytes
[4..5]: 2-digitmonth(MM) - Bytes
[6..7]: 2-digitday(DD) - Bytes
[8..9]: 2-digithour(HH) - Bytes
[10..11]: 2-digitmin(mm) - Bytes
[12..17]: floating-point water level (MLLWlevel)
- Bytes
- Julian Day & Sign Inversion: Computes
jdayviastdtime_dmy_to_jul_day(day, month, year)and writesjday hour min -MLLWlevelto-out.
Examples
Convert a Simrad tide file to OMG binary tide format:
simradTide -in simrad_tide.txt -out omg_tide.asc
binTide -year 2004 omg_tide.asc omg_tide.bin
mergeTide -tide omg_tide.bin merged/JD120/*.merged