# 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 ```bash comodo-control file1 [file2 ...] [OPTIONS] ... ``` --- ## Options | Option | Description | | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `-v [var2 ...]` | List of variables to extract. | | `-c ` | 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. | | `-l ` | Path to a file containing a list of input files. This overrides the list provided as command-line arguments. | | `-g ` | Path to the grid file. | | `-s ` | Start date for the analysis. See [Date Formats](#date-formats2). | | `-f ` | End date for the analysis. See [Date Formats](#date-formats2). | | `-o ` | Default date origin. See [Date Formats](#date-formats2). | | `-O ` | Path to the output file. If the extension is `.nc`, the output will be in NetCDF format; otherwise, it will be in ASCII format. **Default:** `control.nc`. | | `--test ` | Test mode: Extract data for specified axes and indexes. **Must be the last option if used.** | | `--split` | Split the output into multiple files (if applicable). | | `--help`, `-h` | Display help and exit. | --- (date-formats2)= ## Date Formats Supported date formats: - `yyyy/mm/dd HH:MM:SS.SSS` - `dd/mm/yyyy HH:MM:SS.SSS` - `mm/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: ```bash comodo-control input.nc -v ssh -c control_points.txt -O output.nc ``` ### **Extract Multiple Variables** Extract variables `ssh` and `temperature` from multiple files: ```bash 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`: ```bash 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: ```bash 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: ```bash 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`): ```bash comodo-control input.nc -v ssh --test time lat 0 10 ``` ### **Split Output** Split the output into multiple files (if applicable): ```bash 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 1. **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. 2. **Input Files:** - Input files must be **NetCDF files**. - The time variable must comply with **CF conventions** (if applicable). 3. **Output:** - If the output file extension is `.nc`, the output will be in **NetCDF format**. - Otherwise, the output will be in **ASCII format**. 4. **Date Handling:** - Dates are **inclusive** at the end of the range. - Ensure the date format matches one of the supported formats. 5. **Test Mode:** - The `--test` option must be the **last option** in the command if used. --- ## See Also - [CF Conventions for Time Coordinates](http://cfconventions.org/cf-conventions/cf-conventions.html#time-coordinate) - [NetCDF Documentation](https://www.unidata.ucar.edu/software/netcdf/)