55 virtual int Create(
string path,
int cmode,
size_t initialsz,
size_t &bufrsizehintp);
62 virtual int Open(
string path,
int mode);
65 virtual int DefDim(
string name,
size_t len)
const;
68 virtual int DefVar(
string name,
int xtype, vector<string> dimnames);
71 virtual int InqVarDims(
string name, vector<string> &dimnames, vector<size_t> &dims)
const;
75 virtual int InqDims(vector<string> &dimnames, vector<size_t> &dims)
const;
78 virtual int InqDimlen(
string name,
size_t &len)
const;
82 int InqAttnames(
string varname, std::vector<string> &attnames)
const;
95 int CopyAtt(
string varname_in,
string attname,
NetCDFCpp &ncdf_out,
string varname_out)
const;
102 virtual int PutAtt(
string varname,
string attname,
int value)
const;
103 virtual int PutAtt(
string varname,
string attname, vector<int> values)
const;
104 virtual int PutAtt(
string varname,
string attname,
const int values[],
size_t n)
const;
111 virtual int GetAtt(
string varname,
string attname,
int &value)
const;
112 virtual int GetAtt(
string varname,
string attname, vector<int> &values)
const;
113 virtual int GetAtt(
string varname,
string attname,
int values[],
size_t n)
const;
118 virtual int PutAtt(
string varname,
string attname,
size_t value)
const;
119 virtual int PutAtt(
string varname,
string attname, vector<size_t> values)
const;
120 virtual int PutAtt(
string varname,
string attname,
const size_t values[],
size_t n)
const;
125 virtual int GetAtt(
string varname,
string attname,
size_t &value)
const;
126 virtual int GetAtt(
string varname,
string attname, vector<size_t> &values)
const;
127 virtual int GetAtt(
string varname,
string attname,
size_t values[],
size_t n)
const;
132 virtual int PutAtt(
string varname,
string attname,
float value)
const;
133 virtual int PutAtt(
string varname,
string attname, vector<float> values)
const;
134 virtual int PutAtt(
string varname,
string attname,
const float values[],
size_t n)
const;
139 virtual int GetAtt(
string varname,
string attname,
float &value)
const;
140 virtual int GetAtt(
string varname,
string attname, vector<float> &values)
const;
141 virtual int GetAtt(
string varname,
string attname,
float values[],
size_t n)
const;
146 virtual int PutAtt(
string varname,
string attname,
double value)
const;
147 virtual int PutAtt(
string varname,
string attname, vector<double> values)
const;
148 virtual int PutAtt(
string varname,
string attname,
const double values[],
size_t n)
const;
153 virtual int GetAtt(
string varname,
string attname,
double &value)
const;
154 virtual int GetAtt(
string varname,
string attname, vector<double> &values)
const;
155 virtual int GetAtt(
string varname,
string attname,
double values[],
size_t n)
const;
160 virtual int PutAtt(
string varname,
string attname,
string value)
const;
161 virtual int PutAtt(
string varname,
string attname, vector<string> values)
const;
162 virtual int PutAtt(
string varname,
string attname,
const char values[],
size_t n)
const;
167 virtual int GetAtt(
string varname,
string attname,
string &value)
const;
168 virtual int GetAtt(
string varname,
string attname,
char values[],
size_t n)
const;
178 virtual int GetAtt(
string varname,
string attname, vector<string> &values)
const;
181 virtual int InqVarid(
string varname,
int &varid)
const;
184 virtual int InqAtt(
string varname,
string attname, nc_type &xtype,
size_t &len)
const;
188 virtual int InqVartype(
string varname, nc_type &xtype)
const;
191 virtual int SetFill(
int fillmode,
int &old_modep);
203 virtual int PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const void *data);
204 virtual int PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const float *data);
205 virtual int PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const double *data);
206 virtual int PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const int *data);
207 virtual int PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const long *data);
208 virtual int PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const unsigned char *data);
211 virtual int PutVar(
string varname,
const void *data);
212 virtual int PutVar(
string varname,
const float *data);
213 virtual int PutVar(
string varname,
const double *data);
214 virtual int PutVar(
string varname,
const int *data);
215 virtual int PutVar(
string varname,
const long *data);
216 virtual int PutVar(
string varname,
const unsigned char *data);
219 virtual int GetVara(
string varname, vector<size_t> start, vector<size_t> count,
void *data)
const;
220 virtual int GetVara(
string varname, vector<size_t> start, vector<size_t> count,
float *data)
const;
221 virtual int GetVara(
string varname, vector<size_t> start, vector<size_t> count,
double *data)
const;
222 virtual int GetVara(
string varname, vector<size_t> start, vector<size_t> count,
int *data)
const;
223 virtual int GetVara(
string varname, vector<size_t> start, vector<size_t> count,
long *data)
const;
224 virtual int GetVara(
string varname, vector<size_t> start, vector<size_t> count,
unsigned char *data)
const;
227 virtual int GetVar(
string varname,
void *data)
const;
228 virtual int GetVar(
string varname,
float *data)
const;
229 virtual int GetVar(
string varname,
double *data)
const;
230 virtual int GetVar(
string varname,
int *data)
const;
231 virtual int GetVar(
string varname,
long *data)
const;
232 virtual int GetVar(
string varname,
unsigned char *data)
const;
276 int _PutVara(
string varname, vector<size_t> start, vector<size_t> count,
const void *data,
string func);
277 int _PutVar(
string varname,
const void *data,
string func);
279 int _GetVara(
string varname, vector<size_t> start, vector<size_t> count,
void *data,
string func)
const;
280 int _GetVar(
string varname,
void *data,
string func)
const;
Defines simple C++ wrapper for NetCDF.
virtual int GetAtt(string varname, string attname, vector< int > &values) const
int InqAttnames(string varname, std::vector< string > &attnames) const
Learn the names of all the global or variable attributes.
virtual int PutVar(string varname, const unsigned char *data)
virtual int PutAtt(string varname, string attname, vector< int > values) const
virtual int PutAtt(string varname, string attname, const char values[], size_t n) const
virtual int GetAtt(string varname, string attname, vector< double > &values) const
virtual int InqVartype(string varname, nc_type &xtype) const
Find a variable's external representation type.
virtual int PutVar(string varname, const long *data)
virtual bool InqDimDefined(string dimname)
virtual int GetVar(string varname, unsigned char *data) const
virtual int Close()
Close the currently opened file.
virtual int PutAtt(string varname, string attname, vector< string > values) const
virtual int GetAtt(string varname, string attname, double values[], size_t n) const
virtual int InqVarnames(vector< string > &varnames) const
virtual int GetAtt(string varname, string attname, vector< string > &values) const
virtual int GetVara(string varname, vector< size_t > start, vector< size_t > count, float *data) const
virtual int EndDef() const
End the metadata definition section.
virtual int PutAtt(string varname, string attname, string value) const
virtual int PutAtt(string varname, string attname, float value) const
virtual int PutVara(string varname, vector< size_t > start, vector< size_t > count, const float *data)
virtual int GetVar(string varname, double *data) const
virtual int SetFill(int fillmode, int &old_modep)
Set the fill value.
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 InqVarDims(string name, vector< string > &dimnames, vector< size_t > &dims) const
Learn the dimension names associated with a variable.
virtual int PutVara(string varname, vector< size_t > start, vector< size_t > count, const int *data)
virtual int InqAtt(string varname, string attname, nc_type &xtype, size_t &len) const
Return information about a NetCDF attribute.
virtual int GetVara(string varname, vector< size_t > start, vector< size_t > count, int *data) const
virtual int PutVara(string varname, vector< size_t > start, vector< size_t > count, const unsigned char *data)
virtual int PutAtt(string varname, string attname, vector< float > values) const
virtual int GetVar(string varname, float *data) const
virtual int PutAtt(string varname, string attname, const double values[], size_t n) const
virtual int GetVar(string varname, long *data) const
virtual int GetVar(string varname, void *data) const
Read an entire variable with one function call.
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 bool ValidFile(string path)
virtual int GetAtt(string varname, string attname, char values[], size_t n) const
virtual int GetAtt(string varname, string attname, double &value) const
virtual int GetAtt(string varname, string attname, float values[], size_t n) const
virtual int GetVara(string varname, vector< size_t > start, vector< size_t > count, unsigned char *data) const
virtual int PutAtt(string varname, string attname, const size_t values[], size_t n) const
virtual int GetVar(string varname, int *data) const
int CopyAtt(string varname_in, string attname, NetCDFCpp &ncdf_out, string varname_out) const
virtual int Create(string path, int cmode, size_t initialsz, size_t &bufrsizehintp)
static size_t SizeOf(int nctype)
virtual int InqVarid(string varname, int &varid) const
Find the NetCDF ID of a variable.
virtual int CopyVar(string varname, NetCDFCpp &ncdf_out) const
Copy a variable from one file to another.
virtual int InqDimlen(string name, size_t &len) const
Learn the length of a named dimension.
virtual int Open(string path, int mode)
virtual int PutVar(string varname, const int *data)
virtual int GetAtt(string varname, string attname, int &value) const
Read an integer attribute.
virtual int GetAtt(string varname, string attname, float &value) const
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 PutAtt(string varname, string attname, vector< size_t > values) const
virtual int GetVara(string varname, vector< size_t > start, vector< size_t > count, double *data) const
virtual int PutVara(string varname, vector< size_t > start, vector< size_t > count, const double *data)
virtual int PutVar(string varname, const double *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 bool InqAttDefined(string varname, string attname)
virtual int ReDef() const
Put open netcdf dataset into define mode.
virtual int InqDims(vector< string > &dimnames, vector< size_t > &dims) const
Learn the dimension names and lengths defined in a file.
virtual int PutAtt(string varname, string attname, int value) const
Write an integer attribute.
virtual int PutAtt(string varname, string attname, const int values[], size_t n) const
virtual int PutAtt(string varname, string attname, vector< double > values) const
virtual int GetVara(string varname, vector< size_t > start, vector< size_t > count, long *data) const
virtual int PutVara(string varname, vector< size_t > start, vector< size_t > count, const long *data)
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 PutVar(string varname, const void *data)
Write an entire variable with one function call.
virtual int GetAtt(string varname, string attname, vector< float > &values) const
virtual int GetAtt(string varname, string attname, string &value) const
virtual int PutAtt(string varname, string attname, double value) const
virtual int PutAtt(string varname, string attname, const float values[], size_t n) const
virtual int PutVar(string varname, const float *data)
virtual int GetAtt(string varname, string attname, size_t &value) const