tidal-bore v3.2.3

Mercurial revision 5770:c90c3015e72d | 2026-05-22


Description

tidal-bore is a tool designed to convert between different sea-level time series formats. It supports various input and output formats, resampling, time corrections, and additional metadata handling (e.g., mooring information).


Usage

tidal-bore <file> [options]

Options

General Options

Option

Description

-h, --help

Display help and exit.


Input/Output Format Options

Option

Description

-iF <format>

Input format. Default: GNU.

-oF <format>

Output format. Default: GNU.

-n <columns>

Number of columns for input GNU format. Default: 1.

-o <name>

Prefix for output files.

--suffix <text>

Suffix to append to output file names.

--delimiter <char>

Column delimiter for input/output. Default: ' ' (space).

--split=yes / --split=no

Split columns into separate files. Default: yes.


Date and Time Options

Option

Description

-s <date>

Start date for processing. See Date Formats.

-f <date>

End date for processing. See Date Formats.

--time-format <format>

Time format for input/output. Default: 'YYYY-MM-DD HH-MM-SS'.

--time-correction <offset>

Time correction offset in seconds. If NAN, corrects to local time zone (accounting for daylight saving changes). If followed by a time zone (e.g., Europe/Paris), corrects to the specified time zone.

--time-origin <origin>

Time origin for calculations.


Data Processing Options

Option

Description

`–step=<nb><y

m

--reconstruct

Enable reconstruction of time series.

--resampling <seconds>

Resampling period in seconds. If not specified, no resampling is performed.

--units-correction <factor>

Multiply data by a correction factor. Default: 1.

--local-datum-correction

Apply local datum correction.

--datum-correction

Apply datum correction.


Metadata Options

Option

Description

--mooring_info=<info>

Mooring metadata (e.g., "lon=<lon> lat=<lat> code=<code> name=<name> depth=<depth>").

--header_format=<format>

Format to decode mooring info from file.


Output Formatting Options

Option

Description

--nice=yes / --gnu_nice

Add an empty line at time breaks in GNU format. Default: yes.

--nice=no

Disable empty lines at time breaks.


Date Formats

Supported formats:

  • yyyy/mm/dd HH:MM:SS.SSS

  • dd/mm/yyyy HH:MM:SS.SSS

  • mm/yyyy

Notes:

  • The least significant parts (seconds, minutes, hours, days, months) are optional.

  • The separator can be any non-numeric character (e.g., /, -, `` ).

  • End dates are inclusive. Examples:

    • 2000 → 2001/01/01 00:00:00

    • 2000/01 → 2000/02/01 00:00:00

    • 2000/01/01 → 2000/01/02 00:00:00

    • 2000/01/01 00 → 2000/01/01 01:00:00

    • 2000/01/01 00:00 → 2000/01/01 00:01:00


Wave Lists

This section is not applicable to tidal-bore and has been removed.


Examples

Basic Conversion (GNU to GNU)

Convert a file from GNU format to GNU format with 2 columns:

tidal-bore input.txt -iF GNU -oF GNU -n 2 -o output

Convert to SONEL_HR Format

Convert a file to SONEL_HR format:

tidal-bore input.txt -iF GNU -oF SONEL_HR -o output

Resample Time Series

Resample a time series to a 3600-second (1-hour) interval:

tidal-bore input.txt --resampling 3600 -o output

Apply Time Correction

Correct time to the Europe/Paris time zone:

tidal-bore input.txt --time-correction Europe/Paris -o output

Split Time Series by Month

Split a time series into monthly chunks:

tidal-bore input.txt --step=1m -o output

Enable Reconstruction

Enable reconstruction of the time series:

tidal-bore input.txt --reconstruct -o output

Add Mooring Metadata

Add mooring metadata (longitude, latitude, code, name, depth):

tidal-bore input.txt --mooring_info="lon=2.35 lat=48.85 code=ST01 name=Station1 depth=10" -o output

Custom Delimiter and Suffix

Use a comma as a delimiter and append a suffix to output files:

tidal-bore input.txt --delimiter "," --suffix _processed -o output

Disable Splitting Columns

Disable splitting columns into separate files:

tidal-bore input.txt --split=no -o output

Apply Units Correction

Multiply data by a correction factor of 1.5:

tidal-bore input.txt --units-correction 1.5 -o output

Environment Variables

tidal-bore does not rely on specific environment variables for its core functionality. However, if used in scripts or workflows, standard environment variables (e.g., PATH) may apply.


Notes

  1. Input/Output Formats:

  • Supported formats include: GNU, DMY, YMD, SONEL_HR, LIST, RMN, PAB, PROFILERS, GLOSS, HAWAII, SEINE, RADAR, FOREMAN, MINH, LIST2, JMA, LEGEND, BODC, DART.

  • For GNU, DMY, and YMD formats, the input must have at least 2 columns: time and sea_level_value. Use -n to specify additional columns.

  1. Time Corrections:

  • Use NAN for --time-correction to automatically correct to the local time zone.

  • Specify a time zone (e.g., Europe/Paris) to correct to that time zone, accounting for daylight saving changes.

  1. Resampling:

  • If --resampling is not specified, no resampling is performed.

  1. Reconstruction:

  • Use --reconstruct to enable time series reconstruction. This is useful for filling gaps or smoothing data.

  1. Mooring Info:

  • The --mooring_info option allows embedding metadata directly into the output files.

  1. File Handling:

  • The tool currently does not support multiple input files in a single command. Only one input file can be processed at a time.


See Also