-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
writing sparse to netCDF #4156
Comments
@dcherian One thing we can do is |
Yes I think we will have to "encode" to something like this example
and then write that "encoded" dataset to file. |
I have hacked something that does support the reading and writing of sparse arrays to a netcdf file, however I didn't know how and where to put this within xarray.
Has there been any progress since last year? |
There is a more standards-compliant version here:#1077 (comment) This is still blocked on choosing which CF representation to use for sparse vs which one to use for MultiIndex. |
xref this comment thread: #3213 (comment) |
Coming from #8599 To answer @dcherian
I am mostly using C00 or CSR/CSC format, but mostly COO
I did a custom workaround by simply saving coords and data in a (ndim x 1 x npoints) array (COO standard). It seems to look like the first point you mentioned in the CF convention. |
I haven't looked at this too closely but it appears that this is a way to save MultiIndexed datasets to netCDF. So we may be able to do
sparse -> multiindex -> netCDF
http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#compression-by-gathering
cc @fujiisoup
The text was updated successfully, but these errors were encountered: