You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, if I open a heterogeneous grib file uisng xarray, I have to filter for appropriate dataset by providing appropriate filter_by_keys . However this doesnot always work and in my case for data = xr.open_dataset(filein, engine='cfgrib', backend_kwargs={'indexpath': 'temp/{short_hash}.idx', 'filter_by_keys':{'typeOfLevel':'hybrid'}}) I got an error
This was happening because my gribfile had two dataset on hybrid levels. One of 60 Hybrid levels and another on 1 hybrid levels.
Describe the solution you'd like
If I open the same data with data = cfgrib.open_datasets(filein, indexpath='temp/{short_hash}.idx') , it returns me a list of xarray datasets nicely groped.
data[1]
<xarray.Dataset>
Dimensions: (values: 348528)
Coordinates:
time datetime64[ns] 2007-09-12
step timedelta64[ns] 06:00:00
hybrid float64 1.0
latitude (values) float64 ...
longitude (values) float64 ...
valid_time datetime64[ns] ...
Dimensions without coordinates: values
Data variables:
lnsp (values) float32 ...
Attributes:
GRIB_edition: 2
GRIB_centre: ecmf
GRIB_centreDescription: European Centre for Medium-Range Weather Forecasts
GRIB_subCentre: 0
Conventions: CF-1.7
institution: European Centre for Medium-Range Weather Forecasts
Can we implement similar behaviour with xarray such that the user could select which data group she/he wants to load just by providing the index similar to index of list returned by cfgrib.open_datasets
Describe alternatives you've considered
No response
Additional context
No response
Organisation
EUMETSAT
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, if I open a heterogeneous grib file uisng xarray, I have to filter for appropriate dataset by providing appropriate
filter_by_keys
. However this doesnot always work and in my case fordata = xr.open_dataset(filein, engine='cfgrib', backend_kwargs={'indexpath': 'temp/{short_hash}.idx', 'filter_by_keys':{'typeOfLevel':'hybrid'}})
I got an errorThis was happening because my gribfile had two dataset on hybrid levels. One of 60 Hybrid levels and another on 1 hybrid levels.
Describe the solution you'd like
If I open the same data with
data = cfgrib.open_datasets(filein, indexpath='temp/{short_hash}.idx')
, it returns me a list of xarray datasets nicely groped.Can we implement similar behaviour with xarray such that the user could select which data group she/he wants to load just by providing the index similar to index of list returned by
cfgrib.open_datasets
Describe alternatives you've considered
No response
Additional context
No response
Organisation
EUMETSAT
The text was updated successfully, but these errors were encountered: