[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 970331: netCDF Q
- Subject: Re: 970331: netCDF Q
- Date: Mon, 31 Mar 1997 12:24:26 -0700
>To: address@hidden
>From: address@hidden (Chris Webster)
>Subject: netCDF Q
>Organization: .
>Keywords: 199703311747.KAA01343
Hi Chris,
> I have a real-time netCDF question.
>
> I have a process that is writing a netCDF record (ncrecput) once a second
> followed by a ncsync(). I then have a second process sitting in a while loop
> performing a ncdiminq(ncid, recDim, NULL, &nRecords). Problem is, nRecords
> never changes. I can Ctrl-C the read program and restart it, and get's a
> new value for nRecords but never updates beyond the first read. Any
> insight?
Your second process also needs to call ncsync() in order to see the new
value of nRecords; otherwise it is just using a cached in-memory value
that never gets changed by the writing process.
The ncsync() section in the User's Guide mentions this:
... A process that is reading a netCDF file that another process is
writing can also call ncsync ... to get updated with the changes
made by the writing process (e.g. the number of records written),
without having to close and reopen the file.
--Russ