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.
------- Forwarded Message >From address@hidden Sat Jul 5 10:58:00 1994 Organization: MSKCC Date: 5 Jul 94 15:58:00 EST Subject: Additional function to NetCDF At MSKCC I've added another utility function to NetCDF, it called ncfileid and will return the ncid of the file if it is open, or -1 if it not open and takes as argument the full name and path of the file. This function comes in handy if separate functions need to ascertain if a file has been already opened. We are an X/Motif site and many separate modules have access to the same data files. /********************** VL - Added following function *************/ int ncfileid(char *file_name) { int id; for(id=0; id < _ncdf; id++) if( !strcmp(_cdfs[id]->path,file_name) ) return id; return -1; } Happy networking, Valerio Luccio ------- End of Forwarded Message