19 #define DCP_ENABLE_PARTICLE_DENSITY 0
49 virtual int initialize(
const vector<string> &paths,
const std::vector<string> &options);
109 return (_proj4String);
114 virtual bool getAtt(
string varname,
string attname, vector<double> &values)
const;
115 virtual bool getAtt(
string varname,
string attname, vector<long> &values)
const;
116 virtual bool getAtt(
string varname,
string attname,
string &values)
const;
128 virtual int getDimLensAtLevel(
string varname,
int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level)
const;
129 virtual int getDimLensAtLevel(
string varname,
int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level,
long ts)
const;
134 virtual int openVariableRead(
size_t ts,
string varname,
int,
int) {
return (DCP::openVariableRead(ts, varname)); }
145 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
float *region) {
return (_readRegionTemplate(fd, min, max, region)); }
146 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
double *region) {
return (_readRegionTemplate(fd, min, max, region)); }
147 virtual int readRegion(
int fd,
const vector<size_t> &min,
const vector<size_t> &max,
int *region) {
return (_readRegionTemplate(fd, min, max, region)); }
152 virtual bool variableExists(
size_t ts,
string varname,
int reflevel = 0,
int lod = 0)
const;
159 std::map<string, DC::Dimension> _dimsMap;
160 std::map<string, DC::CoordVar> _coordVarsMap;
161 std::map<string, DC::AuxVar> _auxVarsMap;
162 std::map<string, DC::Mesh> _meshMap;
163 std::map<string, DC::DataVar> _dataVarsMap;
164 std::map<string, string> _coordVarKeys;
165 std::map<string, string> _sanitizedToOriginalMap;
167 const string _nodeFaceVar =
"cellsOnVertex";
168 const string _faceNodeVar =
"verticesOnCell";
169 const string _fakeEmptyVar =
"empty";
170 vector<string> _fakeVars = {_nodeFaceVar, _faceNodeVar};
171 int _fakeVarsFileCounterStart = 10000;
172 int _fakeVarsFileCounter = _fakeVarsFileCounterStart;
173 std::map<int, string> _fdMap;
176 string sanitizeVarName(
const string &name);
177 string getOriginalVarName(
const string &name)
const;
178 bool isCoordVar(
const string &var)
const;
179 int getAxis(
const string &var)
const;
180 string getUnits(
const string &var)
const;
181 string getTimeCoordVar(
const string &var)
const;
183 template<
class T>
int _readRegionTemplate(
int fd,
const vector<size_t> &min,
const vector<size_t> &max, T *region);
185 template<
class T>
bool _getAttTemplate(
string varname,
string attname, T &values)
const;
virtual bool getBaseVarInfo(string varname, DC::BaseVar &var) const
virtual std::vector< string > getAttNames(string varname) const
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, double *region)
virtual int initialize(const vector< string > &paths, const std::vector< string > &options)
virtual bool getMesh(string mesh_name, DC::Mesh &mesh) const
virtual std::vector< string > getDimensionNames() const
virtual std::vector< string > getCoordVarNames() const
virtual bool getAtt(string varname, string attname, vector< double > &values) const
virtual int openVariableRead(size_t ts, string varname)
virtual size_t getNumRefLevels(string varname) const
virtual bool getAtt(string varname, string attname, vector< long > &values) const
virtual bool getDataVarInfo(string varname, DC::DataVar &datavar) const
virtual string getMapProjection() const
virtual int getDimLensAtLevel(string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level) const
virtual bool variableExists(size_t ts, string varname, int reflevel=0, int lod=0) const
virtual int getDimLensAtLevel(string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts) const
virtual bool getDimension(string dimname, DC::Dimension &dimension, long ts) const
std::vector< string > getMeshNames() const
virtual int openVariableRead(size_t ts, string varname, int, int)
virtual bool getDimension(string dimname, DC::Dimension &dimension) const
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, float *region)
virtual std::vector< string > getDataVarNames() const
virtual bool getCoordVarInfo(string varname, DC::CoordVar &cvar) const
virtual std::vector< string > getAuxVarNames() const
virtual XType getAttType(string varname, string attname) const
virtual bool getAuxVarInfo(string varname, DC::AuxVar &var) const
virtual bool getAtt(string varname, string attname, string &values) const
virtual int closeVariable(int fd)
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)
Auxiliary variable metadata.
Base class for storing variable metadata.
Coordinate variable metadata.
Metadata describing a named dimension length.
Metadata describing a computational mesh.
A Template Method design pattern for reading a collection of data.
XType
External storage types for primitive data.
Wrapper for a collection of netCDF files.