id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 368004737,MDExOlB1bGxSZXF1ZXN0MjIxMjgyMzI0,2476,Add a GRIB backend via ECMWF cfgrib / ecCodes,226037,closed,0,,,17,2018-10-09T01:13:10Z,2018-10-25T21:10:36Z,2018-10-17T16:53:32Z,MEMBER,,0,pydata/xarray/pulls/2476,"This is currently a WIP PR for review. - [x] Addresses #2475 - only read support is proposed for now. - [x] Tests added. - [x] Documented, including `whats-new.rst` for all changes and `api.rst` for new API. The implementation depends on the python module *cfgrib* and the C-library ecCodes to be installed. Work in progress items: - [x] the coordinate rename doesn't really belong here, move it to *cfgrib*, - [x] port cfgrib backend to use the new `CachingFileManager` interface - [x] implement proper locking - [x] test *dask* support (real performance with *dask* depends on saving the external index) - ~~~the encoding options are needlessly different from the standard ones, try to sync them~~~ not urgent cc @StephanSiemen @iainrussell","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2476/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 368003448,MDU6SXNzdWUzNjgwMDM0NDg=,2475,Please add support for GRIB files via ECMWF cfgrib / ecCodes,226037,closed,0,,,2,2018-10-09T01:04:24Z,2018-10-17T17:17:36Z,2018-10-17T17:14:21Z,MEMBER,,,,"The [*cfgrib* project](https://pypi.org/project/cfgrib/) offers to open a GRIB file as an `xarray.Dataset`: ``` >>> import cfgrib >>> cfgrib.open_dataset('era5-levels-members.grib') 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: ``` >>> import xarray as xr >>> xr.open_dataset('era5-levels-members.grib', engine='cfgrib') 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","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2475/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue