This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>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