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.
> Ed, > > With the 3.x libs I've used the classes from netcdfcpp.h and related methods > for get(), set_cur(), put() etc. > Was this on windows? If so, you must have imported those files into visual studio, correct? > Almost all our reading is done with the NcVar::get() methods. Same goes with > NcFile and NcDim methods. > > netcdf.cpp, ncvalues.cpp, netcdfcpp.h and ncvalues.h were all supplied with > the 3.x library - I've not used anything that didn't come from the libs. > These methods are much more convenient for us than directly using the C API. > > I see the same files in the 4.x sources under the cxx folder. Should I use > these versions? Will they work with the 4.x C API with HDF5 enabled? > > Thanks, > -Ajit Yes, you should use them, and yes they will with the netCDF-4/HDF5 files. But, you will not be able to access many netCDF-4 features with the cxx C++ library, because it does not handle them well. The cxx4 library is under development to address this, but is not yet complete. Thanks, Ed Ticket Details =================== Ticket ID: CYF-313110 Department: Support netCDF Priority: High Status: Closed