[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 950717: appending to a netCDF using C++ interface
- Subject: Re: 950717: appending to a netCDF using C++ interface
- Date: Mon, 17 Jul 1995 16:18:32 -0600
>From: address@hidden (Vivian Chao)
>Organization: NOAA
>Keywords: 199507172124.AA11095 netCDF C++
Hi Vivian,
> Question: How does one append data to an existing netcdf file using the c++
> interface? We get data periodically, so it must be stored periodically.
> I have tried to use set_cur() to move to the end of the file, but
> this causes the last existing record to be overwritten. Is there another
> function that will put the cursor beyond the last record? We have considered
> various hacks around this problem: 1) write one extra dummy record at the
> end of the file 2) Reading the last record (hopefully, this advances the
> cursor)and writing the new records
> 3) Reading and rewriting the last record plus the new ones and
> 4) Reading and rewriting all the old records
> plus the new ones. All of these seem to be fairly ugly solutions.
This bug in the C++ interface was fixed by the patch number 4 for netCDF
2.3.2. You can obtain this patch from
ftp://ftp.unidata.ucar.edu/pub/netcdf/2.3.2-patch4
or you can get an already-patched version of the whole source distribution
from
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-232pl4.tar.Z
______________________________________________________________________________
Russ Rew UCAR Unidata Program
address@hidden http://www.unidata.ucar.edu