Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add support to write a `xarray.Dataset` to a GRIB file. #18
Due to the fact that the NetCDF data model is much more free and extensible than the GRIB one, it is not possible to write a generic
In particular the only coordinates that we target at the moment are the one returned by opening a GRIB with the
Note that all passed
Some of the keys are autodetected from the coordinates, namely:
I get a problem with this GRIB file "User_Guide_Example_Data.grib". It contains 3 vertical levels, each at 2 forecast steps, and when I read it, convert to xarray, then write back to GRIB, all the values are NaN. If I filter just a single step, then it works perfectly - the only differences are those you would expect when converting from GRIB 1 to GRIB 2, e.g. bounding box coords in microdegrees instead of millidegrees, etc.
And the data is attached.
@iainrussell that's an interesting GRIB file:
It contains a 48h forecast and the analysis for the date 1996-04-28T12:00:00.
The GRIB file is not a complete hypercube so cfgrib correctly fills the missing fields with
The problem is that
Now the saved GRIB looks like this:
Note that right now
Doing an operation on the resulting
We consider write support in Alpha