[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:

  http://www.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Dump

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?
  http://www.unidata.ucar.edu/netcdf/docs/faq.html#fv15

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":

 http://www.hdfgroup.org/HDF5/release/known_problems/index.html

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

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