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

Re: C++/question



Hi Tomas,

> I was looking at the C++ netCDF interface the other day
> and checking my compiled libraries on the HP-UX platform
> when I noticed that the example.nc files, which are generated
> by the example.c and example.cc test programs in the c++
> directory of the netCDF distribution, are not identical.
> I used ncdump to look at the files and they turn out
> identical in the cdl format generated by ncdump.
> If I run ncgen on the cdl format generated by ncdump
> I get a file which is identical to the output of example.c
> and 8 bytes shorter than the output of example.cc.
> I send the two output files to you as a shell archive in a separate
> mail message (exc.nc is generated by example.c and excc.nc is written
> by example.cc) so you can have a look at this.
> 
> Is the netCDF format not uniquely determined by the cdl
> description, i.e. can there by unused parts in the netCDF
> files which make files which have different sizes look
> identical from the viewpoint of application programs
> reading them throught the netCDF interface?
> 
> This seems strange because I thought the c++ interface
> did nothing on its own and make the c-code do all the real work.

Thanks for sending this.  It's a mystery to me also, but I will have to wait
until the end of this week to look at it more carefully, You are corect that
the C++ interface is just a thin layer over the C interface, and should
produce the same file.

--Russ

______________________________________________________________________________

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