55 string path,
int cmode,
size_t initialsz,
64 virtual int Open(
string path,
int mode);
67 virtual int DefDim(
string name,
size_t len)
const;
71 string name,
int xtype, vector <string> dimnames
75 virtual int InqVarDims(
76 string name, vector <string> &dimnames, vector <size_t> &dims
80 virtual int InqDimlen(
string name,
size_t &len)
const;
91 string varname,
string attname,
int value
94 string varname,
string attname, vector <int> values
97 string varname,
string attname,
const int values[],
size_t n
106 string varname,
string attname,
int &value
109 string varname,
string attname, vector <int> &values
112 string varname,
string attname,
int values[],
size_t n
119 string varname,
string attname,
size_t value
122 string varname,
string attname, vector <size_t> values
125 string varname,
string attname,
126 const size_t values[],
size_t n
133 string varname,
string attname,
size_t &value
136 string varname,
string attname, vector <size_t> &values
139 string varname,
string attname,
size_t values[],
size_t n
146 string varname,
string attname,
float value
149 string varname,
string attname, vector <float> values
152 string varname,
string attname,
const float values[],
size_t n
159 string varname,
string attname,
float &value
162 string varname,
string attname, vector <float> &values
165 string varname,
string attname,
float values[],
size_t n
172 string varname,
string attname,
double value
175 string varname,
string attname, vector <double> values
178 string varname,
string attname,
const double values[],
size_t n
185 string varname,
string attname,
double &value
188 string varname,
string attname, vector <double> &values
191 string varname,
string attname,
double values[],
size_t n
198 string varname,
string attname,
string value
201 string varname,
string attname, vector <string> values
204 string varname,
string attname,
const char values[],
size_t n
211 string varname,
string attname,
string &value
214 string varname,
string attname,
char values[],
size_t n
226 string varname,
string attname, vector <string> &values
230 virtual int InqVarid(
string varname,
int &varid )
const;
234 string varname,
string attname, nc_type &xtype,
size_t &len
239 virtual int InqVartype(
string varname, nc_type &xtype)
const;
242 virtual int SetFill(
int fillmode,
int &old_modep);
245 virtual int EndDef()
const;
253 vector <size_t> start, vector <size_t> count,
const void *data
257 vector <size_t> start, vector <size_t> count,
const float *data
261 vector <size_t> start, vector <size_t> count,
const double *data
265 vector <size_t> start, vector <size_t> count,
const int *data
269 vector <size_t> start, vector <size_t> count,
const long *data
273 vector <size_t> start, vector <size_t> count,
const unsigned char *data
277 virtual int PutVar(
string varname,
const void *data);
278 virtual int PutVar(
string varname,
const float *data);
279 virtual int PutVar(
string varname,
const double *data);
280 virtual int PutVar(
string varname,
const int *data);
281 virtual int PutVar(
string varname,
const long *data);
282 virtual int PutVar(
string varname,
const unsigned char *data);
287 vector <size_t> start, vector <size_t> count,
void *data
291 vector <size_t> start, vector <size_t> count,
float *data
295 vector <size_t> start, vector <size_t> count,
double *data
299 vector <size_t> start, vector <size_t> count,
int *data
303 vector <size_t> start, vector <size_t> count,
long *data
307 vector <size_t> start, vector <size_t> count,
unsigned char *data
311 virtual int GetVar(
string varname,
void *data);
312 virtual int GetVar(
string varname,
float *data);
313 virtual int GetVar(
string varname,
double *data);
314 virtual int GetVar(
string varname,
int *data);
315 virtual int GetVar(
string varname,
long *data);
316 virtual int GetVar(
string varname,
unsigned char *data);
321 static size_t SizeOf(
int nctype);
328 virtual bool ValidFile(
string path);
334 virtual bool InqDimDefined(
string dimname);
340 virtual bool InqAttDefined(
string varname,
string attname);
347 virtual int InqVarnames(vector <string> &varnames)
const;
355 string varname, vector <size_t> start, vector <size_t> count,
356 const void *data,
string func
358 int _PutVar(
string varname,
const void *data,
string func);
361 string varname, vector <size_t> start, vector <size_t> count,
362 void *data,
string func
364 int _GetVar(
string varname,
void *data,
string func);
370 #endif // _NetCDFCpp_H_
Defines simple C++ wrapper for NetCDF.