We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The cfgrib project offers to open a GRIB file as an xarray.Dataset:
xarray.Dataset
>>> import cfgrib >>> cfgrib.open_dataset('era5-levels-members.grib') <xarray.Dataset> Dimensions: (air_pressure: 2, latitude: 61, longitude: 120, number: 10, time: 4) Coordinates: * number (number) int64 0 1 2 3 4 5 6 7 8 9 * time (time) datetime64[ns] 2017-01-01 ... 2017-01-02T12:00:00 step timedelta64[ns] ... * air_pressure (air_pressure) float64 850.0 500.0 * latitude (latitude) float64 90.0 87.0 84.0 81.0 ... -84.0 -87.0 -90.0 * longitude (longitude) float64 0.0 3.0 6.0 9.0 ... 351.0 354.0 357.0 valid_time (time) datetime64[ns] ... Data variables: z (number, time, air_pressure, latitude, longitude) float32 ... t (number, time, air_pressure, latitude, longitude) float32 ... Attributes: GRIB_edition: 1 GRIB_centre: ecmf GRIB_centreDescription: European Centre for Medium-Range Weather Forecasts GRIB_subCentre: 0 history: GRIB to CDM+CF via cfgrib-0.9.../ecCodes-2...
It would be very helpful to have a backend for it distributed with xarray to be selected via the engine keyword argument:
engine
>>> import xarray as xr >>> xr.open_dataset('era5-levels-members.grib', engine='cfgrib') <xarray.Dataset> Dimensions: (air_pressure: 2, latitude: 61, longitude: 120, number: 10, time: 4) Coordinates: * number (number) int64 0 1 2 3 4 5 6 7 8 9 * time (time) datetime64[ns] 2017-01-01 ... 2017-01-02T12:00:00 step timedelta64[ns] ... * air_pressure (air_pressure) float64 850.0 500.0 * latitude (latitude) float64 90.0 87.0 84.0 81.0 ... -84.0 -87.0 -90.0 * longitude (longitude) float64 0.0 3.0 6.0 9.0 ... 351.0 354.0 357.0 valid_time (time) datetime64[ns] ... Data variables: z (number, time, air_pressure, latitude, longitude) float32 ... t (number, time, air_pressure, latitude, longitude) float32 ... Attributes: GRIB_edition: 1 GRIB_centre: ecmf GRIB_centreDescription: European Centre for Medium-Range Weather Forecasts GRIB_subCentre: 0 history: GRIB to CDM+CF via cfgrib-0.9.../ecCodes-2...
cc @StephanSiemen @iainrussell
The text was updated successfully, but these errors were encountered:
Great! @shoyer you can close the issue as resolved for me.
Sorry, something went wrong.
Thanks @alexamici for this contribution!
No branches or pull requests
The cfgrib project offers to open a GRIB file as an
xarray.Dataset
:It would be very helpful to have a backend for it distributed with xarray to be selected via the
engine
keyword argument:cc @StephanSiemen @iainrussell
The text was updated successfully, but these errors were encountered: