# 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 ```bash tidal-bore [options] ``` --- ## Options ### **General Options** | Option | Description | | -------------- | ---------------------- | | `-h`, `--help` | Display help and exit. | --- ### **Input/Output Format Options** | Option | Description | | ---------------------------- | ---------------------------------------------------------- | | `-iF ` | Input format. Default: `GNU`. | | `-oF ` | Output format. Default: `GNU`. | | `-n ` | Number of columns for input GNU format. Default: `1`. | | `-o ` | Prefix for output files. | | `--suffix ` | Suffix to append to output file names. | | `--delimiter ` | 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 ` | Start date for processing. See [Date Formats](#date-formats11). | | `-f ` | End date for processing. See [Date Formats](#date-formats11). | | `--time-format ` | Time format for input/output. Default: `'YYYY-MM-DD HH-MM-SS'`. | | `--time-correction ` | 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 ` | Time origin for calculations. | --- ### **Data Processing Options** | Option | Description | | ----------------------------- | --------------------------------------------------------------------------- | | \`--step=<nb><y | m | | `--reconstruct` | Enable reconstruction of time series. | | `--resampling ` | Resampling period in seconds. If not specified, no resampling is performed. | | `--units-correction ` | 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=` | Mooring metadata (e.g., `"lon= lat= code= name= depth="`). | | `--header_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-formats11)= ## 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: ```bash tidal-bore input.txt -iF GNU -oF GNU -n 2 -o output ``` ### **Convert to SONEL\_HR Format** Convert a file to SONEL\_HR format: ```bash 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: ```bash tidal-bore input.txt --resampling 3600 -o output ``` ### **Apply Time Correction** Correct time to the `Europe/Paris` time zone: ```bash tidal-bore input.txt --time-correction Europe/Paris -o output ``` ### **Split Time Series by Month** Split a time series into monthly chunks: ```bash tidal-bore input.txt --step=1m -o output ``` ### **Enable Reconstruction** Enable reconstruction of the time series: ```bash tidal-bore input.txt --reconstruct -o output ``` ### **Add Mooring Metadata** Add mooring metadata (longitude, latitude, code, name, depth): ```bash 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: ```bash tidal-bore input.txt --delimiter "," --suffix _processed -o output ``` ### **Disable Splitting Columns** Disable splitting columns into separate files: ```bash tidal-bore input.txt --split=no -o output ``` ### **Apply Units Correction** Multiply data by a correction factor of `1.5`: ```bash 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. 2. **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. 3. **Resampling:** - If `--resampling` is not specified, no resampling is performed. 4. **Reconstruction:** - Use `--reconstruct` to enable time series reconstruction. This is useful for filling gaps or smoothing data. 5. **Mooring Info:** - The `--mooring_info` option allows embedding metadata directly into the output files. 6. **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 - [CF Conventions for Time Coordinates](http://cfconventions.org/cf-conventions/cf-conventions.html#time-coordinate) - [SONEL Data Formats](https://www.sonel.org/) - [GNU Time Series Formats](https://www.gnu.org/software/plotutils/)