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

Re: 970929: netCDF and HDF address@hidden



>To: address@hidden,
>To: address@hidden
>From: Chuck Divine x3887 <address@hidden>
>Subject: netCDF and HDF
>Organization: .
>Keywords: 199709291330.HAA07220
>
> Here at the NASA Center for Computational Sciences, we have the most
> recent versions of netCDF (3.3.1) and HDF (4.1) on our 3 Cray J90
> machines.  We note that HDF has the capability of reading netCDF files
> via a subset of netCDF.  It also appears that HDF is running an older
> version of netCDF.
>
> We also note some duplication of files between the two packages, at
> least in terms of names.
>
> We have essentially a single question:  is it permissible to remove
> the older netCDF binaries, includes, etc. that are part of the HDF
> package from our systems and instead use those that come with netCDF?
> Or will this cause problems with our HDF installation?
>
> Thank you for consideration of this issue.
>
> - --
> Chuck Divine

There may be as many as three packages involved:

        1) An older netcdf-2.4.x package from Unidata.
        2) The netcdf-3.3.1 package you mention.
        3) The netcdf support in HDF 4.

All three packages provide what we can refer to as the netcdf-2 programmers
interface. The interface is declared in netcdf.h and generally provided by
libnetcdf.a. I think all three provide the utilities ncdump and ncgen.

In regard to netcdf-2 versus netcdf-3, netcdf-2 can be completely replaced by
netcdf-3; netcdf-3 is backward compatible with netcdf-2.
See http://www.unidata.ucar.edu/packages/netcdf/release-notes-3.3.html
Because of changes in the definitions of some macros in netcdf.h,
C modules which include netcdf.h or FORTRAN modules which include netcdf.inc
will need to be recompiled as well as re-linked to use the new version of the
library. There are performance advantages to use of netcdf-3, especially on
CRAY machines.

The netcdf support in HDF 4 allows programmers to read some HDF
formatted data sets using the netcdf-2 programmer's interface.
I *think* (confirm this with the HDF people) the implementation provided in
the HDF package uses a different library name.

I also think the HDF library uses libnetcdf.a to allow programmers to read
netcdf formatted files with HDF calls, but again, you will need to confirm
this with the HDF folks. If this is the case, it should be possible to use the
netcdf-3 library and include system to provide that functionality.
Because the netcdf _interface_ support in HDF presents only netcdf-2 functions,
there may be some release engineering work involved to present the correct
include file to the correct modules. This isn't very hard, but I don't think
it would have been done yet.

Hope this helps.

-glenn