|
| NetCDFCpp () |
|
virtual | ~NetCDFCpp () |
|
virtual int | Create (string path, int cmode, size_t initialsz, size_t &bufrsizehintp) |
|
virtual int | Open (string path, int mode) |
|
virtual int | DefDim (string name, size_t len) const |
| Define a dimension.
|
|
virtual int | DefVar (string name, int xtype, vector< string > dimnames) |
| Define a variable.
|
|
virtual int | InqVarDims (string name, vector< string > &dimnames, vector< size_t > &dims) const |
| Learn the dimension names associated with a variable.
|
|
virtual int | InqDims (vector< string > &dimnames, vector< size_t > &dims) const |
| Learn the dimension names and lengths defined in a file.
|
|
virtual int | InqDimlen (string name, size_t &len) const |
| Learn the length of a named dimension.
|
|
int | InqAttnames (string varname, std::vector< string > &attnames) const |
| Learn the names of all the global or variable attributes.
|
|
int | CopyAtt (string varname_in, string attname, NetCDFCpp &ncdf_out, string varname_out) const |
|
virtual int | PutAtt (string varname, string attname, int value) const |
| Write an integer attribute.
|
|
virtual int | PutAtt (string varname, string attname, vector< int > values) const |
|
virtual int | PutAtt (string varname, string attname, const int values[], size_t n) const |
|
virtual int | GetAtt (string varname, string attname, int &value) const |
| Read an integer attribute.
|
|
virtual int | GetAtt (string varname, string attname, vector< int > &values) const |
|
virtual int | GetAtt (string varname, string attname, int values[], size_t n) const |
|
virtual int | PutAtt (string varname, string attname, size_t value) const |
|
virtual int | PutAtt (string varname, string attname, vector< size_t > values) const |
|
virtual int | PutAtt (string varname, string attname, const size_t values[], size_t n) const |
|
virtual int | GetAtt (string varname, string attname, size_t &value) const |
|
virtual int | GetAtt (string varname, string attname, vector< size_t > &values) const |
|
virtual int | GetAtt (string varname, string attname, size_t values[], size_t n) const |
|
virtual int | PutAtt (string varname, string attname, float value) const |
|
virtual int | PutAtt (string varname, string attname, vector< float > values) const |
|
virtual int | PutAtt (string varname, string attname, const float values[], size_t n) const |
|
virtual int | GetAtt (string varname, string attname, float &value) const |
|
virtual int | GetAtt (string varname, string attname, vector< float > &values) const |
|
virtual int | GetAtt (string varname, string attname, float values[], size_t n) const |
|
virtual int | PutAtt (string varname, string attname, double value) const |
|
virtual int | PutAtt (string varname, string attname, vector< double > values) const |
|
virtual int | PutAtt (string varname, string attname, const double values[], size_t n) const |
|
virtual int | GetAtt (string varname, string attname, double &value) const |
|
virtual int | GetAtt (string varname, string attname, vector< double > &values) const |
|
virtual int | GetAtt (string varname, string attname, double values[], size_t n) const |
|
virtual int | PutAtt (string varname, string attname, string value) const |
|
virtual int | PutAtt (string varname, string attname, vector< string > values) const |
|
virtual int | PutAtt (string varname, string attname, const char values[], size_t n) const |
|
virtual int | GetAtt (string varname, string attname, string &value) const |
|
virtual int | GetAtt (string varname, string attname, char values[], size_t n) const |
|
virtual int | GetAtt (string varname, string attname, vector< string > &values) const |
|
virtual int | InqVarid (string varname, int &varid) const |
| Find the NetCDF ID of a variable.
|
|
virtual int | InqAtt (string varname, string attname, nc_type &xtype, size_t &len) const |
| Return information about a NetCDF attribute.
|
|
virtual int | InqVartype (string varname, nc_type &xtype) const |
| Find a variable's external representation type.
|
|
virtual int | SetFill (int fillmode, int &old_modep) |
| Set the fill value.
|
|
virtual int | EndDef () const |
| End the metadata definition section.
|
|
virtual int | ReDef () const |
| Put open netcdf dataset into define mode.
|
|
virtual int | Close () |
| Close the currently opened file.
|
|
virtual int | PutVara (string varname, vector< size_t > start, vector< size_t > count, const void *data) |
| Write an array of values to a variable.
|
|
virtual int | PutVara (string varname, vector< size_t > start, vector< size_t > count, const float *data) |
|
virtual int | PutVara (string varname, vector< size_t > start, vector< size_t > count, const double *data) |
|
virtual int | PutVara (string varname, vector< size_t > start, vector< size_t > count, const int *data) |
|
virtual int | PutVara (string varname, vector< size_t > start, vector< size_t > count, const long *data) |
|
virtual int | PutVara (string varname, vector< size_t > start, vector< size_t > count, const unsigned char *data) |
|
virtual int | PutVar (string varname, const void *data) |
| Write an entire variable with one function call.
|
|
virtual int | PutVar (string varname, const float *data) |
|
virtual int | PutVar (string varname, const double *data) |
|
virtual int | PutVar (string varname, const int *data) |
|
virtual int | PutVar (string varname, const long *data) |
|
virtual int | PutVar (string varname, const unsigned char *data) |
|
virtual int | GetVara (string varname, vector< size_t > start, vector< size_t > count, void *data) const |
| Read an array of values from a variable.
|
|
virtual int | GetVara (string varname, vector< size_t > start, vector< size_t > count, float *data) const |
|
virtual int | GetVara (string varname, vector< size_t > start, vector< size_t > count, double *data) const |
|
virtual int | GetVara (string varname, vector< size_t > start, vector< size_t > count, int *data) const |
|
virtual int | GetVara (string varname, vector< size_t > start, vector< size_t > count, long *data) const |
|
virtual int | GetVara (string varname, vector< size_t > start, vector< size_t > count, unsigned char *data) const |
|
virtual int | GetVar (string varname, void *data) const |
| Read an entire variable with one function call.
|
|
virtual int | GetVar (string varname, float *data) const |
|
virtual int | GetVar (string varname, double *data) const |
|
virtual int | GetVar (string varname, int *data) const |
|
virtual int | GetVar (string varname, long *data) const |
|
virtual int | GetVar (string varname, unsigned char *data) const |
|
virtual int | CopyVar (string varname, NetCDFCpp &ncdf_out) const |
| Copy a variable from one file to another.
|
|
virtual bool | ValidFile (string path) |
|
virtual bool | InqDimDefined (string dimname) |
|
virtual bool | InqAttDefined (string varname, string attname) |
|
virtual int | InqVarnames (vector< string > &varnames) const |
|
int | GetNCID () const |
|
| MyBase () |
|
const string & | getClassName () const |
|
Defines simple C++ wrapper for NetCDF.
This class provdies a simple object-oriented wrapper for the NetCDF API C language binding. In most cases the member functions provided by this class are identical or near identical to the NetCDF API functions of the same name. Only when significant differences exist between the NetCDF native functions and the member functions provided herein is anything other than brief documention provided.
The ordering of dimension and coordinate parameters specified as arrays or STL vectors follows that of NetCDF: The first element is the slowest varying dimension, the second element is the next slowest, and so on.
- Note
- This ordering is the opposite of that used by the VAPoR::VDC class.
One particular difference of note: the various identifiers used by NetCDF (e.g. variable id, dimesion id, etc) are not exposed by the NetCDFCpp class methods. These objects are instead referred to by their ascii string names. Moreover, as the file access methods Open() and Create() do not return a NetCDF file identifier, only a single NetCDF file may be opened at a time (multiple NetCDF files may be opened, if needed, by instantiating multiple NetCDFCpp objects).
Unless otherwise noted the return value of any member function that returns an integer may be interpreted as status. A negative value indicates an error. Upon error an error message will be logged via Wasp::MyBase::SetErrMsg().
Definition at line 44 of file NetCDFCpp.h.