-
Notifications
You must be signed in to change notification settings - Fork 82
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
Represent (coordinate) variables "symbolically" #361
Comments
This is certainly something that kerchunk could do, with effectively our own codec to expand whatever representation into an array at read time. That would be simple for linear coordinates, but GRIB allows for many complex coordinate definitions. I suppose it's possible to extract the parameters of whatever the coordinate system is, but we probably don't want to implement the coordinate generation algorithms, but call the appropriate functions in eccodes itself, if we can. This all connects to the possibility of analytical coordinates in xarray. Perhaps we shouldn't be making arrays even at read time but making xarray indexes. |
There's a CF convention for that! We could totally interpret those as a "functional xarray index" too. |
(plus also the FITS WCS ways to define the same; you won't get these from geo-datasets, but I think they may be more general) |
People on this thread might be interested in the intake-stac sprint intake/intake-stac#159 |
Thanks @dcherian. IIUC, the coordinate subsampling you linked to is essentially the same as Do you know if this decoding is implemented in |
It has not been implemented. |
Yes I think so, that's why it clicked in my head. I don't know what you would do for all the other GRIB coordinate systems |
This is also essentially the case in standard TIFF, but of course more complex geometries are possible in practice, and GRIB has many models. |
This seems somewhat similar to my |
I'm working with a GRIB2 file, and am interested in minimizing the size of the references file. Currently, the largest values in the references come from the base64-encoded coordinates that were inlined in the references:
This specific variable (and longitude,
step
, and perhapstime
) can be represented "symbolically" (maybe not the right name), with something like arange(90, -90.1, -0.4)
.My questions:
Somewhat annoyingly, there are floating point inaccuracies between what I get from
np.arange
and what's coming out of cfgrib. But hopefully those can be solved.The text was updated successfully, but these errors were encountered: