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.
>To: address@hidden >From: address@hidden (John Sheldon) >Subject: "Headers" in memory? >Organization: Geophysical Fluid Dynamics Laboratory/NOAA >Keywords: 199802130304.UAA29873 Hi John, > When I create a netCDF file, does the API keep the "header" information in > memory? I have been trying to tune an application here on our Cray T90 > that writes long files, but has a bunch of little calls for header-type > info while writing the data portion. I expected this to impact efficiency > as the system would have to go back and reload a cache page with the header > info every time I asked for something, but this doesn't seem to be > happening. (I've been using procstat and the "event" layer in the > FFIOSPEC.) Yes, opening a netCDF file causes all header information to be read into memory, so subsequent `inquire' calls are very fast and require no I/O. For once, we actually included this in the documentation, though only in the individual inquire function entries rather than in the chapter on performance, where you might expect to find it: No I/O is performed when these functions are called, since the required information is available in memory for each open netCDF dataset. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu