Re: C++ interface to netCDF?

Hi Nick,

> Our group plans to use netCDF to store data from simulations. We are in
> the midst of writing the simulation code, in C++, and the intention is to
> incorporate the facility to output data in netCDF format early on, making
> it part of the overall design rather than something to be added on at the
> end. The question is, how advisable is it to use the C++ interface rather
> than the C one? The C++ interface looks a lot nicer to use, and obviously
> would fit in better with our object-oriented code, but it said in the
> documentation somewhere that the C++ interface is "less mature" than the C
> one. Does that mean that it is not being maintained? The other issue was
> that we use Windows NT, but there was no binary available to download for
> NT. There was even a note saying that it had never been compiled for NT.
> Is this still true?

The C++ interface is still being maintained in the sense that we fix
bugs that are reported and make sure our simple C++ test works on new
platforms.  The C++ interface is just a thin layer on top of the C
interface, so it benefits from the maturity of the C software.
However, we're not actively developing or enhancing the C++ interface,
though it could use some updating with use of templates and exceptions.
It's still not as widely used as the C and Fortran interfaces, and no
extensive test set has been developed for it.

Our plans had been to use what we learned in developing the Java
interface to write a new C++ implementation that did not depend on the
C library and that could access either the current format or a new
format based on HDF-5 from NCSA.  We've had to scale back these plans
for the time being, due to lack of resources.

The current netCDF 3.4 version compiles on Windows NT using the Visual
C++ compiler; there are a couple of warnings that can be ignored:

  http://www.unidata.ucar.edu/packages/netcdf/known_problems.html#nc_test

The current beta release of netCDF version 3.5 compiles on Windows
NT using the Visual C++ compiler.  You can get the beta release
sources from

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-3.5-beta2.ZIP

and use the Makefiles available from

  ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/win32/netcdf-3.5.win32make.ZIP

or just get the binary for Windows NT from 

  ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/win32/netcdf-3.5.win32bin.ZIP

Note that we only got the static version of the C++ library to work
(in lib/netcdfpps.lib).  If you need DLL version, perhaps you can get
that to work and tell us how you did it.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu


  • 1999 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: