NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

Re: [netcdfgroup] NcType problems on Ubuntu 16.04

Daniel,

I believe you're using the "new" (NetCDF4) C++ interface?

It has known problems with NcType, specifically for any types not in the
NetCDF3 data model.  I solved them by using strings instead of the symbolic
enums; some of the API functions take strings.  If I need a NcType object,
I use the following function to get one:

inline netCDF::NcType nc_type(netCDF::NcVar ncvar, std::string sntype)
    { return ncvar.getParentGroup().getType(sntype,
netCDF::NcGroup::ParentsAndCurrent);
}

-- Elizabeth