If opening with xarray open_mfdataset and parallel=True it will fail unless you have previously opened it with parallel=False
See original GitHub issueMinimal repro:
import xarray as xr
ds = xr.open_mfdataset('gfs.0p25.201511*00.f0*.grib2', engine='cfgrib', combine='nested', concat_dim=['step'], parallel=True, chunks=24, backend_kwargs={'filter_by_keys': {'typeOfLevel': 'surface'}, 'indexpath': ''})
Expected result: returns xarray Actual result:
ECCODES ERROR : grib_handle_create: cannot create handle, no definitions found
ecCodes assertion failed: `h' in /home/conda/feedstock_root/build_artifacts/eccodes_1570714279314/work/src/grib_query.c:529
Note if in the same session/kernel you have previously opened with parallel=False
the above will pass. The repro needs to happen in a new session. This was executed on a local dask cluster.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:21 (3 by maintainers)
Top Results From Across the Web
xarray.open_mfdataset
Open multiple files as a single dataset. ... You only need to provide this argument if combine='nested' , and if any of the...
Read more >open_mfdataset with xarray failing to find coordinates
These netcdf files have a coordinate t that is the time stamp that I'm trying to use as a joining but I'm getting...
Read more >performance issues with open_mfdataset - Google Groups
The scenario is the following: I have a collection of large netCDF files on a ... I want to open the data as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I confirm this bug report with a different dataset and different error messages.
With
parallel=False
open_mfdataset
always work:Restarting the kernel and running with
parallel=True
always crashes python inside ecCodes but it returns a few different error messages. I observed at leat:and
It looks like a locking/threading problem, @shahramn do you have any hint?
Hi @guidocioni , I’m not sure if you’re on macos or Linux, but we’ve managed to update the conda version. Could you do the following:
conda search eccodes -c conda-forge
and if you see a 2.18.0 version with _1 at the end, install that version please. It takes the conda servers a little while to update their indexes, but it’s appeared now at least on macos.