comodo-detidor-mpi v3.2.3

Mercurial revision 5770:c90c3015e72d | 2026-05-22


Description

comodo-detidor-mpi detides comodo-compliant NetCDF outputs and produces tidal atlases. It is used by CTOH (Centre de Topographie des Océans et de l’Hydrosphère).

The tool:

  • Takes a file or a list of files as input.

  • Performs spectral analysis on a given list of tidal waves.

  • Produces tidal atlases (amplitude and phase maps for each tidal constituent) and detided output files.

Note: The time variable in input files must comply with the CF conventions.


Usage

comodo-detidor-mpi file1 [file2 ...] [OPTIONS] -d wave1 [wave2 ...]

Options

General Options

Option

Description

--help, -h

Display help and exit.

--nodal=no

Disable nodal corrections.


Input/Output Options

Option

Description

-p, --output-directory <dir>

Output directory. Recommended: Use a different hard drive for detiding to improve performance.

-c, --control <file>

Path to a file containing control points (ASCII format: number of points followed by longitude latitude [layer]).

-l <file>

Path to a file containing a list of input files (overrides command-line file list).

-g <file>

Path to the grid file (required if coordinates are missing in input files and atlases/control points are used).


Analysis Options

Option

Description

-s <date>

Start date for analysis. See Date Formats.

-f <date>

End date for analysis. See Date Formats.

-v <var1> [var2 ...]

List of variables to detide (e.g., ssh, tem, sal, XE).

-w <wave>

List of tidal waves to analyze. See Wave list and Spectra. ones.

--averaging <[min:max]>

Time integration range (in seconds) for time-averaged data (e.g., "[-3600:0]" for hourly averages).

--spectrum <name>

Specifies the detiding spectrum by name. See Wave list and Spectra.


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 and Spectra

You can specify:

  1. Individual waves (run showarg to see the full list of available waves):

  • Majors ones are Q1 O1 P1 K1 N2 M2 S2 K2 M4 MS4.

  1. Predefined spectra (run showarg to get associated waves and the duration needed for wave separation):

  • ESTUARINE

  • ESTUARINE-HF

  • COMODO

  • COASTAL

  • COASTAL-HF

  • SHELF

  • SHELF-HF

  • DEEP

  • DEEP-HF

  • REDUCED

  • CURRENTS-HF

  • FES2022c

  • AVISO-FES-SP

  • AVISO-FES-ADMITTANCE

  • AVISO-FES-LP

  • AVISO-FES-LP-PROXY


Examples

Basic Detiding

Detide variables ssh, tem, and sal for waves M2, S2, N2, K2:

comodo-detidor-mpi -s 15/12/2008 -f 28/02/2009 \
  -l files.list -c control.dat -g grille_domconcat.nc \
  -v ssh tem sal \
  -w M2 S2 N2 K2

Detiding with Custom Waves

Detide variable XE for a custom set of waves:

comodo-detidor-mpi -s 02/01/2000 \
  -c control.dat \
  -v XE \
  -w K1 O1 Q1 M2 S2 N2 K2 L2 2N2 2NS2 2SM2 2SN2 MK3 M4 SN4 MS4 3MS4 MN4 S4 M6 2MS6

Using a Predefined Spectrum

Use the COMODO spectrum:

comodo-detidor-mpi -l files.list \
  -v ssh \
  --spectrum COMODO \

Time Averaging

Specify a time-averaging interval of [-3600:0] (1 hour backward):

comodo-detidor-mpi -l files.list \
  -v ssh \
  --averaging "[-3600:0]" \
  -w M2 S2

Environment Variables

comodo-detidor-mpi uses OpenMP (version 201511) for parallelization. Key environment variables:

Variable

Description

OMP_NUM_THREADS

Number of threads to use.

OMP_SCHEDULE

Runtime schedule type and chunk size.

OMP_DYNAMIC

Enable/disable dynamic thread adjustment.

OMP_NESTED

Enable/disable nested parallelism.

Example:

OMP_NUM_THREADS=6 comodo-detidor-mpi -l files.list -v ssh -w M2 S2

Note: If running on a busy machine, limit threads to the number of free CPUs to avoid performance degradation.


Notes

  1. Input Files:

  • Must be comodo-compliant NetCDF files.

  • The time variable must follow CF conventions.

  1. Output:

  • Detided files are saved in the specified output directory (-p or --output-directory).

  1. Performance:

  • For large datasets, use -p to output to a different hard drive to avoid I/O bottlenecks.

  • Adjust OMP_NUM_THREADS based on available CPU resources.


See Also