comodo-energy v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
comodo-energy calculates the spectral energy budget from structured-grid tidal atlases. It computes the following for each specified tidal wave:
Stokes’ transport
Energy flux
Dissipation rate
The tool interpolates elevation and speed components at bathymetry points to perform these calculations.
Usage¶
comodo-energy bathymetry bathymetry_varname atlas_convention elevation_varname lon_speed_varname lat_speed_varname wave1 [wave2 ...]
Arguments¶
Argument |
Description |
|---|---|
|
Path to the bathymetry file. |
|
Name of the bathymetry variable in the file. |
|
Naming convention for atlas files. See Convention. |
|
Variable name for elevation in the atlas. |
|
Variable name for the longitudinal speed component. |
|
Variable name for the latitudinal speed component. |
|
List of tidal waves to analyze (e.g., |
Convention¶
The atlas file naming convention supports the following placeholders:
WAVE: Replaced by the uppercase wave name (e.g.,M2).VAR: Replaced by the variable name (e.g.,elevation).wave: Replaced by the lowercase wave name (e.g.,m2).Wave: Replaced by the capitalized wave name (e.g.,M2).
Note: If the file exists without any replacements, no substitution is performed.
Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
Examples¶
Basic Energy Budget Calculation¶
Calculate the energy budget for waves M2 and S2:
comodo-energy bathymetry.nc depth atlas_convention elevation u v M2 S2
Single Wave Analysis¶
Analyze only the M2 wave:
comodo-energy bathymetry.nc depth atlas_convention elevation u v M2
Multiple Waves with Custom Naming Convention¶
Use a custom atlas naming convention (e.g., tide_{WAVE}_{VAR}.nc):
comodo-energy bathymetry.nc depth tide_{WAVE}_{VAR}.nc elevation u v M2 S2 K1
Environment Variables¶
comodo-energy uses OpenMP (version 201511) for parallelization. Key environment variables:
Variable |
Description |
|---|---|
|
Number of threads to use. |
|
Runtime schedule type and chunk size. |
|
Enable/disable dynamic thread adjustment. |
|
Enable/disable nested parallelism. |
Example:
OMP_NUM_THREADS=6 comodo-energy bathymetry.nc depth atlas_convention elevation u v M2 S2
Note: If running on a machine with high CPU load, limit threads to the number of free CPUs to avoid performance degradation.
Notes¶
Input Files:
The bathymetry file must contain a valid grid and depth data.
Atlas files must follow the specified naming convention.
Output:
Results are saved in NetCDF files named
{wave}-energy.ncfor each wave.A
total-energy.ncfile is generated with the total dissipation.
Interpolation:
Elevation and speed components are interpolated at bathymetry points.
Mask Handling:
Masked values (e.g., land points) are excluded from calculations.
Performance:
For large datasets, adjust
OMP_NUM_THREADSto optimize performance.
See Also¶
CF Conventions (for NetCDF file standards)
OpenMP Documentation (for parallelization details)