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.
Hi Kevin, > I attended the netCDF workshop this year and really got a lot out of > it. One of the main things I wanted to bring back to NSSL was how we > might be able to incorporate the netCDF-4 read/write capabilities in our > WDSSII API which is C++ based. > > I, unfortunately, am unclear about an important issue when reviewing my > notes from the workshop. As I recall, the C++ interface lags behind > some of the other implementation, particularly in the ability to write > netCDF-4 files. I see the webpage > > <http://www.unidata.ucar.edu/software/netcdf/docs/cxx4/> that > > regarding the Appel rewrite of the interface and - as I understand it - > this is included in the Unidata distribution. When looking through the > mail archives, I found this message "[netCDF #KLN-901251]: netcdf-4 with > C++ interface in the future?" and became confused as to whether this > implementation can write netCDF-4 files that use the classic data model > format: > > "The limitation in the current implementation that needs to be > addressed before we announce the availability of this contributed > software is its inability to create netCDF classic or netCDF-4 > classic-model format files. Currently it can only create netCDF-4 > files." > > Can you confirm for me whether or not the C++ interface for netCDF-4 (v. > 4.1.1 or 4.1.2-beta) can read and write netCDF-4 files in the classic > data model? The version we are currently distributing cannot write netCDF-4 files in the classic data model, in the sense that they are not "marked" by a special internal attribute as being netCDF-4 classic files, but it can create netCDF-4 files that are otherwise classic model files. It can read all 4 kinds of netCDF files, including classic, 64-bit offset, netCDF-4, and netCDF-4 classic-model. Modifying the NcFile constructor to properly interpret the kind of file to create and pass it on to the underlying C interface should be relatively simple, but has not been done yet. If we don't have the modifications needed to do this after I return from the AGU meeting in a couple of weeks, I may dust off my rusty C++ skills and try to get it done. If you need it sooner than that, your C++ developers might be able to polish it off and contribute the changes back to us. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: KLN-901251 Department: Support netCDF Priority: Normal Status: Closed