Re: Reading HDF5 Variable [message #42499] |
Mon, 14 February 2005 13:35  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Michael Wallace wrote:
>> At the risk of starting a flame war, the netCDF interface (about 25
>> functions) seems to have been written by scientists for scientists,
>> while the HDF interface appears to have been written by programmers
>> for programmers (hundreds(?) of functions).
>
>
> The various problems with HDF are what led me to use netCDF. Not only
> are they written "by scientists for scientists" but much of the
> underpinnings of the format appear to have been written by "computer
> scientists rather than scientists." Issues with the format aside, I
> just like the fact that there are *stable, working* netCDF access
> routines in IDL, Java, C, Perl, Python, etc. In fact, whenever I have
> to work with HDF, the first thing I usually do is write a small
> conversion program that converts the file to netCDF and then I work with
> it from there. :-)
Hey - me too! Except rather than write a conversion program each time, I just pipe the
hdfdump[*] utility output into the ncgen utility to convert files I use. E.g.
hdfdump <hdfile> | ncgen -b <ncfile>
and I end up with a nice simple, useful netCDF file. :o)
paulv
[*] Earlier HDF libraries called this "ncdump" which was very annoying.
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|
Re: Reading HDF5 Variable [message #42501 is a reply to message #42499] |
Mon, 14 February 2005 13:19   |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
> At the risk of starting a flame war, the netCDF interface (about 25
> functions) seems to have been written by scientists for scientists,
> while the HDF interface appears to have been written by programmers for
> programmers (hundreds(?) of functions).
The various problems with HDF are what led me to use netCDF. Not only
are they written "by scientists for scientists" but much of the
underpinnings of the format appear to have been written by "computer
scientists rather than scientists." Issues with the format aside, I
just like the fact that there are *stable, working* netCDF access
routines in IDL, Java, C, Perl, Python, etc. In fact, whenever I have
to work with HDF, the first thing I usually do is write a small
conversion program that converts the file to netCDF and then I work with
it from there. :-)
-Mike
|
|
|
|
Re: Reading HDF5 Variable [message #42504 is a reply to message #42503] |
Mon, 14 February 2005 13:18   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Kenneth Bowman writes:
> I think the short answer is "no".
>
> At the risk of starting a flame war, the netCDF interface (about 25
> functions) seems to have been written by scientists for scientists,
> while the HDF interface appears to have been written by programmers for
> programmers (hundreds(?) of functions).
>
> Admittedly, HDF files are more flexible than netCDF files, but the user
> interface is much more complex. The HDF files that I have seen don't
> appear to use any of the features that are not in the netCDF interface.
>
> Your best bet is to find some sample code that reads your HDF files.
After I stopped panicking, I realized that the h5_browser
was written in the IDL language. 15 minutes of fooling
around with that got me what I was looking for, although
I am no further ahead with understanding the format. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|
Re: Reading HDF5 Variable [message #42598 is a reply to message #42499] |
Mon, 14 February 2005 13:40  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
> Hey - me too! Except rather than write a conversion program each time, I
> just pipe the hdfdump[*] utility output into the ncgen utility to
> convert files I use. E.g.
>
> hdfdump <hdfile> | ncgen -b <ncfile>
>
> and I end up with a nice simple, useful netCDF file. :o)
>
Cool. I tried doing this a while back but I was never successful.
Which versions of hdfdump and ncgen are you using? If I can simply do
that from the command line now, that'd be so much easier.
-Mike
|
|
|