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
When a user wants to open a grib file containing multiple gribs with inconsistent values, cfgrib refuses (rightfully) to merge them, leading to an error such as:
DatasetBuildError: multiple values for unique key, try re-open the file with one of:
filter_by_keys={'dataType': 'pf'}
filter_by_keys={'dataType': 'cf'}
While this solves some issues, it is not enough when the user does not want to filter, but prefers to ignore this key. I would like to extend the filter_keys option and add a new ignore_keys option.
For a key in the list provided by the user in ignore_keys, cfgrib should force the value to None when reading these keys. And the error message above could become:
DatasetBuildError: multiple values for unique key, try re-open the file with one of:
filter_by_keys={'dataType': 'pf'}
filter_by_keys={'dataType': 'cf'}
ignore_keys=['dataType']
When a user wants to open a grib file containing multiple gribs with inconsistent values, cfgrib refuses (rightfully) to merge them, leading to an error such as:
While this solves some issues, it is not enough when the user does not want to filter, but prefers to ignore this key. I would like to extend the
filter_keys
option and add a newignore_keys
option.For a key in the list provided by the user in
ignore_keys
, cfgrib should force the value to None when reading these keys. And the error message above could become:This is related to ecmwf/climetlab#33 (and maybe others, such as #263 and #268 and https://gis.stackexchange.com/questions/372729/unable-to-read-grib-datas-with-xarray).
The text was updated successfully, but these errors were encountered: