comodo-sfilter v3.2.3

Mercurial revision 5770:c90c3015e72d | 2026-05-22


Description

comodo-sfilter is a tool that duplicates the functionality of comodo-filter for scalar fields. It performs DF-II IIR filtering on input files. The tool takes one or more files as input and applies the specified filtering operations.


Usage

comodo-sfilter file1 [file2 ...] [OPTIONS]

Options

Option

Description

-h, --help

Display help and exit.

--control <file>

Path to a file containing control points. The file must be in ASCII format: the first line specifies the number of control points, followed by their coordinates (longitude latitude [layer]).

`–nodal=[yes

no]`

-c <convention>

Currently without effect. Specify a convention (reserved for future use).

-l <file>

Path to a file containing a list of input files. This list overrides any files provided as command-line arguments.

-g <file>

Path to the grid file.

-p <prefix>

Output prefix. Can be a folder path (e.g., /output/). Recommended: Use a different hard drive for filtering to improve performance.

-s <date>

Start date for filtering in dd/mm/yyyy format.

-f <date>

End date for filtering in dd/mm/yyyy format.

-v <var1> [var2 ...]

List of variables to filter.


Examples

Basic Filtering

Filter variables ssh and tem for files listed in files.list:

comodo-sfilter -l files.list -v ssh tem

Filtering with Start and End Dates

Filter variable ssh for files between 01/01/2020 and 31/12/2020:

comodo-sfilter -s 01/01/2020 -f 31/12/2020 -v ssh file1.nc file2.nc

Filtering with Control Points

Filter variable sal using a grid file and control points:

comodo-sfilter -g grid.nc --control control_points.dat -v sal file1.nc

Filtering with Output Prefix

Filter variable XE and save output to a specific directory:

comodo-sfilter -p /output/filtered/ -v XE file1.nc

Disable Nodal Corrections

Filter variable ssh without nodal corrections:

comodo-sfilter --nodal=no -v ssh file1.nc

Environment Variables

comodo-sfilter uses OpenMP (version 201511) for parallelization. The following environment variables can be used to control its behavior:

Variable

Description

OMP_NUM_THREADS

Number of threads to use.

OMP_SCHEDULE

Runtime schedule type and chunk size.

OMP_DYNAMIC

Enable or disable dynamic thread adjustment.

OMP_NESTED

Enable or disable nested parallelism.

Example:

OMP_NUM_THREADS=6 comodo-sfilter -l files.list -v ssh

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

  1. Input Files:

  • Must be comodo-compliant NetCDF files.

  • The tool processes scalar fields only.

  1. Output:

  • Filtered files are saved with the specified prefix (-p).

  • If no prefix is provided, output is saved in the current directory.

  1. 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.

  1. Control Points:

  • The control points file must be in ASCII format, with the first line specifying the number of points, followed by their coordinates (longitude latitude [layer]).

  1. Date Format:

  • Dates must be provided in dd/mm/yyyy format for -s and -f options.


See Also