6 #include <vapor/UDUnitsClass.h>
229 virtual int Initialize(
const std::vector <string> &paths, AccessMode mode);
231 return(Initialize(paths, R));
290 int SetCompressionBlock(
291 std::vector <size_t> bs,
string wname, std::vector <size_t> cratios
304 void GetCompressionBlock(
305 std::vector <size_t> &bs,
string &wname,
306 std::vector <size_t> &cratios
323 _periodic = periodic;
324 for (
int i=_periodic.size(); i<3; i++) _periodic.push_back(
false);
375 int DefineDimension(
string dimname,
size_t length,
int axis);
400 std::vector <string> GetDimensionNames()
const;
447 string varname, std::vector <string> dimnames,
448 string units,
int axis, XType type,
bool compressed
493 int DefineCoordVarUniform(
494 string varname, std::vector <string> dimname,
495 string units,
int axis, XType type,
bool compressed
520 bool GetCoordVarInfo(
521 string varname, std::vector <string> &dimnames,
522 string &units,
int &axis, XType &type,
bool &compressed,
bool &uniform
540 bool GetCoordVarInfo(
string varname,
DC::CoordVar &cvar)
const;
574 string varname, std::vector <string> dimnames,
575 std::vector <string> coordvars,
576 string units, XType type,
bool compressed
603 string varname, std::vector <string> dimnames,
604 std::vector <string> coordvars,
605 string units, XType type,
double missing_value,
string maskvar
630 string varname, std::vector <string> &dimnames,
631 std::vector <string> &coordvars,
632 string &units, XType &type,
bool &compressed,
651 bool GetDataVarInfo(
string varname,
DC::DataVar &datavar)
const;
664 bool GetBaseVarInfo(
string varname,
DC::BaseVar &var)
const;
673 virtual std::vector <string> GetDataVarNames()
const;
681 virtual std::vector <string> GetCoordVarNames()
const;
699 int GetNumRefLevels(
string varname)
const;
721 string varname,
string attname, XType type,
const vector <double> &values
724 string varname,
string attname, XType type,
const vector <long> &values
727 string varname,
string attname, XType type,
const string &values
750 string varname,
string attname, vector <double> &values
753 string varname,
string attname, vector <long> &values
756 string varname,
string attname,
string &values
772 std::vector <string> GetAttNames(
string varname)
const;
785 XType GetAttType(
string varname,
string attname)
const;
789 virtual int GetMapProjection(
790 string lonname,
string latname,
string &projstring
801 virtual int SetMapProjection(
802 string lonname,
string latname,
string projstring
847 string varname,
size_t ts,
string &path,
size_t &file_ts,
875 virtual int GetDimLensAtLevel(
876 string varname,
int level, std::vector <size_t> &dims_at_level,
877 std::vector <size_t> &bs_at_level
913 virtual int OpenVariableRead(
914 size_t ts,
string varname,
int level=0,
int lod=0
949 virtual int OpenVariableWrite(
size_t ts,
string varname,
int lod=-1) = 0;
958 virtual int CloseVariable() = 0;
974 virtual int Write(
const float *data) = 0;
997 virtual int WriteSlice(
const float *slice) = 0;
1015 int virtual Read(
float *data) = 0;
1041 virtual int ReadSlice(
float *slice) = 0;
1066 virtual int ReadRegion(
1067 const vector <size_t> &min,
const vector <size_t> &max,
float *region
1083 virtual int ReadRegionBlock(
1084 const vector <size_t> &min,
const vector <size_t> &max,
float *region
1109 virtual int PutVar(
string varname,
int lod,
const float *data) = 0;
1135 virtual int PutVar(
size_t ts,
string varname,
int lod,
const float *data) = 0;
1162 virtual int GetVar(
string varname,
int level,
int lod,
float *data) = 0;
1193 size_t ts,
string varname,
int level,
int lod,
float *data
1215 virtual bool CompressionInfo(
1216 vector <size_t> bs,
string wname,
size_t &nlevels,
size_t &maxcratio
1233 virtual bool VariableExists(
1241 friend std::ostream &operator<<(std::ostream &o,
const VDC &vdc);
1244 std::vector <string> _newUniformVars;
1261 #ifndef DOXYGEN_SKIP_THIS
1263 bool _ValidDefineDimension(
string name,
size_t length,
int axis)
const;
1265 bool _ValidDefineCoordVar(
1266 string varname, vector <string> dimnames,
1267 string units,
int axis,
XType type,
bool compressed
1271 bool _valid_blocking(
1272 const vector <DC::Dimension> &dimensions,
1273 const vector <string> &coordvars,
1274 const vector <size_t> &bs
1277 bool _valid_mask_var(
1278 string varname, vector <DC::Dimension> dimensions,
1279 vector <size_t> bs,
bool compressed,
string maskvar
1282 bool _ValidDefineDataVar(
1283 string varname, vector <string> dimnames, vector <string> coordnames,
1284 string units,
XType type,
bool compressed,
string maskvar
1288 bool _ValidCompressionBlock(
1289 vector <size_t> bs,
string wname, vector <size_t> cratios
1292 virtual int _WriteMasterMeta() = 0;
1293 virtual int _ReadMasterMeta() = 0;
1296 string varname, std::vector <string> dimnames,
1297 std::vector <string> coordvars,
1298 string units,
XType type,
bool compressed,
double mv,
string maskvar
Defines API for reading, writing, and appending data to a VAPOR Data Collection (Version 3) ...
std::vector< bool > GetPeriodicBoundary() const
void SetPeriodicBoundary(std::vector< bool > periodic)
std::map< string, Dimension > _dimsMap
Base class for storing variable metadata.
Coordinate variable metadata.
std::vector< size_t > _bs
Metadata describing a coordinate dimension.
std::map< string, DataVar > _dataVars
XType
External storage types for primitive data.
Defines API for reading a collection of data.
std::map< string, Attribute > _atts
virtual int Initialize(const std::vector< string > &paths)
std::map< string, CoordVar > _coordVars
std::vector< size_t > _cratios