Skip to content
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

HDF Error on file write when NetCDF is installed with `pip install` #962

fmaussion opened this issue Aug 12, 2019 · 0 comments


Copy link

commented Aug 12, 2019

Note sure if this of interest to you, or if this is a problem inherent to pip wheels, but: I can't get NetCDF4 to work with pip install on a Debian machine. Writing data to a file exits with an HDF Error:

~/checkouts/ in create_gridded_ncdf_file(self, fname)
   1971         v.long_name = 'x coordinate of projection'
   1972         v.standard_name = 'projection_x_coordinate'
-> 1973         v[:] = x
   1975         v = nc.createVariable('y', 'f4', ('y',), zlib=True)

netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable.__setitem__()
netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable._put()
netCDF4/_netCDF4.pyx in netCDF4._netCDF4._ensure_nc_success()
RuntimeError: NetCDF: HDF error

As a testbed to test several configurations, I used our ReadTheDocs builds. See e.g. one that fails:

After several trial and error, I found a config that worked: pinning python to 3.5 and NetCDF4 to 1.3.1. Both on ReadTheDocs and on my local machine (relatively old Linux Mint with python 3.5), any other combination of higher python or NetCDF versions fail with the error above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.