43 virtual int initialize(
const vector<string> &paths,
const std::vector<string> &options);
48 virtual bool getDimension(
string dimname, DC::Dimension &dimension)
const;
52 virtual std::vector<string> getDimensionNames()
const;
56 std::vector<string> getMeshNames()
const;
60 virtual bool getMesh(
string mesh_name, DC::Mesh &mesh)
const;
64 virtual bool getCoordVarInfo(
string varname, DC::CoordVar &cvar)
const;
68 virtual bool getDataVarInfo(
string varname, DC::DataVar &datavar)
const;
72 virtual bool getAuxVarInfo(
string varname, DC::AuxVar &var)
const;
77 virtual bool getBaseVarInfo(
string varname, DC::BaseVar &var)
const;
83 virtual std::vector<string> getDataVarNames()
const;
85 virtual std::vector<string> getAuxVarNames()
const;
90 virtual std::vector<string> getCoordVarNames()
const;
94 virtual size_t getNumRefLevels(
string varname)
const {
return (1); }
98 virtual string getMapProjection()
const
102 return (_proj4String);
107 virtual bool getAtt(
string varname,
string attname, vector<double> &values)
const;
108 virtual bool getAtt(
string varname,
string attname, vector<long> &values)
const;
109 virtual bool getAtt(
string varname,
string attname,
string &values)
const;
113 virtual std::vector<string> getAttNames(
string varname)
const;
117 virtual XType getAttType(
string varname,
string attname)
const;
121 virtual int getDimLensAtLevel(
string varname,
int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level)
const;
126 virtual int openVariableRead(
size_t ts,
string varname,
int,
int) {
return (DCMelanie::openVariableRead(ts, varname)); }
128 virtual int openVariableRead(
size_t ts,
string varname);
133 virtual int closeVariable(
int fd);
137 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
float *region) {
return (_readRegionTemplate(fd, min, max, region)); }
138 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
double *region) {
return (_readRegionTemplate(fd, min, max, region)); }
139 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
int *region) {
return (_readRegionTemplate(fd, min, max, region)); }
143 virtual bool variableExists(
size_t ts,
string varname,
int reflevel = 0,
int lod = 0)
const;
146 NetCDFCFCollection *_ncdfc;
150 std::map<string, DC::Dimension> _dimsMap;
151 std::map<string, DC::CoordVar> _coordVarsMap;
152 std::map<string, DC::AuxVar> _auxVarsMap;
153 std::map<string, DC::Mesh> _meshMap;
154 std::map<string, DC::DataVar> _dataVarsMap;
155 std::map<string, string> _coordVarKeys;
156 std::map<string, string> _sanitizedToOriginalMap;
157 std::vector<NetCDFCollection::DerivedVar *> _derivedVars;
159 const string nodeFaceVar =
"cellsOnVertex";
160 const string faceNodeVar =
"verticesOnCell";
161 const vector<string> fakeVars = {nodeFaceVar, faceNodeVar};
162 int fakeVarsFileCounterStart = 10000;
163 int fakeVarsFileCounter = fakeVarsFileCounterStart;
164 std::map<int, string> _fdMap;
167 string sanitizeVarName(
const string &name);
168 string getOriginalVarName(
const string &name)
const;
170 template<
class T>
int _readRegionTemplate(
int fd,
const vector<size_t> &min,
const vector<size_t> &max, T *region);
172 template<
class T>
bool _getAttTemplate(
string varname,
string attname, T &values)
const;
A Template Method design pattern for reading a collection of data.