xcube-dev / xcube-cci

An xcube plugin to allow generating data cubes from the ESA CCI Open Data Portal
MIT License
2 stars 0 forks source link

Toniof 50 support crs #51

Closed TonioF closed 3 years ago

TonioF commented 3 years ago

Solves #42 and #50 .

In addition to no longer removing an existing CRS variable from a dataset and providing the CRS information the data descriptor, this PR ensures that the coordinates are correctly set. Spatial coordinates that are not named 'lat' or 'lon' are recognized. Coordinates are no longer erroneously listed as data variables, time bounds appear in the dataset descriptor.

TonioF commented 3 years ago

May I overlooked it, but I miss a tests that verifies GridMapping.from_dataset() succeeds on the datasets provided by the xcube-cci store.

Good point, I added this test.

I wonder why you don't use GridMapping.from_dataset() to derive coordinates and CRS is a CF and xcube-compatible way. There seems to be some code duplication with xcube GridMapping code.

Because I don't yet have an xarray dataset at the time I get the crs info.