-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Save YAXArray or Dataset into a Zarr group #348
Comments
isn't this case already. You can always pass bunch of YAXArrays of different dimensions into a dataset that can be saved as a |
Datasets are to store multiple variables sampled over the same grid defined by their shared axes. However, the e.g. spatial axes of different resolutions are not the same. Trying this: using YAXArrays
using Zarr
high_res_cube = YAXArray(rand(10, 10, 3))
low_res_cube = YAXArray(rand(5, 5, 3))
ds = Dataset(high_res = high_res_cube, low_res = low_res_cube)
savedataset(ds; path = "foo.zarr", driver=:zarr) also returns an error when it comes to saving the dataset on disk:
|
Multiple Datasets in the Common Data Model V4 can be stored in the same file.
Hereby, they are organized in (nested) groups, analog to files in directories and subdirectories.
For example,
xarray.Dataset.to_zarr
has the optiongroup
to specify the path inside the zarr storage in which the dataset should be stored.Similarily,
zarr.hierarchy.group
has the optionpath
to specify the (group) path. The prototype (and part of xarray roadmap) xarray-datatree uses this to represent a tree of Datasets as its own type. I think it is already implemented in Zarr.jl function Zarr.zcreate in optionname
.This is of particular importance when it comes to store data cubes of different spatio-temporal resolutions in the same store. I'd be great to have an additional
group
option to the functionsavedataset
andsavecube
.The text was updated successfully, but these errors were encountered: