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.
Hi Mary, Sorry it has taken so long to respond to your question ... > A user gave me a NetCDF 4 classic file that he created using NetCDF > 4.1.1/HDF5 1.8.4-patch1 on a little endian machine. > > He tried to open it with a version of NCL that had been linked against NetCDF > 4.0.1 and HDF5 1.8.2, and got the following error: > > fatal:Can't open HDF5 attribute > > I saw this same problem using "ncdump" from NetCDF 4.0.1/HDF 1.8.2: > > % ncdump slp.nc4Classic.1979.nc > ncdump: slp.nc4Classic.1979.nc: Can't open HDF5 attribute > > > If I use ncdump or ncl that was compiled against NetCDF 4.1.1 and > HDF5-1.8.4-patch1, it works fine. > > Is this related to the fix that went into HDF5 1.8.4-patch1? There are more > than 10 attributes attached to one > of the variables, but I thought the bug only applied to files that were > written on a big endian machine. I'm assuming the errors occurred on a big-endian machine. You're right that the original report on the bug at http://www.hdfgroup.org/HDF5/release/known_problems/index.html says it only occurs for files written on big-endian platforms and read on little-endian platforms. I thought we had tested that things work OK in the other direction. But I just succeeded in duplicating the problem you report, creating a simple file with a variable having 10 attributes on a big-endian platform using 4.1.1 and running a 4.0.1 version of ncdump built on a little-endian platform on that simple file, resulting in a segmentation violation in an HDF5 function called from nc_open(). We will investigate further. Thanks for reporting the problem! --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: PEN-204681 Department: Support netCDF Priority: Urgent Status: Closed