meteo-filter v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
meteo-filter is a tool designed to filter meteorological forcing data. It processes input files, applies a harmonic filter to remove unwanted frequencies (such as tidal signals), and outputs the filtered data in a specified format.
Usage¶
meteo-filter [OPTIONS]
Options¶
Option |
Description |
Default |
|---|---|---|
|
Display help and exit. |
- |
|
Archive directory where input files are stored. |
|
|
Archive file name convention. See Convention for details. |
|
|
Start date for filtering. See Date Formats for details. |
Mandatory |
|
End date for filtering. See Date Formats for details. |
Mandatory |
|
List of variables to filter (e.g., |
Mandatory |
|
Path to a land mask file (optional). |
- |
Convention¶
The file name convention uses placeholders to dynamically generate file names based on dates. The following placeholders are supported:
Placeholder |
Description |
Range |
|---|---|---|
|
Year (4 digits) |
0000–9999 |
|
Month |
01–12 |
|
Day of the month |
01–31 |
|
Hour of the day |
00–23 |
Example:
EA_YYYYMM.EC→EA_202605.EC(for May 2026).
Date Formats¶
The following date formats are accepted:
yyyy/mm/dd HH:MM:SS.SSSdd/mm/yyyy HH:MM:SS.SSSmm/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
Examples¶
Basic Filtering¶
Filter variables temperature and wind_speed from May 1, 2026, to May 10, 2026:
meteo-filter -p /path/to/archive \
-c EA_YYYYMM.EC \
-s 01/05/2026 \
-f 10/05/2026 \
-v temperature wind_speed
Filtering with Custom Convention¶
Use a custom file naming convention (data_YYYYMMDD.nc):
meteo-filter -p /path/to/archive \
-c data_YYYYMMDD.nc \
-s 2026/05/01 \
-f 2026/05/10 \
-v precipitation
Filtering with Land Mask¶
Apply a land mask during filtering:
meteo-filter -p /path/to/archive \
-s 2026/05/01 \
-f 2026/05/10 \
-v humidity \
--landmask /path/to/landmask.nc
Filtering for a Single Day¶
Filter data for a single day (January 15, 2026):
meteo-filter -p /path/to/archive \
-s 15/01/2026 \
-f 15/01/2026 \
-v pressure
Environment Variables¶
meteo-filter uses OpenMP for parallelization. Key environment variables:
Variable |
Description |
|---|---|
|
Number of threads to use for parallel processing. |
|
Runtime schedule type and chunk size. |
|
Enable/disable dynamic thread adjustment. |
|
Enable/disable nested parallelism. |
Example:
OMP_NUM_THREADS=4 meteo-filter -p /path/to/archive -s 01/05/2026 -f 10/05/2026 -v temperature
Note: Adjust
OMP_NUM_THREADSbased on your system’s available CPU cores to optimize performance.
Notes¶
Input Files:
Must follow the specified file name convention (default:
EA_YYYYMM.EC).The tool expects files to be stored in the directory specified by
-p.
Output:
Filtered data is saved in files with the prefix
filtered-followed by the original file name (e.g.,filtered-EA_202605.EC).
Performance:
For large datasets, consider using OpenMP to speed up processing by setting
OMP_NUM_THREADS.The tool is optimized for 1-hour ERA5 data but may require adjustments for other temporal resolutions.
Land Mask:
The
--landmaskoption is useful for excluding land areas from the analysis.
Date Handling:
If no end date (
-f) is provided, it defaults to the start date (-s) in an inclusive manner.
See Also¶
OpenMP Documentation (for parallelization options)
GRIB-API Documentation (if compiled with GRIB support)