altimetry-decimate v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
altimetry-decimate is a tool designed to decimate altimetric analysis databases. It processes harmonic constants and applies filters based on depth, resolution, and error thresholds to refine the dataset.
Usage¶
altimetry-decimate [OPTIONS] input
Options¶
Option |
Description |
|---|---|
|
Display help and exit. |
|
Path to the harmonic constants database (input). |
|
Optional harmonic constants database to merge with the execution output. |
|
Path to the bathymetry file (used for deep/shelf separation). |
|
Path to the selection polygon file (for spatial filtering). |
|
Name of the selection zone. |
|
Targeted along-track resolution in deep ocean (default: |
|
Targeted along-track resolution in shelf seas (default: |
|
Minimum eligible depth (default: |
|
Maximum eligible depth (default: |
|
Maximum eligible analysis error (default: |
|
Maximum eligible noise/signal ratio (default: |
|
Atlas file naming convention. |
|
Path to the output file (default: |
Examples¶
Basic Decimation¶
Decimate a harmonic constants database with default parameters:
altimetry-decimate -g harmonic_constants.mgr M2
Decimate with Custom Resolution¶
Set custom resolutions for deep ocean and shelf seas:
altimetry-decimate -g harmonic_constants.mgr \
-resolution_deep 150.0 \
-resolution_shelf 10.0 \
M2 S2
Filter by Depth¶
Apply depth filters to exclude shallow or deep areas:
altimetry-decimate -g harmonic_constants.mgr \
-min_depth 10.0 \
-max_depth -5000.0 \
M2
Filter by Error and Noise/Signal Ratio¶
Exclude data with high analysis error or noise/signal ratio:
altimetry-decimate -g harmonic_constants.mgr \
-error 0.01 \
-max_ratio 0.5 \
M2 K1
Merge with Additional Database¶
Merge the output with an existing harmonic constants database:
altimetry-decimate -g harmonic_constants.mgr \
-merge additional_constants.mgr \
-o merged_output.mgr \
M2
Spatial Filtering with Polygon¶
Apply spatial filtering using a polygon file:
altimetry-decimate -g harmonic_constants.mgr \
-p selection_polygon.txt \
-z "North Atlantic" \
M2 S2
Full Example with All Options¶
Combine multiple filters and options:
altimetry-decimate -g harmonic_constants.mgr \
-b bathymetry.nc \
-p selection_polygon.txt \
-z "North Atlantic" \
-resolution_deep 150.0 \
-resolution_shelf 10.0 \
-min_depth 10.0 \
-max_depth -5000.0 \
-error 0.01 \
-max_ratio 0.5 \
-o filtered_output.mgr \
M2 S2 K1 O1
Environment Variables¶
altimetry-decimate uses OpenMP (version 201511) for parallelization. The following environment variables can be used to control its behavior:
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 altimetry-decimate -g harmonic_constants.mgr M2
Note: If running on a machine with high CPU load, limit the number of threads to the number of free CPUs to avoid performance degradation.
Notes¶
Input Requirements:
The input must be a harmonic constants database (e.g.,
.mgrfile).At least one tidal wave must be specified (e.g.,
M2,S2,K1).
Output:
By default, the output is saved as
filtered.mgr.Use
-oto specify a custom output file.
Bathymetry:
The
-boption is required for deep/shelf separation.
Polygon Selection:
The
-poption requires a polygon file to define the spatial selection area.The
-zoption assigns a name to the selection zone.
Resolution:
-resolution_deepand-resolution_shelfcontrol the along-track resolution for decimation.
Error and Ratio Filters:
-errorfilters out data with analysis errors exceeding the specified threshold.-max_ratiofilters out data with a noise/signal ratio exceeding the specified threshold.
See Also¶
OpenMP Documentation (for environment variables and parallelization)
CF Conventions (for time and coordinate standards in NetCDF files)