Description
For xcube datasets, coordinate values should be monotonic and unique. This is important because xarray can only create efficient indexes when coordinate labels are well ordered and non-duplicated. It also helps ensure that multi-dimensional tile fetching works reliably.
At the moment, xrlint has an xcube/increasing-time rule that checks the time coordinate specifically. This issue proposes to add a more general xcube rule for all relevant one-dimensional coordinate variables.
Proposed rule
Add a new xcube rule, for example:
xcube/monotonic-unique-coords
The rule should check coordinate variables where:
coord.name in dataset.coords
coord.dims == (coord.name,)
For each such coordinate, values should be:
- monotonic, either strictly increasing or strictly decreasing
- unique, with no duplicate coordinate labels
Description
For xcube datasets, coordinate values should be monotonic and unique. This is important because xarray can only create efficient indexes when coordinate labels are well ordered and non-duplicated. It also helps ensure that multi-dimensional tile fetching works reliably.
At the moment, xrlint has an xcube/increasing-time rule that checks the time coordinate specifically. This issue proposes to add a more general xcube rule for all relevant one-dimensional coordinate variables.
Proposed rule
Add a new xcube rule, for example:
xcube/monotonic-unique-coordsThe rule should check coordinate variables where:
For each such coordinate, values should be: