xcube-dev / xcube-cds

An xcube plugin to generate data cubes from the Climate Data Store (CDS) API
MIT License
3 stars 1 forks source link

xcube gen ui shows end dates of 1970-01-01 for CDS Store datasets #33

Closed pont-us closed 3 years ago

pont-us commented 3 years ago

When the CDS Store is used in the xcube gen UI, the default end date for the data is set to 1970-01-01 (before the start date!). This is because, for continually updating datasets, the CDS Store gives an end date of None (= null in JSON), with the intended semantics of ‘the present’. The gen UI, on the other hand, evidently interprets this None as ‘the Unix epoch’.

This is unfortunately an undefined point in the API specification: the store conventions document currently makes no mention of how a None value in time_range should be interpreted. To fix this bug, the following steps are necessary:

  1. [x] Agree on the semantics of None values in time_range (for both start and end dates), or prohibit them entirely.
  2. [x] Document the decision in the store conventions document.
  3. [ ] Update the CDS Store, the gen UI, or both, to conform to the clarified specification.
pont-us commented 3 years ago

After discussion, it has been decided that None should be interpreted as "now", and that xcube-cds's usage is therefore correct. The generator UI should be updated accordingly. I've updated the store conventions document to make these semantics explicit and will now close this issue.