reduce-v2 v3.2.3¶
Mercurial revision 5786:5c8b45563631 | 2026-08-04
Description¶
reduce-v2 is a tool used to filter Mog2D archives using a Lanczos time filter. It is developed and used by CTOH (Centre de Topographie des Océans et de l’Hydrosphère). The tool computes and writes clx-formatted filtered Mog2D archives.
Usage¶
reduce-v2 [OPTIONS]
Options¶
Note: If a default is not specified, the option is mandatory.
Input/Output Options¶
Option |
Description |
|---|---|
|
Root name for elevation archives. Default: |
|
Root name for pressure archives. Default: |
|
Input archive format: |
|
Output archive format: |
|
Path for input archives. Default: |
|
Path for output filtered archives. Default: |
Filtering Options¶
Option |
Description |
|---|---|
|
Filtering window in days. Default: |
|
Starting month for filtering request. |
|
Ending month for filtering request. |
|
Ratio factor for archive reduction. Default: |
|
Detiding method to remove S2 signal: |
|
Skip elevation processing. |
|
Skip pressure processing. |
|
Also remove high-frequency signals with a 12.5-hour filter. |
Advanced Options¶
Option |
Description |
|---|---|
|
Disable default values for |
|
Pressure factor. Default: |
|
Path to the mesh file. |
|
Variable name for elevation (default: |
|
Variable name for pressure (default: |
Deprecated Options¶
Option |
Replacement |
|---|---|
|
Use |
Examples¶
Basic Filtering¶
Filter elevation and pressure archives from January 2000 to December 2000:
reduce-v2 -start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data \
-iF cdf -oF cdf
Filter with Custom Root Names¶
Use custom root names for elevation and pressure archives:
reduce-v2 -h custom_elevation -p custom_pressure \
-start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data
Detide with Climatology Method¶
Remove S2 signal using the climatology method:
reduce-v2 -m climatology \
-start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data
High-Frequency Filtering¶
Remove high-frequency signals (12.5-hour filter):
reduce-v2 -hf \
-start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data
Pressure-Only Filtering¶
Skip elevation and filter only pressure archives:
reduce-v2 --pressure-only \
-p custom_pressure \
-start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data
Custom Filtering Window¶
Use a custom filtering window of 30 days:
reduce-v2 -w 30.0 \
-start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data
Resampling¶
Reduce archive size with a resampling factor of 2:
reduce-v2 -r 2 \
-start 01/2000 -end 12/2000 \
-i ./input_data \
-o ./output_data
Environment Variables¶
reduce-v2 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 reduce-v2 -start 01/2000 -end 12/2000 -i ./input_data -o ./output_data
Note: If running on a busy machine, limit threads to the number of free CPUs to avoid performance degradation.
Notes¶
Input Formats:
Supported formats:
clx(binary, deprecated) andcdf(NetCDF).NetCDF (
cdf) is the recommended format.
Detiding Methods:
analysis: Uses harmonic analysis to remove S2 signal.climatology: Uses precomputed climatology (requiresS2-elevation-atlas.ncorS2.ele.s2c).none: No detiding is applied.
High-Frequency Filtering:
The
-hfoption applies an additional 12.5-hour filter to remove high-frequency signals.
Resampling:
The
-roption reduces the number of frames in the output archives by the specified factor.
Output:
Filtered archives are saved in the specified output directory (
-o).Output filenames include the root name, year, and month (e.g.,
analysis-filtered-2000.01.nc).
Performance:
For large datasets, ensure the output directory (
-o) is on a fast storage device (e.g., SSD).Adjust
OMP_NUM_THREADSbased on available CPU resources.