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

Re: Problem with updating netCDF attribute values



On Mon, 24 Oct 1994, Don Hooper wrote:

> Date: Mon, 24 Oct 1994 14:41:20 +0700
> From: Don Hooper <address@hidden>
> Subject: Re: Problem with updating netCDF attribute values
> 
> Hi Mitch.
> 
> I've had some difficulty setting up code samples for you that actually fail.
> >grin<
> 
> So, I've taken a different approach.  Brian Lincoln (address@hidden)
> mentioned in his "me-too" note that he had this problem starting with version
> 2.3.2.  I noticed that netcdf.h specifies a lot more flags for use with the
> ncopen call now than I remember.  Included among these is NC_HSYNC, to
> "synchronize whole header on change".  When I use this flag, my program
> doesn't need the ncsync calls anymore.
> 
> My boss and I looked at the netCDF library code some, and we noticed another
> new (to me) flag in the struct NC flags field that can be used as part of the
> mode argument to ncopen called NC_HDIRTY.  We noticed that the code handling
> ncattput calls just sets this bit in the case where the NC_HSYNC bit is not
> set.  Presumably, the change in the attribute values (header info) would get
> written to disk at some later point when other code noticed that the NC_HDIRTY
> bit was set.  We didn't look any deeper than that, but I thought it might be a
> worthwhile avenue for you folks to explore.  If these new flags came in
> between version 2.3 (when Brian said his code worked without ncsyncs) and
> version 2.3.2 (when Brian said he started to need ncsync calls), then it's a
> charming coincidence if nothing else.
> 
> -hoop
> --
> Don Hooper,   address@hidden

don,

i passed this on to russ rew, who is the main person for netcdf here.  we 
will not be working on netcdf until probably around january or february due
to the idd crunch.  as long as setting the NC_HSYNC flag is working, then
use that as a workaround for now.

mitch
_______________________________________________________________________________
Mitchell S. Baltuch                        Unidata Program Center
Software Engineer                          Univ. Corp for Atmospheric Research
address@hidden                     WWW: http://www.unidata.ucar.edu/