-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetCDF: Not a valid data type or _FillValue type mismatch #929
Comments
ncdump gives me the same error (with version 4.6.3), so it's definitely not an issue with netcdf4-python. |
Seems to be an issue with the opendap server configuration - if I download the netcdf file to disk I can open it and read the data just fine. |
Closing this - if it does turn out to be a netcdf4-python issue feel free to reopen. |
@lesserwhirls I’ve seen this before but can’t recall the issue or fix. I believe it was a THREDDS thing. Anything seem familiar? |
If I recall, the issue was that netCDF-C started being strict about |
Thanks! @rabernat can you try with an updated libnetcdf? |
Unfortunately trying to update libnetcdf gets me into dependency probems with gdal / rasterio
So it looks like I can't upgrate netcdf without breaking rasterio / gdal. Unfortunately I will not have time to try to resolve this soon. |
I can reproduce this problem with updated netcdf libs:
I can work around it in netcdf4 by the prepending the URL with the '[FillMismatch]' kludge: import netCDF4
url = 'http://gliders.ioos.us/thredds/dodsC/deployments/drudnick/sp062-20190201T1350/sp062-20190201T1350.nc3.nc'
netCDF4.Dataset('[FillMismatch]'+url)
<class 'netCDF4._netCDF4.Dataset'>
root group (NETCDF3_CLASSIC data model, file format DAP2):
acknowledgment: This deployment supported by NOAA.
cdm_data_type: TrajectoryProfile
... but this doesn't work in xarray: import xarray as xr
xr.open_dataset('[FillMismatch]'+url)
FileNotFoundError: [Errno 2] No such file or directory: b'/home/jovyan/hurricane-ike-water-levels/[FillMismatch]http:/gliders.ioos.us/thredds/dodsC/deployments/drudnick/sp062-20190201T1350/sp062-20190201T1350.nc3.nc' because xarray (not too surprisingly) thinks it's a local file. |
Ran into the same problem here with with libnetcdf version 4.7.1 and netcdf4 version 1.5.3. Appending import xarray as xr
url = 'http://gliders.ioos.us/thredds/dodsC/deployments/drudnick/sp062-20190201T1350/sp062-20190201T1350.nc3.nc'
ds = xr.open_dataset(url+'#fillmismatch') |
I am having trouble opening a dataset from a thredds opendap server. I am raising the issue here, well aware that this issue may belong elsewhere. But this has been a useful place to start.
The data is from the OOI gliders DAC: https://gliders.ioos.us/data/
Here is the opendap file:
https://gliders.ioos.us/thredds/dodsC/deployments/drudnick/sp062-20190201T1350/sp062-20190201T1350.nc3.nc.html
gives
Is this a problem with the dataset? If so, the entirety of the OOI glider data is incompatible with the netCDF C library.
netcdf4 lib version: '4.6.2 of Dec 17 2018 19:36:03 $'
netcdf4-python version: '1.5.0.1'
cc @kwilcox, @rsignell-usgs
The text was updated successfully, but these errors were encountered: