Closed GoogleCodeExporter closed 8 years ago
Unfortunately, I have no idea. The close method simply calls nc_close in the
netcdf-c library. I don't know how nc_close interacts with the HDF5 library,
but it's possible not everything is cleaned up properly. I think the thing to
do is to try to replicate this in a simple C program, then report this to both
the Unidata netcdf team and the HDF5 development team.
Original comment by whitaker.jeffrey@gmail.com
on 10 Dec 2013 at 3:04
It also looks like you're using rather old versions of the netcdf and HDF5
libs. netcdf is now at 4.3.1rc4 and hdf5 at 1.8.12. Any chance you could
upgrade to see if this is a problem that has been fixed at the C level?
Original comment by whitaker.jeffrey@gmail.com
on 10 Dec 2013 at 4:47
This script works for me with netcdf 4.3.0 and hdf5 1.8.11
import netCDF4, h5py
for i in range(5):
g = netCDF4.Dataset('test%s.nc' % i,'w')
g.close()
f = h5py.File('test%s.nc' % i,'r')
f.close()
It differs from yours in that it look like you are reading a separate hdf5 file
(file.h5) presumably created by some other application. I don't know if that's
import though. Can you try this version and let us know what happens? If it
doesn't work for you, that would confirm that it's an issue that's been fixed
in the C libs.
Original comment by whitaker.jeffrey@gmail.com
on 10 Dec 2013 at 5:59
Thanks Jeff,
I will look at it first thing tomorrow morning. A colleague of mine reported
that he was not experiencing such issues on our Ubuntu Precise distributions,
that have newer versions of the netCDF and hdf5 libs.
I'll let you know asap. Hopefully this is solved by the C libraries.
Thomas
Original comment by lavergne...@gmail.com
on 10 Dec 2013 at 6:58
Jeff,
Good news. The issue seems to disappear when upgrading to our Ubuntu Precise
distro (python-2.7, hdf5-1.8.4, netcdf-4.1.1, h5py-2.2.0, python-netCDF4-1.0.7).
So it seems this is fixed somewhere in the C library.
Nothing to worry about, then ;)
Cheers, and thanks for your help.
Thomas
Original comment by lavergne...@gmail.com
on 11 Dec 2013 at 2:13
Glad to hear it. Closing...
Original comment by whitaker.jeffrey@gmail.com
on 11 Dec 2013 at 3:28
Original issue reported on code.google.com by
lavergne...@gmail.com
on 10 Dec 2013 at 9:56