comodo-compliance v3.2.3¶
Mercurial revision 5770:c90c3015e72d | 2026-05-22
Description¶
comodo-compliance is a tool to test the compliance of NetCDF files with the COMODO standards (based on CF Conventions).
It checks whether a given NetCDF file and its specified variables adhere to the expected grid and metadata structure. If the input file is a .grd file, the variable names are automatically prepended with z.
Usage¶
comodo-compliance [OPTIONS] file1 var11 [var12 ...] [file2 var21 [var22 ...] ...]
Options¶
Option |
Description |
|---|---|
|
Display this help message and exit. |
|
Enable verbose mode for detailed output. |
Examples¶
Basic Compliance Check¶
Check compliance for a single file and variable:
comodo-compliance file.nc ssh
Check Multiple Variables in One File¶
Check compliance for multiple variables in a single file:
comodo-compliance file.nc ssh tem sal
Check Multiple Files with Variables¶
Check compliance for multiple files, each with its own variables:
comodo-compliance file1.nc ssh tem file2.nc sal
Check a .grd File¶
For .grd files, the variable names are automatically prepended with z:
comodo-compliance grid.grd elevation
Note: The tool internally processes this as
z_elevation.
Verbose Mode¶
Enable verbose mode for detailed compliance reports:
comodo-compliance -v file.nc ssh
Environment Variables¶
comodo-compliance does not use any specific environment variables. However, it relies on standard system libraries for NetCDF file handling.
Notes¶
Input Files:
Must be NetCDF files (
.ncor.grd).For
.grdfiles, variable names are automatically prepended withz.
Variable Specification:
Variables must be specified after their respective file.
Example:
comodo-compliance file1.nc var1 file2.nc var2.
Error Handling:
If no file is provided, the tool displays the help message and exits.
If a variable is specified without a preceding file, the tool aborts with an error.
Correcting Files:
Use NCO (NetCDF Operators) to correct non-compliant files. For example:
Options for
ncatted:att: Attribute name.var: Variable name (useglobalfor global attributes).mode: One ofa(append),c(create),d(delete),m(modify), oro(overwrite).type: One off(float),d(double),l(long),s(short),c(char), orb(byte).-O: Overwrite the input file.