[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #MFJ-124252]: NetCDF4 2 HDF5
- Subject: [netCDF #MFJ-124252]: NetCDF4 2 HDF5
- Date: Fri, 20 Mar 2009 12:56:01 -0600
Hi Paulo,
> I'92m a member of the team that made a marine numerical model called
> Mohid (http://www.mohid.com). We have follow since the early days
> the policy of writing our fields in hdf. We now write all our model
> results in hdf5.
>
> Now we want to publish via OpenDap and ncWMS our operational model
> results. One way is to develop a tool able to convert HDF5 in
> NetCDF4 following the CF convention (V1.4).
>
> However in report publish by the HDF group it is state:
>
> ?NetCDF-4 is an I/O software package that retains the original
> netCDF APIs while using HDF5 to store the data.?
That's an over-simplification. NetCDF-4 has added many functions to
the original netCDF-3 APIs to support an enhanced data model (groups,
user-defined types, additional primitive types) and
performance-related features (chunking, compression, parallel I/O,
efficient additions to data schema). NetCDF-4 supports four format
variants (classic, 64-bit offset, netCDF-4, and netCDF-4 classic
model), the latter two of which use HDF5 for a storage layer.
> My question:
>
> If NetCDF4 is build in top of HDF5 there is a more efficiency method
> to convert one format in another without developing a tool that uses
> NetCDF and HDF libs and convert one file format in another file
> format?
>
> We have done that for NetCDF3 but right now looks a little bit
> strange to maintain the same methodology if NetCDF4 understands
> somehow HDF5.
That's a good question. NetCDF-4 intentionally supports a simpler
data model than HDF5, so there are HDF5 files that cannot easily be
converted to netCDF-4. Also netCDF-4 has "shared dimensions", which
can be used to define the shape of multiple variables (netCDF
"variable = HDF5 "datasets") to indicate that they are intended to be
defined on a common grid. To implement the concept of netCDF shared
dimensions, netCDF-4 uses the new HDF5 "dimension scales" concept.
So in answer to your question, HDF5 files that use the subset of
features implemented in netCDF-4 can be accessed as netCDF-4 files
with the addition of a dimension scale for each shared dimension,
following the netCDF-4 convention for how to represent a shared
dimension as a dimension scale. This addition is fairly easy, More
details may be found here:
http://www.unidata.ucar.edu/netcdf/docs/netcdf-tutorial/Interoperability.html
However, HDF5 files that make use of "HDF5 references", user-defined
primitive types, or groups that are not organized in a strict
hierarchy require more effort to convert to netCDF_4. We may
eventually develop a tool to do this sort of conversion, but currently
no such tool exists.
--Russ
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu
Ticket Details
===================
Ticket ID: MFJ-124252
Department: Support netCDF
Priority: Normal
Status: Closed