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.
Aime, >Date: Tue, 11 Jun 2002 09:35:15 -0600 (MDT) >From: "Aime' Fournier" <address@hidden> >Organization: NCAR/CGD >To: Steve Emmerson <address@hidden> >Subject: Re: 20020607: There is an input or output error >Keywords: 200206072228.g57MSaJ26805 The above message contained the following: > As I indicated, I am invoking NF_STRERROR, which > returns the string value 'There is an input or > output error'. I don't know the version because > the blackforest links are opaque, but it's an OLD > version. Anyway the problem mysteriously went > away! I like those kinds of problems! > I have upgraded my error handling to > > SUBROUTINE HANDLE_ERR(STATUS) > #include "netcdf.inc" > INTEGER STATUS > IF (STATUS .NE. NF_NOERR) THEN > WRITE(*,'(A,/,''STATUS='',I,/,A)')NF_STRERROR(STATUS),STATUS, > & NF_INQ_LIBVERS() > STOP 'Stopped by HANDLE_ERR.F' > ENDIF > RETURN > END > > so I'll have the version etc. if problems recur. Excellent idea! You might add a test for STATUS being -31, which indicates a system error (i.e. not a netCDF error) and then print out the value of "errno" -- or whatever is the Fortran equivalent. Regards, Steve Emmerson <http://www.unidata.ucar.edu>