Creating xarray friendly zarr file of geospatial data
Marston opened this issue · 5 comments
I would like to read a grib file and create from the records a 5D tensor array: ('time', 'name', 'lev', 'lat', 'lon')
. I can create this easily in zarr
by creating a dataset and load it by looping over the dimension, name
. This creates a nice zarr
but xarray
cannot read it because of some missing dimension issues. I have all the metadata, I just need an example of how to write georeferenced data to zarr
.
There doesn't seem to be any docs or code in this repo. Can someone point me in the right direction?
Hi @Marston this might be useful: https://nbviewer.org/gist/rsignell-usgs/a047178ee12d44c2a7900ee86ba2fbc7
Going to CC: @lsterzinger and @rsignell-usgs
Hi @Marston, Kerchunk would be a good option I think for your usecase (this is what @briannapagan linked, though it was called fsspec_reference_maker
at the time). Some of the API has changed since, especially concerning kerchunk.combine.MultiZarrToZarr
: https://fsspec.github.io/kerchunk/tutorial.html#combine-multiple-kerchunked-datasets-into-a-single-logical-aggregate-dataset
Hi @lsterzinger and @briannapagan
Thanks for the suggestions. I'll take a look at it. It is very interesting indeed.
@Marston did you have success?
@rsignell-usgs I have was successful but not using kerchunk. I work in an agile environment and the ticket I had was completed. Nevertheless, I've flagged kerchunk as something to research.