I'm beginning to use netCDF4 data and therefore I have downloaded xarray and also cartopy (with pip).

I have downloaded data from the climate data store and want to plot these data.

I have a notebook on which I'm working and have narrowed the problem to this :

If I run

import xarray as xr
ds = xr.open_dataset('my_path_to_cds_data.nc')

Everything's fine. But if I do :

import cartopy.crs as ccrs
import xarray as xr
ds = xr.open_dataset('my_path_to_cds_data.nc')

I get the following error :

OSError: [Errno -101] NetCDF: HDF error: b'my_path_to_cds_data.nc'

It looks kind of weird. One clue might be that I had to add the unstable ppa of ubuntugis as I'm working with rasterio.

If this kind of issue looks familiar I'd be glad to have some help !


I figured it out,

It indeed comes from the unstable version of ubuntugis, the version of cartopy from this repo does not seem to work, I removed the ppa and downgraded the libs and made a fresh install. It works right now but I can't use rasterio, I'll try to find a warkaround

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.