-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Is your feature request related to a problem? Please describe.
xcube dataset specification is too strict as it limits the capabilities of xcube in general. For example, in order to support datasets using some other spatial CRS than EPSG:4326
(#112) we must encode the CRS in non-cube variables if we want to adhere to CF conventions.
Describe the solution you'd like
- To be CF-conformant, we need to use a grid mapping variable for any CRS that is not WGS-84. Therefore a data cube may allow for any other variables than variables with dimensions (time, ..., y, x).
- We define an xcube data cube as set of ND-images: image stacks, e.g. datasets with variables with dimensions ([time], …, y, x) where x, y are the dimensions of spatial coordinate variables according to the grid mapping used.
- Spatial coordinate variable and dimension names may be any. However, when xcube generates WGS-84 cubes, we should stick to “lon” and “lat” without a grid mapping variable.
IMPORTANT: The term data cube for a dataset as used throughout xcube CLI help, docstrings, documentation, notebooks is still fine, given that a subset of the dataset variables are cube-like, namely ND images.
xcube Code that used assert_cube()
so far to ensure the specifcation is met, will need to be replaced by code that is less struct. Here is a general pattern:
Before:
def some_cube_func(cube: xr.Dataset, ...):
assert_cube(cube, "cube")
return <impl using cube>
After:
def some_cube_func(cube: xr.Dataset, ...):
cube, other_vars_ds = split_cube(cube, "cube")
return merge_cube(<impl using cube>, other_vars_ds )
Note: <impl using cube>
may than want to assert an ND-images-only dataset by utilizing assert_cube()
.
- Turn the xcube dataset specifcation
- renamecubespec.md
into a conventioncubeconv.md
- rewritecubeconv.md
according to requirements given above and content of draft doc "AVL Dataset Conventions" - Find occurences of
assert_cube()
and refactor the code to accept any dataset