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.
> From: Jessica Burkhart <address@hidden> > To: address@hidden > Subject: Problem with ncopen > Organization: Oklahoma Climate Survey Hi Jessica, > I am having a problem with ncopen repeatedly returning 0 as a valid > file id. The other netCDF functions, ncclose and ncdimid, return > bad id error codes with a netCDF file id of 0. > > I'd appreciate any suggestions. There was a bug in some previous netCDF version, maybe 2.4.2 or 2.4.3, with ncopen returning 0 instead of -1 when it tried to open a file that didn't exist or for which access permissions weren't valid for the requested access. If you could tell me the version of netCDF you are using and the platform (OS, hardware) on which you see the above error, we could be of more help, but for now I can only suggest that you install the current version of netCDF, available in source form from ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.Z We also have binary versions available for some platforms, if it's inconvenient to compile a new version. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu