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.
John, >Date: Mon, 13 Oct 1997 16:26:18 -0700 (PDT) >From: "John R. Tannahill" <address@hidden> >Organization: Lawrence Livermore National Laboratory >To: address@hidden >Subject: netcdf 3.3.1 >Keywords: 199710132326.RAA15105 In the above message, you wrote: > I am running a fortran code on an sgi origin multiprocessing machine, where > uname -a gives: IRIX64 turing 6.4-root-1263875500 06162259 IP27. I just > installed version 3.3.1 of netcdf. I have a chunk of code as follows: > > call Ncop_Rd (ncid_co, const_infile_name) > > call Ncinq (ncid_co, ndims, nvars, natts, recdim, ierr) > > if (recdim .eq. -1) then > has_rec_dim = .false. > else > has_rec_dim = .true. > end if > > It appears that zero is being returned when there is no unlimited dimension. > I changed the first line of the if test to: > > if ((recdim .eq. -1) .or. (recdim .eq. 0)) then, > > and things work fine. The version 3 netcdf documentation says that it should > return a -1. Is this a known bug? That bug wasn't known at all. Thanks for reporting it. I'll fix it and incorporate the fix in the next release. In the meantime, I suggest that you code as follows: if (recdim .lt. 1) then This will work regardless of the bug. -------- Steve Emmerson <http://www.unidata.ucar.edu>