[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NJD-981847]: Opening HDF5 file and version check

Hi Evan,

> I have attached to this email an HDF5 file I am trying to read using the
> NetCDF package. I receive a message stating "Can't open HDF5 attribute"
> when I attempt to run ncdump on the file.
> 1. Can you advise the best way to read this HDF5 file?
> 2. How can I check which version of NetCDF is installed on the
> university server?

Unless it's a very old version of netCDF, the last line of output from
this command will print the version:

  ncdump --version

One way to read the HDF5 file is to use h5dump instead of ncdump,
where h5dump is an HDF5 utility in the bin/ directory of wherever you
installed HDF5.  h5dump has lots of options, like ncdump, for printing
only selected information, see the documentation here:


There are several possible reasons ncdump can't read the file.  Here's
an FAQ answer that lists some things in HDF5 files that make them
unreadable to netCDF programs:

  How can I convert HDF5 files into netCDF-4 files?

But when I used h5dump to look at the file you sent, I didn't spot any
of the features of the HDF5 data model not supported in the netCDF-4
data model listed in the above answer.

Another possibility is that you have run into an HDF5 bug described
under "HDF5 known problems" here, under the heading "Corruption
Problem In HDF5 1.8.0 through HDF5 1.8.4":


The group named "how" had more than 8 attributes attached to it, so
that's one of the 4 circumstances required for that bug.

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu

Ticket Details
Ticket ID: NJD-981847
Department: Support netCDF
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.