Hi, when opening a netcdf-file with the (old) cpp interface of netcdf, e.g. new NcFile(filename, NcFile::ReadOnly) it is not possible to catch any error, e.g. "No such file or directory". The problem is that NcFile::NcFile internally sets NcError err(NcError::silent_nonfatal); // constructor must not failbut when the NcFile constructor finishes, the destructor of NcError is called, which will reset the NcError.
Heiko
netcdfgroup
archives: