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

Re: 980512: HDF2NetCDF



>To: address@hidden
>From: "Joaquin A. Tri anes" <address@hidden>
>Subject: HDF2NetCDF
>Organization: Dept. of Electronics and Computer Sciences, Campus 
>Universitario, Spain
>Keywords: 199805121143.FAA22045

Hi Joaquin,

> I'm interested in converting HDF data to NetCDF. PLease, could you let
> me know if is this possible?

It might not be possible to convert *general* HDF data to netCDF data,
because the data models are not the same.  For example, if the HDF data
made extensive use of "vdata" and "vgroup" interfaces to represent
hierarchical data structures such as trees, the netCDF representation in
terms of multidimensional variables would require some extra conventions
that would not be handled by any conversions program I know about.

However, one possibility is DDI, a package from LLNL that's freely available
and described at

  http://www-pcmdi.llnl.gov/software/ddi/

It claims to be able to read and write HDF and netCDF, but we haven't
ever installed it here to try it.

Another possibility is to use NCL (NCAR Command Language, see
<http://ngwww.ucar.edu/future/ng4.1/>) to read in HDF data and then
write it out in netCDF form, as long as it conforms to the netCDF data
model.

Also, the HDF 4.x (I think the latest is 4.1 release 2) library does
contain support for reading data with the netCDF-2 interfaces from
netCDF files in the Unidata file format and for reading and writing
through the netCDF-2 interfaces in the HDF format.  So it might be
practical to create a program that reads an HDF file using an HDF
interface and writes the data in an HDF-encoded netCDF file using the
netCDF-2 interfaces in HDF.  The resulting file would be an HDF file,
but one you could still access data from it using netCDF-2 interfaces.

Now that I read it, that sounds pretty complicated ...

Anyway, good luck, and please let us know if any of these suggestions
work for you ...

--Russ

_____________________________________________________________________

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