Skip to content

Conversation

@abkfenris
Copy link

A very initial pass at implementing some ACDD checks using XRLint.

I chatted with @ocefpaf about XRLint and it sounded like there may have already been interest in using it in the compliance checker.

So far I’ve implemented checks for the existence of all the highly/reccomended/suggested attributes defined in the existing acdd check suite, and included the descriptions as suggestions on failures.

I’ve also implemented the global 1.3 specific attribute checks, such as if datasets contain the correct convention, the dates are ISO format, the metadata link is http, and that there are no blanks in the ID.

A pass at implementing ACDD attribute and conventions checks using XRLint.
Adds XRLint rules for unique ACDD 1.3 global metadata.
@ocefpaf
Copy link
Member

ocefpaf commented Aug 28, 2025

This is awesome! There are many advantages for us to slowly move to an xarray data model vs raw netCDF.Dataset:

  • lightweight installs: xarray datasets can have a variety of backends, netcdf files included, and many are non-compiled code;
  • take advantage of xarray's optimizations: dask, etc;
  • reduce the code complexity in the long run.

I believe that our main challenge will be CF. We can probably start with a subset of the latest CF version. IMO it is not worth implement all past versions as they'll be legacy and supported by previous cc code.

@abkfenris
Copy link
Author

Well, I did start with ACDD for something simpler to get started with.

From a quick poke around the CF checks, while they're definitely more complex, but since they build upon each other, older versions are just smaller subsets of rules (with some updated for new values, similar to how I've done the attribute checks here), so I think that would make it relatively easy to support different versions by starting at the base and creating rule sets/plugin configs along the way.

@abkfenris
Copy link
Author

Unless there are any objections, I'm going to try to upstream at least ACDD and CF test suites to XRLint.

@abkfenris
Copy link
Author

Oh, I made an upstream PR, but I haven't gotten any feedback yet, so I'll probably come back and try to work on them here for now

@forman
Copy link

forman commented Nov 19, 2025

Oh, I made an upstream PR, but I haven't gotten any feedback yet, so I'll probably come back and try to work on them here for now

@abkfenris I will take care of that asap, latest in December - if this would still help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants