xcube-dev / xcube

xcube is a Python package for generating and exploiting data cubes powered by xarray, dask, and zarr.
https://xcube.readthedocs.io/
MIT License
200 stars 20 forks source link

xcube serve cannot open cube with global coverage #891

Open mdespriee opened 1 year ago

mdespriee commented 1 year ago

Describe the bug

While playing with ECMWF files, such as the ones you can get here, converted to netcdf (after some dimension renaming), I discovered that xcube serve does not manage to open the cube if it has a global coverage with a 90 to -90 latitude range.

Simply truncating it a bit (eg. x = x.sel(lat=slice(89, -89))) is a workaround.

The issue here is not that I must crop the dataset at the poles, but that xserve fails silently with it.

Additional context

xcube v1.2.0

AliceBalfanz commented 1 year ago

@mdespriee thanks for reporting! There is another workaround which does not include modifying the dataset: When using a configuration file for the server, you can pass a parameter specifying the boundingbox: BoundingBox: [-180, -90, 180, 90]

Examples are in documentaiton: https://xcube.readthedocs.io/en/latest/cli/xcube_serve.html#remotely-stored-xcube-datasets I fully agree, that 1. the server should not fail silently, and 2. actualy the global coverage should not cause any issues. I suspect some float rounding causing troubles.