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.
Leigh, > Just a quick follow up. We went ahead and downloaded netCDF version > 3.3 so that I can get access to the file descriptor of an open > netCDF data file using NcFile::id(). When I compile software here at > FSL on HPUX 10.20, I get several warning messages. Also, I get an error > message that a put()/get() call can't resolve the long data type. The > compiler error message shows that there is a "nclong" type, but I don't > see a long type. So my questions for you are: > > 1. Is there a document that shows what compiler switches should be set > to compile programs using netCDF ver. 3.3 using various computer > architectures (ours in particular HPUX version 10.20). These compiler > switches may quiet down a lot of the warning messages that show up > under 10.20. Yes, we will have that platform covered when we release the next minor version, but for now, check out http://www.unidata.ucar.edu/packages/netcdf/other-builds.html#hpux-10 We didn't have an HPUX 10 to test on when we released the last version. > 2. I don't see an overloaded version of the NcVar::put() or get() > functions that understand the long data type. I do, however, see that > there is an "nclong" data type. If I want to "put()" a long data value > do I have to cast it to a "nclong" in order to put() it? Maybe this > information (and more) is available in some netCDF version 3.3 document > somewhere. If so, could you direct me to one? If by "long" data value, you mean a 64-bit integer, there is no way to do this in netCDF, because it only supports 8-, 16-, and 32-bit integers (because it's based on XDR, and that's all XDR had). If a "long" on your HP is a 32-bit integer (I'm almost sure it is, but can't check right now), then I'm afraid you have to cast to "nclong", an artifact left-over from netCDF-2 that was a typedef for "int" on most platforms. We haven't been working on the C++ interface lately, but have been putting our efforts into a good Java interface instead, so the C++ is beginning to creak a bit. It really should have interfaces overloaded for both int and long instead of nclong. --Russ