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.
Pat, > cc: <address@hidden> > From: Pat Jones <address@hidden> > Subject: netCDF error code > Organization: University of California, Irvine > Keywords: 200109201746.f8KHk3107988 netCDF F90 The above message contained the following: > Hi. I'm writing with regard to a problem that I'm having using > netCDF. I'm running a very large global atmospheric dust model, and just > converted over to the netCDF Fortran 90 interface with very little > difficulty, except for the following. During run time my code quits with > an "Unknown Error". Furthermore, this happens at the netCDF call > > rcd=rcd+nf90_put_var(nc_id,var_id(1),nstep,time_cnt) > > where time_cnt is defined as > > integer time_cnt(1) > > The first three arguments seem to be OK because I've run the command with > only them, and had no trouble. The code quits, setting rcd = -40. Does the > -40 point to any sort of error in particular? I believe that -40 indicates that the coordinate array is invalid. You can obtain the actual error message via the nf90_strerror() routine. How many dimensions does the netCDF variable that you're trying to write have and is the origin-1 vector of indicial coordinates in "nstep" a valid indicial vector? > I'm running this on both an SGI 64 and Red Hat Linux 7.0 / Pentium > 3 architectures and getting the same result on both.....any insight > would be appreciated. Thanks. > Pat Jones > > ================================ > Patrick Jones > 422 Rowland Hall > Earth System Science Department > University of California, Irvine > Irvine, CA 92697 > > (949) 824-8043 > ================================ Regards, Steve Emmerson <http://www.unidata.ucar.edu>