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.
>Keywords: 199412151547.AA12407 netCDF ncvarid Hi Bernward, > I found a little bug in ncvarid: > > If the netCDF file only contains global attributes, but no variables, > ncvarid don't give an error message. The return status -1 is correct. > > This is caused by the following code in var.c (function ncvarid): > > if(handle->vars == NULL) > return(-1) ; > > > If a program checks the return code, this doesn't matter, but if a > program uses ncopts=NC_FATAL;, it will not be aborted. Thanks for reporting this. We'll fix it in the next release. -- Russ Rew UCAR Unidata Program address@hidden P.O. Box 3000 http://www.unidata.ucar.edu/ Boulder, CO 80307-3000