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.
Hi, Your English is great, much better than my Chinese :-). What is the value returned by nc_open when it fails? In other words, what is the value of res res = nc_open(.,write,.); // randomly fail when it is not 0? Each error return value has an error message associated with it that you can look up in netcdf.h, or you can call nc_strerror(res), as in if (res != 0) { printf("%s\n", nc_strerror(res)); } --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: GCD-783086 Department: Support netCDF Priority: Normal Status: Closed