# 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](http://cfconventions.org/cf-conventions/cf-conventions.html#time-coordinate)**. --- ## Usage ```bash 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 ` | Output directory. **Recommended:** Use a different hard drive for detiding to improve performance. | | `-c`, `--control ` | Path to a file containing control points (ASCII format: number of points followed by `longitude latitude [layer]`). | | `-l ` | Path to a file containing a list of input files (overrides command-line file list). | | `-g ` | Path to the grid file (required if coordinates are missing in input files and atlases/control points are used). | --- ### **Analysis Options** | Option | Description | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-s ` | Start date for analysis. See [Date Formats](#date-formats8). | | `-f ` | End date for analysis. See [Date Formats](#date-formats8). | | `-v [var2 ...]` | List of variables to detide (e.g., `ssh`, `tem`, `sal`, `XE`). | | `-w ` | List of tidal waves to analyze. See [Wave list and Spectra](#wave-lists-spectra5). ones. | | `--averaging <[min:max]>` | Time integration range (in seconds) for time-averaged data (e.g., `"[-3600:0]"` for hourly averages). | | `--spectrum ` | Specifies the detiding spectrum by name. See [Wave list and Spectra](#wave-lists-spectra5). | --- (date-formats8)= ## 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-spectra5)= ## Wave Lists and Spectra You can specify: 1. **Individual waves** (run [showarg](../infos/showarg.md) to see the full list of available waves): - Majors ones are Q1 O1 P1 K1 N2 M2 S2 K2 M4 MS4. 2. **Predefined spectra** (run [showarg](../infos/showarg.md) 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`: ```bash 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: ```bash 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: ```bash comodo-detidor-mpi -l files.list \ -v ssh \ --spectrum COMODO \ ``` ### **Time Averaging** Specify a time-averaging interval of `[-3600:0]` (1 hour backward): ```bash 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:** ```bash 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**. 2. **Output:** - Detided files are saved in the specified output directory (`-p` or `--output-directory`). 3. **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 - [CF Conventions for Time Coordinates](http://cfconventions.org/cf-conventions/cf-conventions.html#time-coordinate) - [`showarg`](https://www.comodo-ocean.fr/) (for listing available waves)