Rule Reference
This page is auto-generated from XRLint's builtin rules (python -m mkruleref
).
New rules will be added by upcoming XRLint releases.
Core Rules
access-latency
Ensure that the time it takes to open a dataset from its source does a exceed a given threshold
in seconds. The default threshold is 2.5
.
Contained in: all
- recommended
-
content-desc
A dataset should provide information about where the data came from and what has been done to it. This information is mainly for the benefit of human readers. The rule accepts the following configuration parameters:
globals
: list of names of required global attributes. Defaults to['title', 'history']
.commons
: list of names of required variable attributes that can also be defined globally. Defaults to['institution', 'source', 'references', 'comment']
.no_vars
: do not check variables at all. Defaults toFalse
.ignored_vars
: list of ignored variables (regex patterns). Defaults to['crs', 'spatial_ref']
.
Contained in: all
- recommended
-
conventions
Datasets should identify the applicable conventions using the Conventions
attribute.
The rule has an optional configuration parameter match
which is a regex pattern that the value of the Conventions
attribute must match, if any. If not provided, the rule just verifies that the attribute exists and whether it is a character string.
More...
Contained in: all
- recommended
-
coords-for-dims
Dimensions of data variables should have corresponding coordinates.
Contained in: all
- recommended
-
grid-mappings
Grid mappings, if any, shall have valid grid mapping coordinate variables. More...
Contained in: all
- recommended
-
lat-coordinate
Latitude coordinate should have standard units and standard names. More...
Contained in: all
- recommended
-
lon-coordinate
Longitude coordinate should have standard units and standard names. More...
Contained in: all
- recommended
-
no-empty-attrs
Every dataset element should have metadata that describes it.
Contained in: all
- recommended
-
no-empty-chunks
Empty chunks should not be encoded and written. The rule currently applies to Zarr format only. More...
Contained in: all
- recommended
-
time-coordinate
Time coordinates should have valid and unambiguous time units encoding. More...
Contained in: all
- recommended
-
var-desc
Check that each data variable provides an identification and description of the content. The rule can be configured by parameter attrs
which is a list of names of attributes that provides descriptive information. It defaults to ['standard_name', 'long_name']
.
More...
Contained in: all
- recommended
-
var-flags
Validate attributes 'flag_values', 'flag_masks' and 'flag_meanings' that make variables that contain flag values self describing. More...
Contained in: all
- recommended
-
var-missing-data
Checks the recommended use of missing data, i.e., coordinate variables should not define missing data, but packed data should. Notifies about the use of valid ranges to indicate missing data, which is currently not supported by xarray. More...
Contained in: all
- recommended
-
var-units
Every variable should provide a description of its units. More...
Contained in: all
- recommended
-
xcube Rules
any-spatial-data-var
A datacube should have spatial data variables. More...
Contained in: all
- recommended
-
cube-dims-order
Order of dimensions in spatio-temporal datacube variables should be [time, ..., y, x]. More...
Contained in: all
- recommended
-
data-var-colors
Spatial data variables should encode xcube color mappings in their metadata. More...
Contained in: all
- recommended
-
dataset-title
Datasets should be given a non-empty title. More...
Contained in: all
- recommended
-
grid-mapping-naming
Grid mapping variables should be called 'spatial_ref' or 'crs' for compatibility with rioxarray and other packages. More...
Contained in: all
- recommended
-
increasing-time
Time coordinate labels should be monotonically increasing. More...
Contained in: all
- recommended
-
lat-lon-naming
Latitude and longitude coordinates and dimensions should be called 'lat' and 'lon'. More...
Contained in: all
- recommended
-
ml-dataset-meta
Multi-level datasets should provide a '.zlevels' meta-info file, and if so, it should be consistent. Without the meta-info file the multi-level dataset cannot be reliably extended by new time slices as the aggregation method used for each variable must be specified. More...
Contained in: all
- recommended
-
ml-dataset-time
The time
dimension of multi-level datasets should use a chunk size of 1. This allows for faster image tile generation for visualisation.
More...
Contained in: all
- recommended
-
ml-dataset-xy
Multi-level dataset levels should provide spatial resolutions decreasing by powers of two. More...
Contained in: all
- recommended
-
no-chunked-coords
Coordinate variables should not be chunked. Can be used to identify performance issues, where chunked coordinates can cause slow opening if datasets due to the many chunk-fetching requests made to (remote) filesystems with low bandwidth. You can use the limit
parameter to specify an acceptable number of chunks. Its default is 5.
Contained in: all
- recommended
-
single-grid-mapping
A single grid mapping shall be used for all spatial data variables of a datacube. More...
Contained in: all
- recommended
-
time-naming
Time coordinate and dimension should be called 'time'. More...
Contained in: all
- recommended
-