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

Re: 970303: Resetting ncerr in NetCDF



>To: address@hidden
>From: address@hidden (Chuck Denham)
>Subject: Resetting ncerr in NetCDF
>Organization: .
>Keywords: 199703032044.NAA22552

Hi Chuck,

>         Whenever ncerr provides a negative value, is it up to me to reset
> it to zero directly, or is NetCDF supposed to do that automatically as soon
> as I make a subsequent call to a NetCDF routine?

The former, although I'm embarrassed to note that this doesn't appear to
be documented.  The intention was to mimic the behavior of the UNIX
errno global error flag, with a value that sticks unless you reset it.
If ncerr gets set to an error value, you can still make subsequent
netCDF calls successfully and the value won't be overwritten until
another error occurs.

With the new netCDF 3 pre-release, we've abandoned the use of a global
error indicator to permit use in multi-threaded applications, but still
support it in the backward-compatibility interface.

--Russ