comodo-control v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
comodo-control extracts control-point values from NetCDF files. It allows users to extract specific data points defined by their coordinates (longitude, latitude, and optionally layer) for further analysis or validation.
Usage¶
comodo-control file1 [file2 ...] [OPTIONS] ...
Options¶
Option |
Description |
|---|---|
|
List of variables to extract. |
|
Path to the file containing control points. The file must be an ASCII file with the number of control points followed by their coordinates (longitude, latitude, [layer]). Default: Standard input. |
|
Path to a file containing a list of input files. This overrides the list provided as command-line arguments. |
|
Path to the grid file. |
|
Start date for the analysis. See Date Formats. |
|
End date for the analysis. See Date Formats. |
|
Default date origin. See Date Formats. |
|
Path to the output file. If the extension is |
|
Test mode: Extract data for specified axes and indexes. Must be the last option if used. |
|
Split the output into multiple files (if applicable). |
|
Display help and exit. |
Date Formats¶
Supported date formats:
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¶
Extract Control Points for a Single Variable¶
Extract the variable ssh (sea surface height) from a NetCDF file:
comodo-control input.nc -v ssh -c control_points.txt -O output.nc
Extract Multiple Variables¶
Extract variables ssh and temperature from multiple files:
comodo-control file1.nc file2.nc -v ssh temperature -c control_points.txt -O output.nc
Use a File List¶
Extract control points from a list of files specified in file_list.txt:
comodo-control -l file_list.txt -v ssh -c control_points.txt -O output.nc
Specify a Time Range¶
Extract control points for a specific time range:
comodo-control input.nc -v ssh -s 2000/01/01 -f 2000/12/31 -c control_points.txt -O output.nc
Output in ASCII Format¶
Extract control points and save the output in ASCII format:
comodo-control input.nc -v ssh -c control_points.txt -O output.txt
Test Mode¶
Extract data for specific axes and indexes (e.g., time and lat axes at indexes 0 and 10):
comodo-control input.nc -v ssh --test time lat 0 10
Split Output¶
Split the output into multiple files (if applicable):
comodo-control input.nc -v ssh --split -c control_points.txt -O output
Environment Variables¶
comodo-control does not directly use environment variables for its core functionality. However, if it relies on underlying libraries (e.g., NetCDF or OpenMP), refer to the documentation of those libraries for relevant environment variables.
Notes¶
Control Points File Format:
The control points file must be an ASCII file.
The first line should specify the number of control points.
Subsequent lines should list the coordinates (longitude, latitude, [layer]) for each control point.
Input Files:
Input files must be NetCDF files.
The time variable must comply with CF conventions (if applicable).
Output:
If the output file extension is
.nc, the output will be in NetCDF format.Otherwise, the output will be in ASCII format.
Date Handling:
Dates are inclusive at the end of the range.
Ensure the date format matches one of the supported formats.
Test Mode:
The
--testoption must be the last option in the command if used.