This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Yes, you are right. > > BTW, do you have any idea why netCDF 4.1 can generate an invalid HDF 5 > file sometimes? I have encountered this problem in my code, but I > cannot reproduce it using simpler codes. So I didn't formerly report > the bug. (My code checks the return status in every netCDF call, and > there is no complain from netCDF at all.) In the end, I get around the > problem by changing the order of defining variables. I know it is > irrelevant to this bug. Sorry about that. > > -Huaiyu > This is disturbing to me. As Russ says, the only way to get an invalid HDF5 file is to fail to close the file. That will cause the buffers to be lost and the HDF5 file will be left in an inconsistent state. But, absent that, an invalid HDF5 file would be a serious HDF5 or netCDF-4 bug (or, most likely, a bug in both, since there is supposed to be no way to produce an invalid file in HDF5.) Can you change the order of your variable definition back to what it was and see if it still produces an invalid file? Thanks, Ed Ticket Details =================== Ticket ID: RUF-772159 Department: Support netCDF Priority: High Status: Closed