Ouranosinc / xclim

Library of derived climate variables, ie climate indicators, based on xarray.
https://xclim.readthedocs.io/en/stable/
Apache License 2.0
333 stars 59 forks source link

Implement Checking for CF-Compliance #24

Closed Zeitsperre closed 6 years ago

Zeitsperre commented 6 years ago

I think the most we can hope for is to include warnings for certain issues (variable names, time series lengths, averaging periods). Until all climate researchers get onto the same page with regards to CF-compliance, I think that's the best we can do.

Were we thinking of using this NOAA library https://github.com/cedadev/cf-checker/tree/3.1.0?

cehbrecht commented 6 years ago

I'm using the IOOS Compliance Checker: https://github.com/ioos/compliance-checker

CEDA has also started to use and extend it for our needs in climate data checking in various projects: https://github.com/cedadev/compliance-check-lib

huard commented 6 years ago

@cehbrecht Could you comment on differences between IOOS and cf-checker and why you choose the former ?

cehbrecht commented 6 years ago

@huard I have added the different compliance checkers to hummingbird. The IOOS checker has a clear design and is extendable. It has the potential to become a community tool for various compliance checks. Projects differ in the required checks but the main frame to run these checks is usually the same (like unit-tests).

The other tools are more "single person" implementations and it is harder to extend them. That does not say anything about the results they produce :)

huard commented 6 years ago

Thanks ! Trevor, here is my thinking:

  1. This is probably a low priority item.
  2. We have to think about the role cf-compliance should play in the package. Is it to inform users that their inputs are non-compliant ? As long as it does not affect the output's validity, I'm not sure this has a lot of added value. Is it to check the outputs are compliant ? I think this could be valuable, but it may not have to be integrated into xclim per say. Maybe just a tutorial on how to do this on the created output would do the job.