VAPOR3 3.9.4
DC.h
Go to the documentation of this file.
1#include <vector>
2#include <algorithm>
3#include <map>
4#include <iostream>
5#include <vapor/MyBase.h>
6
7#ifndef _DC_H_
8 #define _DC_H_
9
10namespace VAPoR {
11
150class VDF_API DC : public Wasp::MyBase {
151public:
153 //
154 enum XType { INVALID = -1, FLOAT, DOUBLE, UINT8, INT8, INT32, INT64, TEXT };
155
163 class Dimension {
164 public:
166 {
167 _name.clear();
168 _lengths.clear();
169 }
170
176 Dimension(std::string name, std::vector<size_t> lengths)
177 {
178 _name = name;
179 _lengths = lengths;
180 };
181
187 Dimension(std::string name, size_t length)
188 {
189 _name = name;
190 _lengths.clear();
191 _lengths.push_back(length);
192 };
193
194 virtual ~Dimension(){};
195
197 //
198 string GetName() const { return (_name); };
199
204 size_t GetLength() const { return (_lengths.size() ? _lengths[0] : 0); };
205
211 size_t GetLength(size_t index) const { return (index < _lengths.size() ? _lengths[index] : 0); };
212
216 //
217 bool IsTimeVarying() const { return (_lengths.size() > 1); }
218
219 friend std::ostream &operator<<(std::ostream &o, const Dimension &dimension);
220
221 private:
222 string _name;
223 std::vector<size_t> _lengths;
224 };
225
310 class Mesh {
311 public:
313 //
314 enum Type {
318 UNSTRUC_3D
319 };
320
322 //
323 enum Location {
327 VOLUME
328 };
329
331 {
332 _name.clear();
333 _dim_names.clear();
334 _coord_vars.clear();
335 _max_nodes_per_face = 0;
336 _max_faces_per_node = 0;
337 _node_dim_name.clear();
338 _face_dim_name.clear();
339 _layers_dim_name.clear();
340 _face_node_var.clear();
341 _node_face_var.clear();
342 _face_edge_var.clear();
343 _face_face_var.clear();
344 _edge_dim_name.clear();
345 _edge_node_var.clear();
346 _edge_face_var.clear();
347 _mtype = STRUCTURED;
348 }
349
366 Mesh(std::string name, std::vector<string> dim_names, std::vector<string> coord_vars);
367
372 Mesh(std::string name, size_t max_nodes_per_face, size_t max_faces_per_node, std::string node_dim_name, std::string face_dim_name, std::vector<std::string> coord_vars,
373 std::string face_node_var, std::string node_face_var);
374
381 //
382 Mesh(std::string name, size_t max_nodes_per_face, size_t max_faces_per_node, std::string node_dim_name, std::string face_dim_name, std::string layers_dim_name,
383 std::vector<std::string> coord_vars, std::string face_node_var, std::string node_face_var);
384
391 //
392 Mesh(std::string name, int max_nodes_per_face, int max_faces_per_node, std::string node_dim_name, std::string face_dim_name, std::vector<string> coord_vars);
393
407 Mesh::Type GetMeshType() const { return (_mtype); }
408
410 //
411 string GetName() const { return (_name); };
412
424 //
425 std::vector<string> GetDimNames() const { return (_dim_names); };
426
431 //
432 std::vector<string> GetCoordVars() const { return (_coord_vars); };
433 void SetCoordVars(std::vector<string> coord_vars) { _coord_vars = coord_vars; };
434
443 //
444 size_t GetGeometryDim() const { return (_coord_vars.size()); }
445
451 size_t GetMaxNodesPerFace() const { return (_max_nodes_per_face); };
452
458 size_t GetMaxFacesPerNode() const { return (_max_faces_per_node); };
459
465 string GetNodeDimName() const { return (_node_dim_name); };
466
472 string GetFaceDimName() const { return (_face_dim_name); };
473
479 string GetLayersDimName() const { return (_layers_dim_name); };
480
485 string GetFaceNodeVar() const { return (_face_node_var); }
486 void SetFaceNodeVar(std::string face_node_var)
487 {
488 if (_mtype == STRUCTURED) return;
489 _face_node_var = face_node_var;
490 }
491
496 string GetNodeFaceVar() const { return (_node_face_var); }
497 void SetNodeFaceVar(std::string node_face_var)
498 {
499 if (_mtype == STRUCTURED) return;
500 _node_face_var = node_face_var;
501 }
502
510 void SetEdgeDimName(std::string edge_dim_name)
511 {
512 if (_mtype == STRUCTURED) return;
513 _edge_dim_name = edge_dim_name;
514 }
515
522 std::string GetEdgeDimName() const { return (_edge_dim_name); }
523
534 void SetEdgeNodeVar(std::string edge_node_var)
535 {
536 if (_mtype == STRUCTURED) return;
537 _edge_node_var = edge_node_var;
538 }
539
544 //
545 std::string GetEdgeNodeVar() const { return (_edge_node_var); }
546
562 //
563 void SetFaceEdgeVar(std::string face_edge_var)
564 {
565 if (_mtype == STRUCTURED) return;
566 _face_edge_var = face_edge_var;
567 }
568
573 //
574 std::string GetFaceEdgeVar() const { return (_face_edge_var); }
575
591 //
592 void SetFaceFaceVar(std::string face_face_var)
593 {
594 if (_mtype == STRUCTURED) return;
595 _face_face_var = face_face_var;
596 }
597
602 //
603 std::string GetFaceFaceVar() const { return (_face_face_var); }
604
619 //
620 void SetEdgeFaceVar(std::string edge_face_var)
621 {
622 if (_mtype == STRUCTURED) return;
623 _edge_face_var = edge_face_var;
624 }
625
630 //
631 std::string GetEdgeFaceVar() const { return (_edge_face_var); }
632
641 //
642 size_t GetTopologyDim() const;
643
647 //
648 static string MakeMeshName(std::vector<string> s);
649
650 friend std::ostream &operator<<(std::ostream &o, const Mesh &mesh);
651
652 private:
653 string _name;
654 std::vector<string> _dim_names;
655 std::vector<string> _coord_vars;
656 size_t _max_nodes_per_face;
657 size_t _max_faces_per_node;
658 string _node_dim_name;
659 string _face_dim_name;
660 string _layers_dim_name;
661 string _face_node_var;
662 string _node_face_var;
663 string _face_edge_var;
664 string _face_face_var;
665 string _edge_dim_name;
666 string _edge_node_var;
667 string _edge_face_var;
668 Mesh::Type _mtype;
669
670 void _Mesh(string name, std::vector<string> coord_vars, int max_nodes_per_face, int max_faces_per_node, Type type);
671 };
672
677 class Attribute {
678 public:
680 {
681 _name = "";
682 _type = FLOAT;
683 _values.clear();
684 };
685
691 //
692 Attribute(string name, XType type, const std::vector<float> &values);
693 Attribute(string name, XType type, const std::vector<double> &values);
694 Attribute(string name, XType type, const std::vector<int> &values);
695 Attribute(string name, XType type, const std::vector<long> &values);
696 Attribute(string name, XType type, const string &values);
697 Attribute(string name, XType type)
698 {
699 _name = name;
700 _type = type;
701 _values.clear();
702 };
703 virtual ~Attribute(){};
704
706 //
707 string GetName() const { return (_name); };
708
710 //
711 XType GetXType() const { return (_type); };
712
718 VDF_API void GetValues(std::vector<float> &values) const;
719 VDF_API void GetValues(std::vector<double> &values) const;
720 VDF_API void GetValues(std::vector<int> &values) const;
721 VDF_API void GetValues(std::vector<long> &values) const;
722 VDF_API void GetValues(string &values) const;
723
729 void SetValues(const std::vector<float> &values);
730 void SetValues(const std::vector<double> &values);
731 void SetValues(const std::vector<int> &values);
732 void SetValues(const std::vector<long> &values);
733 void SetValues(const string &values);
734
735 friend std::ostream &operator<<(std::ostream &o, const Attribute &attr);
736
737 private:
738 string _name;
739 XType _type;
740 union podunion {
741 float f;
742 double d;
743 int i;
744 long l;
745 char c;
746 };
747 std::vector<podunion> _values;
748 };
749
753 //
754 class BaseVar {
755 public:
757 {
758 _name.clear();
759 _units.clear();
760 _type = FLOAT;
761 _wname.clear();
762 _cratios.clear();
763 _periodic.clear();
764 _atts.clear();
765 }
766
784 BaseVar(string name, string units, XType type, string wname, std::vector<size_t> cratios, std::vector<bool> periodic)
785 : _name(name), _units(units), _type(type), _wname(wname), _cratios(cratios), _periodic(periodic)
786 {
787 if (_cratios.size() == 0) _cratios.push_back(1);
788 };
789
808 BaseVar(string name, string units, XType type, std::vector<bool> periodic);
809
810 virtual ~BaseVar(){};
811
813 //
814 string GetName() const { return (_name); };
815 void SetName(string name) { _name = name; };
816
818 //
819 string GetUnits() const { return (_units); };
820 void SetUnits(string units) { _units = units; };
821
823 //
824 XType GetXType() const { return (_type); };
825 void SetXType(XType type) { _type = type; };
826
828 //
829 string GetWName() const { return (_wname); };
830 void SetWName(string wname) { _wname = wname; };
831
833 //
834 std::vector<size_t> GetCRatios() const { return (_cratios); };
835
836 void SetCRatios(std::vector<size_t> cratios)
837 {
838 _cratios = cratios;
839 if (_cratios.size() == 0) _cratios.push_back(1);
840 };
841
843 //
844 std::vector<bool> GetPeriodic() const { return (_periodic); };
845 void SetPeriodic(std::vector<bool> periodic) { _periodic = periodic; };
846
848 //
849 const std::map<string, Attribute> &GetAttributes() const { return (_atts); };
850 void SetAttributes(std::map<string, Attribute> &atts) { _atts = atts; };
851
852 bool GetAttribute(string name, Attribute &att) const
853 {
854 std::map<string, Attribute>::const_iterator itr = _atts.find(name);
855 if (itr == _atts.end()) return (false);
856 att = itr->second;
857 return (true);
858 }
859
860 void SetAttribute(const Attribute &att) { _atts[att.GetName()] = att; }
861
863 //
864 bool IsCompressed() const { return (!_wname.empty()); };
865
866 friend std::ostream &operator<<(std::ostream &o, const BaseVar &var);
867
868 private:
869 string _name;
870 string _units;
871 XType _type;
872 string _wname;
873 std::vector<size_t> _cratios;
874 std::vector<bool> _periodic;
875 std::map<string, Attribute> _atts;
876 };
877
880 //
881 class CoordVar : public BaseVar {
882 public:
884 {
885 _dim_names.clear();
886 _time_dim_name.clear();
887 _axis = 0;
888 _uniform = true;
889 }
890
915 //
916 CoordVar(string name, string units, XType type, string wname, std::vector<size_t> cratios, std::vector<bool> periodic, std::vector<string> dim_names, string time_dim_name, int axis,
917 bool uniform)
918 : BaseVar(name, units, type, wname, cratios, periodic), _dim_names(dim_names), _time_dim_name(time_dim_name), _axis(axis), _uniform(uniform)
919 {
920 }
921
943 //
944 CoordVar(string name, string units, XType type, std::vector<bool> periodic, int axis, bool uniform, std::vector<string> dim_names, string time_dim_name)
945 : BaseVar(name, units, type, periodic), _dim_names(dim_names), _time_dim_name(time_dim_name), _axis(axis), _uniform(uniform)
946 {
947 }
948
949 virtual ~CoordVar(){};
950
953 //
954 std::vector<string> GetDimNames() const { return (_dim_names); };
955 void SetDimNames(std::vector<string> dim_names) { _dim_names = dim_names; };
956
959 //
960 string GetTimeDimName() const { return (_time_dim_name); };
961 void SetTimeDimName(string time_dim_name) { _time_dim_name = time_dim_name; };
962
964 //
965 int GetAxis() const { return (_axis); };
966 void SetAxis(int axis) { _axis = axis; };
967
969 //
970 bool GetUniform() const { return (_uniform); };
971 void SetUniform(bool uniform) { _uniform = uniform; };
972
973 friend std::ostream &operator<<(std::ostream &o, const CoordVar &var);
974
975 private:
976 std::vector<string> _dim_names;
977 string _time_dim_name;
978 int _axis;
979 bool _uniform;
980 };
981
987 class DataVar : public BaseVar {
988 public:
990 {
991 _mesh.clear();
992 _time_coord_var.clear();
993 _location = Mesh::NODE;
994 _maskvar.clear();
995 _has_missing = false;
996 _missing_value = 0.0;
997 }
998
1023 DataVar(string name, string units, XType type, string wname, std::vector<size_t> cratios, std::vector<bool> periodic, string mesh, string time_coord_var, Mesh::Location location,
1024 double missing_value)
1025 : BaseVar(name, units, type, wname, cratios, periodic), _mesh(mesh), _time_coord_var(time_coord_var), _location(location), _maskvar(""), _has_missing(true), _missing_value(missing_value)
1026 {
1027 }
1028
1058 DataVar(string name, string units, XType type, string wname, std::vector<size_t> cratios, std::vector<bool> periodic, string mesh, string time_coord_var, Mesh::Location location,
1059 double missing_value, string maskvar)
1060 : BaseVar(name, units, type, wname, cratios, periodic), _mesh(mesh), _time_coord_var(time_coord_var), _location(location), _maskvar(maskvar), _has_missing(true), _missing_value(missing_value)
1061 {
1062 }
1063
1087 DataVar(string name, string units, XType type, string wname, std::vector<size_t> cratios, std::vector<bool> periodic, string mesh, string time_coord_var, Mesh::Location location)
1088 : BaseVar(name, units, type, wname, cratios, periodic), _mesh(mesh), _time_coord_var(time_coord_var), _location(location), _maskvar(""), _has_missing(false), _missing_value(0.0)
1089 {
1090 }
1091
1115 DataVar(string name, string units, XType type, std::vector<bool> periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value)
1116 : BaseVar(name, units, type, periodic), _mesh(mesh), _time_coord_var(time_coord_var), _location(location), _maskvar(""), _has_missing(true), _missing_value(missing_value)
1117 {
1118 }
1119
1151 DataVar(string name, string units, XType type, std::vector<bool> periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value, string maskvar)
1152 : BaseVar(name, units, type, periodic), _mesh(mesh), _time_coord_var(time_coord_var), _location(location), _maskvar(maskvar), _has_missing(true), _missing_value(missing_value)
1153 {
1154 }
1155
1171 DataVar(string name, string units, XType type, std::vector<bool> periodic, string mesh, string time_coord_var, Mesh::Location location)
1172 : BaseVar(name, units, type, periodic), _mesh(mesh), _time_coord_var(time_coord_var), _location(location), _maskvar(""), _has_missing(false), _missing_value(0.0)
1173 {
1174 }
1175
1176 virtual ~DataVar(){};
1177
1180 //
1181 string GetMeshName() const { return (_mesh); };
1182 void SetMeshName(string mesh) { _mesh = mesh; };
1183
1186 //
1187 string GetTimeCoordVar() const { return (_time_coord_var); }
1188 void SetTimeCoordVar(string time_coord_var) { _time_coord_var = time_coord_var; }
1189
1192 //
1193 Mesh::Location GetSamplingLocation() const { return (_location); }
1194
1196 //
1197 string GetMaskvar() const { return (_maskvar); };
1198 void SetMaskvar(string maskvar) { _maskvar = maskvar; };
1199
1201 //
1202 bool GetHasMissing() const { return (_has_missing); };
1203 void SetHasMissing(bool has_missing) { _has_missing = has_missing; };
1204
1206 //
1207 double GetMissingValue() const { return (_missing_value); };
1208 void SetMissingValue(double missing_value) { _missing_value = missing_value; };
1209
1210 VDF_API friend std::ostream &operator<<(std::ostream &o, const DataVar &var);
1211
1212 private:
1213 string _mesh;
1214 string _time_coord_var;
1215 Mesh::Location _location;
1216 string _maskvar;
1217 bool _has_missing;
1218 double _missing_value;
1219 };
1220
1230 class AuxVar : public BaseVar {
1231 public:
1233 {
1234 _dim_names.clear();
1235 _offset = 0;
1236 }
1237
1252 AuxVar(string name, string units, XType type, string wname, std::vector<size_t> cratios, std::vector<bool> periodic, std::vector<string> dim_names)
1253 : BaseVar(name, units, type, wname, cratios, periodic), _dim_names(dim_names), _offset(0)
1254 {
1255 }
1256
1257 virtual ~AuxVar(){};
1258
1260 //
1261 std::vector<string> GetDimNames() const { return (_dim_names); };
1262 void SetDimNames(std::vector<string> dim_names) { _dim_names = dim_names; };
1263
1267 //
1268 long GetOffset() const { return (_offset); };
1269 void SetOffset(long offset) { _offset = offset; };
1270
1271 VDF_API friend std::ostream &operator<<(std::ostream &o, const AuxVar &var);
1272
1273 private:
1274 std::vector<string> _dim_names;
1275 long _offset;
1276 };
1277
1282
1283 virtual ~DC(){};
1284
1301 //
1302 virtual int Initialize(const std::vector<string> &paths, const std::vector<string> &options = std::vector<string>()) { return (initialize(paths, options)); }
1303
1315 virtual bool GetDimension(string dimname, DC::Dimension &dimension, long ts) const { return (getDimension(dimname, dimension, ts)); }
1316
1322 virtual std::vector<string> GetDimensionNames() const { return (getDimensionNames()); }
1323
1329 virtual std::vector<string> GetMeshNames() const { return (getMeshNames()); }
1330
1340 virtual bool GetMesh(string mesh_name, DC::Mesh &mesh) const { return (getMesh(mesh_name, mesh)); }
1341
1349 //
1350 virtual bool GetMeshDimLens(const string &mesh_name, std::vector<size_t> &dims, long ts = -1) const;
1351
1359 //
1360 virtual bool GetMeshDimNames(const string &mesh_name, std::vector<string> &dimnames) const;
1361
1374 virtual bool GetCoordVarInfo(string varname, DC::CoordVar &cvar) const { return (getCoordVarInfo(varname, cvar)); }
1375
1388 virtual bool GetDataVarInfo(string varname, DC::DataVar &datavar) const { return (getDataVarInfo(varname, datavar)); }
1389
1400 //
1401 virtual bool GetAuxVarInfo(string varname, DC::AuxVar &var) const { return (getAuxVarInfo(varname, var)); }
1402
1413 //
1414 virtual bool GetBaseVarInfo(string varname, DC::BaseVar &var) const { return (getBaseVarInfo(varname, var)); }
1415
1421 //
1422 virtual std::vector<string> GetDataVarNames() const { return (getDataVarNames()); }
1423
1429 //
1430 virtual std::vector<string> GetCoordVarNames() const { return (getCoordVarNames()); }
1431
1437 //
1438 virtual std::vector<string> GetAuxVarNames() const { return (getAuxVarNames()); }
1439
1454 //
1455 virtual size_t GetNumRefLevels(string varname) const { return (getNumRefLevels(varname)); }
1456
1475 //
1476 virtual bool GetAtt(string varname, string attname, vector<double> &values) const { return (getAtt(varname, attname, values)); }
1477
1478 virtual bool GetAtt(string varname, string attname, vector<long> &values) const { return (getAtt(varname, attname, values)); }
1479
1480 virtual bool GetAtt(string varname, string attname, string &values) const { return (getAtt(varname, attname, values)); }
1481
1494 //
1495 virtual std::vector<string> GetAttNames(string varname) const { return (getAttNames(varname)); }
1496
1508 virtual XType GetAttType(string varname, string attname) const { return (getAttType(varname, attname)); }
1509
1539 //
1540 virtual int GetDimLensAtLevel(string varname, int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level, long ts = -1) const
1541 {
1542 return (getDimLensAtLevel(varname, level, dims_at_level, bs_at_level, ts));
1543 }
1544
1550 virtual int GetDimLens(string varname, std::vector<size_t> &dims, long ts = -1)
1551 {
1552 vector<size_t> dummy;
1553 return (GetDimLensAtLevel(varname, -1, dims, dummy, ts));
1554 }
1555
1569 //
1570 virtual string GetMapProjection() const { return (getMapProjection()); }
1571
1605 //
1606 virtual int OpenVariableRead(size_t ts, string varname, int level = 0, int lod = 0) { return (_openVariableRead(ts, varname, level, lod)); }
1607
1614 //
1615 virtual int CloseVariable(int fd) { return (_closeVariable(fd)); }
1616
1633 //
1634 int virtual Read(int fd, float *data) { return (_readTemplate(fd, data)); }
1635 int virtual Read(int fd, double *data) { return (_readTemplate(fd, data)); }
1636 int virtual Read(int fd, int *data) { return (_readTemplate(fd, data)); }
1637
1659 virtual int ReadSlice(int fd, float *slice) { return (_readSliceTemplate(fd, slice)); }
1660 virtual int ReadSlice(int fd, double *slice) { return (_readSliceTemplate(fd, slice)); }
1661 virtual int ReadSlice(int fd, int *slice) { return (_readSliceTemplate(fd, slice)); }
1662
1686 //
1687 virtual int ReadRegion(int fd, const vector<size_t> &min, const vector<size_t> &max, float *region) { return (readRegion(fd, min, max, region)); }
1688 virtual int ReadRegion(int fd, const vector<size_t> &min, const vector<size_t> &max, double *region) { return (readRegion(fd, min, max, region)); }
1689 virtual int ReadRegion(int fd, const vector<size_t> &min, const vector<size_t> &max, int *region) { return (readRegion(fd, min, max, region)); }
1690
1691
1715 //
1716 virtual int GetVar(string varname, int level, int lod, float *data) { return (_getVarTemplate(varname, level, lod, data)); }
1717 virtual int GetVar(string varname, int level, int lod, double *data) { return (_getVarTemplate(varname, level, lod, data)); }
1718 virtual int GetVar(string varname, int level, int lod, int *data) { return (_getVarTemplate(varname, level, lod, data)); }
1719
1746 //
1747 virtual int GetVar(size_t ts, string varname, int level, int lod, float *data) { return (_getVarTemplate(ts, varname, level, lod, data)); }
1748 virtual int GetVar(size_t ts, string varname, int level, int lod, double *data) { return (_getVarTemplate(ts, varname, level, lod, data)); }
1749 virtual int GetVar(size_t ts, string varname, int level, int lod, int *data) { return (_getVarTemplate(ts, varname, level, lod, data)); }
1750
1763 //
1764 virtual bool VariableExists(size_t ts, string varname, int reflevel = 0, int lod = 0) const { return (variableExists(ts, varname, reflevel, lod)); };
1765
1779 virtual int GetHyperSliceInfo(string varname, int level, std::vector<size_t> &dims, size_t &nslice, long ts = -1);
1780
1789 //
1790 virtual std::vector<string> GetDataVarNames(int ndim) const;
1791
1792 //
1809 //
1810 virtual bool GetVarDimensions(string varname, bool spatial, vector<DC::Dimension> &dimensions, long ts) const;
1811
1812 //
1829 //
1830 virtual bool GetVarDimLens(string varname, bool spatial, vector<size_t> &dimlens, long ts = -1) const;
1831
1847 //
1848 virtual bool GetVarDimLens(string varname, vector<size_t> &sdimlens, size_t &time_dimlen, long ts = -1) const;
1849
1866 //
1867 virtual bool GetVarDimNames(string varname, bool spatial, vector<string> &dimnames) const;
1868
1885 //
1886 virtual bool GetVarDimNames(string varname, vector<string> &sdimnames, string &time_dimname) const;
1887
1896 //
1897 virtual size_t GetVarTopologyDim(string varname) const;
1898
1908 //
1909 virtual size_t GetVarGeometryDim(string varname) const;
1910
1922 virtual bool IsTimeVarying(string varname) const;
1923
1934 //
1935 virtual bool IsCompressed(string varname) const;
1936
1953 //
1954 virtual int GetNumTimeSteps(string varname) const;
1955
1967 //
1968 virtual std::vector<size_t> GetCRatios(string varname) const;
1969
1977 virtual bool IsDataVar(string varname) const
1978 {
1979 vector<string> names = GetDataVarNames();
1980 return (find(names.begin(), names.end(), varname) != names.end());
1981 }
1982
1991 virtual bool IsCoordVar(string varname) const
1992 {
1993 vector<string> names = GetCoordVarNames();
1994 return (find(names.begin(), names.end(), varname) != names.end());
1995 }
1996
2006 virtual bool IsAuxVar(string varname) const
2007 {
2008 vector<string> names = GetAuxVarNames();
2009 return (find(names.begin(), names.end(), varname) != names.end());
2010 }
2011
2029 //
2030 virtual bool GetVarCoordVars(string varname, bool spatial, std::vector<string> &coord_vars) const;
2031
2039 bool GetVarConnVars(string varname, string &face_node_var, string &node_face_var, string &face_edge_var, string &face_face_var, string &edge_node_var, string &edge_face_var) const;
2040
2052 virtual size_t GetNumDimensions(string varname) const;
2053
2058 std::vector<string> GetTimeCoordVarNames() const;
2059
2061 public:
2063 virtual ~FileTable();
2064
2066 public:
2067 FileObject() : _ts(0), _varname(""), _level(0), _lod(0), _slice(0), _aux(0) {}
2068
2069 FileObject(size_t ts, string varname, int level = 0, int lod = 0, int aux = 0) : _ts(ts), _varname(varname), _level(level), _lod(lod), _slice(0), _aux(aux) {}
2070
2071 size_t GetTS() const { return (_ts); }
2072 string GetVarname() const { return (_varname); }
2073 int GetLevel() const { return (_level); }
2074 int GetLOD() const { return (_lod); }
2075 int GetSlice() const { return (_slice); }
2076 void SetSlice(int slice) { _slice = slice; }
2077 int GetAux() const { return (_aux); }
2078
2079 private:
2080 size_t _ts;
2081 string _varname;
2082 int _level;
2083 int _lod;
2084 int _slice;
2085 int _aux;
2086 };
2087
2089 FileObject *GetEntry(int fd) const;
2090 void RemoveEntry(int fd);
2091 vector<int> GetEntries() const;
2092
2093 private:
2094 std::vector<FileTable::FileObject *> _table;
2095 };
2096
2097protected:
2099
2101 //
2102 virtual int initialize(const std::vector<string> &paths, const std::vector<string> &options = std::vector<string>()) = 0;
2103
2105 //
2106 virtual bool getDimension(string dimname, DC::Dimension &dimension) const = 0;
2107
2109 //
2110 virtual bool getDimension(string dimname, DC::Dimension &dimension, long ts) const { return getDimension(dimname, dimension); };
2111
2113 //
2114 virtual std::vector<string> getDimensionNames() const = 0;
2115
2117 //
2118 virtual std::vector<string> getMeshNames() const = 0;
2119
2121 //
2122 virtual bool getMesh(string mesh_name, DC::Mesh &mesh) const = 0;
2123
2125 //
2126 virtual bool getCoordVarInfo(string varname, DC::CoordVar &cvar) const = 0;
2127
2129 //
2130 virtual bool getDataVarInfo(string varname, DC::DataVar &datavar) const = 0;
2131
2133 //
2134 virtual bool getAuxVarInfo(string varname, DC::AuxVar &var) const = 0;
2135
2137 //
2138 virtual bool getBaseVarInfo(string varname, DC::BaseVar &var) const = 0;
2139
2141 //
2142 virtual std::vector<string> getDataVarNames() const = 0;
2143
2145 //
2146 virtual std::vector<string> getCoordVarNames() const = 0;
2147
2149 //
2150 virtual std::vector<string> getAuxVarNames() const = 0;
2151
2153 //
2154 virtual size_t getNumRefLevels(string varname) const = 0;
2155
2157 //
2158 virtual bool getAtt(string varname, string attname, vector<double> &values) const = 0;
2159
2161 //
2162 virtual bool getAtt(string varname, string attname, vector<long> &values) const = 0;
2163
2165 //
2166 virtual bool getAtt(string varname, string attname, string &values) const = 0;
2167
2169 //
2170 virtual std::vector<string> getAttNames(string varname) const = 0;
2171
2173 //
2174 virtual XType getAttType(string varname, string attname) const = 0;
2175
2177 //
2178 virtual vector<size_t> getBlockSize() const { return (vector<size_t>()); }
2179
2181 //
2182 virtual int getDimLensAtLevel(string varname, int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level) const = 0;
2183
2185 //
2186 virtual int getDimLensAtLevel(string varname, int level, std::vector<size_t> &dims_at_level, std::vector<size_t> &bs_at_level, long ts) const
2187 {
2188 return getDimLensAtLevel(varname, level, dims_at_level, bs_at_level);
2189 };
2190
2192 //
2193 virtual string getMapProjection() const = 0;
2194
2196 //
2197 virtual int openVariableRead(size_t ts, string varname, int level = 0, int lod = 0) = 0;
2198
2200 //
2201 virtual int closeVariable(int fd) = 0;
2202
2204 //
2205 virtual int readRegion(int fd, const vector<size_t> &min, const vector<size_t> &max, float *region) = 0;
2206
2207 virtual int readRegion(int fd, const vector<size_t> &min, const vector<size_t> &max, double *region) = 0;
2208
2209 virtual int readRegion(int fd, const vector<size_t> &min, const vector<size_t> &max, int *region) = 0;
2210
2212 //
2213 virtual bool variableExists(size_t ts, string varname, int reflevel = 0, int lod = 0) const = 0;
2214
2215private:
2216 virtual bool _getCoordVarDimensions(string varname, bool spatial, vector<DC::Dimension> &dimensions, long ts) const;
2217
2218 virtual bool _getDataVarDimensions(string varname, bool spatial, vector<DC::Dimension> &dimensions, long ts) const;
2219
2220 virtual bool _getAuxVarDimensions(string varname, vector<DC::Dimension> &dimensions, long ts) const;
2221
2222 vector<size_t> _getBlockSize() const;
2223
2224 virtual int _openVariableRead(size_t ts, string varname, int level = 0, int lod = 0);
2225
2226 virtual int _closeVariable(int fd);
2227
2228 template<class T> int _readSliceTemplate(int fd, T *slice);
2229
2230 template<class T> int _readTemplate(int fd, T *data);
2231
2232 template<class T> int _getVarTemplate(string varname, int level, int lod, T *data);
2233
2234 template<class T> int _getVarTemplate(size_t ts, string varname, int level, int lod, T *data);
2235};
2236}; // namespace VAPoR
2237
2238#endif
Variable or global metadata.
Definition: DC.h:677
void SetValues(const std::vector< double > &values)
Attribute(string name, XType type, const std::vector< double > &values)
void SetValues(const string &values)
VDF_API void GetValues(std::vector< double > &values) const
string GetName() const
Get attribute name.
Definition: DC.h:707
VDF_API void GetValues(std::vector< int > &values) const
Attribute(string name, XType type, const std::vector< long > &values)
Attribute(string name, XType type)
Definition: DC.h:697
void SetValues(const std::vector< long > &values)
VDF_API void GetValues(std::vector< float > &values) const
virtual ~Attribute()
Definition: DC.h:703
XType GetXType() const
Get an attribute's external representation type.
Definition: DC.h:711
void SetValues(const std::vector< float > &values)
VDF_API void GetValues(string &values) const
VDF_API void GetValues(std::vector< long > &values) const
Attribute(string name, XType type, const std::vector< int > &values)
Attribute(string name, XType type, const string &values)
void SetValues(const std::vector< int > &values)
Attribute(string name, XType type, const std::vector< float > &values)
friend std::ostream & operator<<(std::ostream &o, const Attribute &attr)
Auxiliary variable metadata.
Definition: DC.h:1230
void SetDimNames(std::vector< string > dim_names)
Definition: DC.h:1262
long GetOffset() const
Definition: DC.h:1268
virtual ~AuxVar()
Definition: DC.h:1257
void SetOffset(long offset)
Definition: DC.h:1269
AuxVar(string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, std::vector< string > dim_names)
Definition: DC.h:1252
VDF_API friend std::ostream & operator<<(std::ostream &o, const AuxVar &var)
std::vector< string > GetDimNames() const
Access Auxiliary variable dimension names.
Definition: DC.h:1261
Base class for storing variable metadata.
Definition: DC.h:754
void SetWName(string wname)
Definition: DC.h:830
void SetCRatios(std::vector< size_t > cratios)
Definition: DC.h:836
bool GetAttribute(string name, Attribute &att) const
Definition: DC.h:852
string GetUnits() const
Access variable units.
Definition: DC.h:819
void SetAttributes(std::map< string, Attribute > &atts)
Definition: DC.h:850
std::vector< size_t > GetCRatios() const
Access variable's compression ratios.
Definition: DC.h:834
string GetWName() const
Access variable's wavelet family name.
Definition: DC.h:829
XType GetXType() const
Access variable external storage type.
Definition: DC.h:824
void SetXType(XType type)
Definition: DC.h:825
void SetUnits(string units)
Definition: DC.h:820
string GetName() const
Get variable name.
Definition: DC.h:814
void SetName(string name)
Definition: DC.h:815
friend std::ostream & operator<<(std::ostream &o, const BaseVar &var)
BaseVar(string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic)
Definition: DC.h:784
const std::map< string, Attribute > & GetAttributes() const
Access variable attributes.
Definition: DC.h:849
void SetAttribute(const Attribute &att)
Definition: DC.h:860
bool IsCompressed() const
Return true if no wavelet is defined.
Definition: DC.h:864
std::vector< bool > GetPeriodic() const
Definition: DC.h:844
virtual ~BaseVar()
Definition: DC.h:810
void SetPeriodic(std::vector< bool > periodic)
Definition: DC.h:845
BaseVar(string name, string units, XType type, std::vector< bool > periodic)
Coordinate variable metadata.
Definition: DC.h:881
string GetTimeDimName() const
Definition: DC.h:960
void SetDimNames(std::vector< string > dim_names)
Definition: DC.h:955
void SetUniform(bool uniform)
Definition: DC.h:971
friend std::ostream & operator<<(std::ostream &o, const CoordVar &var)
bool GetUniform() const
Access coordinate variable uniform sampling flag.
Definition: DC.h:970
void SetTimeDimName(string time_dim_name)
Definition: DC.h:961
std::vector< string > GetDimNames() const
Definition: DC.h:954
CoordVar(string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, std::vector< string > dim_names, string time_dim_name, int axis, bool uniform)
Definition: DC.h:916
virtual ~CoordVar()
Definition: DC.h:949
void SetAxis(int axis)
Definition: DC.h:966
int GetAxis() const
Access coordinate variable axis.
Definition: DC.h:965
CoordVar(string name, string units, XType type, std::vector< bool > periodic, int axis, bool uniform, std::vector< string > dim_names, string time_dim_name)
Definition: DC.h:944
Data variable metadata.
Definition: DC.h:987
DataVar(string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value, string maskvar)
Definition: DC.h:1058
string GetMeshName() const
Definition: DC.h:1181
DataVar(string name, string units, XType type, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value, string maskvar)
Definition: DC.h:1151
double GetMissingValue() const
Access data variable's missing data value.
Definition: DC.h:1207
void SetMissingValue(double missing_value)
Definition: DC.h:1208
void SetHasMissing(bool has_missing)
Definition: DC.h:1203
DataVar(string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location)
Definition: DC.h:1087
Mesh::Location GetSamplingLocation() const
Definition: DC.h:1193
void SetMeshName(string mesh)
Definition: DC.h:1182
string GetTimeCoordVar() const
Definition: DC.h:1187
void SetTimeCoordVar(string time_coord_var)
Definition: DC.h:1188
DataVar(string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value)
Definition: DC.h:1023
bool GetHasMissing() const
Access data variable's missing data flag.
Definition: DC.h:1202
string GetMaskvar() const
Access data variable's mask variable names.
Definition: DC.h:1197
void SetMaskvar(string maskvar)
Definition: DC.h:1198
DataVar(string name, string units, XType type, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value)
Definition: DC.h:1115
virtual ~DataVar()
Definition: DC.h:1176
VDF_API friend std::ostream & operator<<(std::ostream &o, const DataVar &var)
DataVar(string name, string units, XType type, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location)
Definition: DC.h:1171
Metadata describing a named dimension length.
Definition: DC.h:163
friend std::ostream & operator<<(std::ostream &o, const Dimension &dimension)
size_t GetLength(size_t index) const
Definition: DC.h:211
bool IsTimeVarying() const
Definition: DC.h:217
Dimension(std::string name, std::vector< size_t > lengths)
Definition: DC.h:176
string GetName() const
Get dimension name.
Definition: DC.h:198
size_t GetLength() const
Definition: DC.h:204
virtual ~Dimension()
Definition: DC.h:194
Dimension(std::string name, size_t length)
Definition: DC.h:187
size_t GetTS() const
Definition: DC.h:2071
void SetSlice(int slice)
Definition: DC.h:2076
FileObject(size_t ts, string varname, int level=0, int lod=0, int aux=0)
Definition: DC.h:2069
string GetVarname() const
Definition: DC.h:2072
vector< int > GetEntries() const
FileObject * GetEntry(int fd) const
int AddEntry(FileObject *obj)
void RemoveEntry(int fd)
Metadata describing a computational mesh.
Definition: DC.h:310
size_t GetGeometryDim() const
Definition: DC.h:444
std::vector< string > GetDimNames() const
Definition: DC.h:425
void SetEdgeNodeVar(std::string edge_node_var)
Definition: DC.h:534
Location
Location of sampled data variables within the mesh.
Definition: DC.h:323
@ FACE
Samples located at mesh face centers.
Definition: DC.h:326
@ NODE
Samples located at mesh nodes.
Definition: DC.h:324
@ EDGE
Samples located at mesh edge centers.
Definition: DC.h:325
string GetFaceDimName() const
Definition: DC.h:472
std::string GetEdgeDimName() const
Definition: DC.h:522
size_t GetTopologyDim() const
void SetEdgeFaceVar(std::string edge_face_var)
Definition: DC.h:620
Mesh(std::string name, int max_nodes_per_face, int max_faces_per_node, std::string node_dim_name, std::string face_dim_name, std::vector< string > coord_vars)
void SetEdgeDimName(std::string edge_dim_name)
Definition: DC.h:510
size_t GetMaxNodesPerFace() const
Definition: DC.h:451
string GetLayersDimName() const
Definition: DC.h:479
Mesh(std::string name, size_t max_nodes_per_face, size_t max_faces_per_node, std::string node_dim_name, std::string face_dim_name, std::vector< std::string > coord_vars, std::string face_node_var, std::string node_face_var)
std::vector< string > GetCoordVars() const
Definition: DC.h:432
Mesh::Type GetMeshType() const
Definition: DC.h:407
string GetName() const
Get mesh name.
Definition: DC.h:411
Type
Type of mesh.
Definition: DC.h:314
@ UNSTRUC_2D
An unstructured mesh with 2D topology.
Definition: DC.h:316
@ UNSTRUC_LAYERED
An unstructured layered mesh.
Definition: DC.h:317
@ STRUCTURED
A structured mesh.
Definition: DC.h:315
void SetFaceEdgeVar(std::string face_edge_var)
Definition: DC.h:563
static string MakeMeshName(std::vector< string > s)
std::string GetFaceFaceVar() const
Definition: DC.h:603
void SetFaceFaceVar(std::string face_face_var)
Definition: DC.h:592
std::string GetEdgeFaceVar() const
Definition: DC.h:631
void SetFaceNodeVar(std::string face_node_var)
Definition: DC.h:486
Mesh(std::string name, size_t max_nodes_per_face, size_t max_faces_per_node, std::string node_dim_name, std::string face_dim_name, std::string layers_dim_name, std::vector< std::string > coord_vars, std::string face_node_var, std::string node_face_var)
string GetFaceNodeVar() const
Definition: DC.h:485
std::string GetEdgeNodeVar() const
Definition: DC.h:545
void SetNodeFaceVar(std::string node_face_var)
Definition: DC.h:497
friend std::ostream & operator<<(std::ostream &o, const Mesh &mesh)
void SetCoordVars(std::vector< string > coord_vars)
Definition: DC.h:433
string GetNodeFaceVar() const
Definition: DC.h:496
size_t GetMaxFacesPerNode() const
Definition: DC.h:458
string GetNodeDimName() const
Definition: DC.h:465
std::string GetFaceEdgeVar() const
Definition: DC.h:574
Mesh(std::string name, std::vector< string > dim_names, std::vector< string > coord_vars)
A Template Method design pattern for reading a collection of data.
Definition: DC.h:150
virtual int OpenVariableRead(size_t ts, string varname, int level=0, int lod=0)
Definition: DC.h:1606
virtual int GetDimLens(string varname, std::vector< size_t > &dims, long ts=-1)
Definition: DC.h:1550
virtual int GetVar(string varname, int level, int lod, float *data)
Definition: DC.h:1716
XType
External storage types for primitive data.
Definition: DC.h:154
@ DOUBLE
Definition: DC.h:154
virtual int ReadRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, float *region)
Definition: DC.h:1687
virtual bool VariableExists(size_t ts, string varname, int reflevel=0, int lod=0) const
Definition: DC.h:1764
virtual int openVariableRead(size_t ts, string varname, int level=0, int lod=0)=0
virtual size_t GetNumDimensions(string varname) const
virtual bool variableExists(size_t ts, string varname, int reflevel=0, int lod=0) const =0
virtual int GetHyperSliceInfo(string varname, int level, std::vector< size_t > &dims, size_t &nslice, long ts=-1)
virtual int Read(int fd, double *data)
Definition: DC.h:1635
virtual int ReadSlice(int fd, int *slice)
Definition: DC.h:1661
virtual std::vector< string > GetDataVarNames(int ndim) const
virtual int Initialize(const std::vector< string > &paths, const std::vector< string > &options=std::vector< string >())
Definition: DC.h:1302
virtual bool IsTimeVarying(string varname) const
virtual XType GetAttType(string varname, string attname) const
Definition: DC.h:1508
virtual std::vector< string > GetDataVarNames() const
Definition: DC.h:1422
bool GetVarConnVars(string varname, string &face_node_var, string &node_face_var, string &face_edge_var, string &face_face_var, string &edge_node_var, string &edge_face_var) const
virtual std::vector< string > getAuxVarNames() const =0
virtual size_t getNumRefLevels(string varname) const =0
virtual bool IsDataVar(string varname) const
Definition: DC.h:1977
virtual bool GetVarCoordVars(string varname, bool spatial, std::vector< string > &coord_vars) const
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)=0
virtual std::vector< size_t > GetCRatios(string varname) const
virtual bool GetAtt(string varname, string attname, vector< long > &values) const
Definition: DC.h:1478
virtual int getDimLensAtLevel(string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts) const
Definition: DC.h:2186
virtual std::vector< string > GetCoordVarNames() const
Definition: DC.h:1430
virtual bool GetBaseVarInfo(string varname, DC::BaseVar &var) const
Definition: DC.h:1414
virtual int ReadRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, double *region)
Definition: DC.h:1688
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, float *region)=0
virtual bool IsCompressed(string varname) const
virtual XType getAttType(string varname, string attname) const =0
virtual bool GetCoordVarInfo(string varname, DC::CoordVar &cvar) const
Definition: DC.h:1374
virtual bool GetMeshDimNames(const string &mesh_name, std::vector< string > &dimnames) const
virtual bool getDataVarInfo(string varname, DC::DataVar &datavar) const =0
virtual bool getCoordVarInfo(string varname, DC::CoordVar &cvar) const =0
virtual ~DC()
Definition: DC.h:1283
virtual int getDimLensAtLevel(string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level) const =0
virtual int initialize(const std::vector< string > &paths, const std::vector< string > &options=std::vector< string >())=0
virtual int ReadSlice(int fd, double *slice)
Definition: DC.h:1660
virtual bool getMesh(string mesh_name, DC::Mesh &mesh) const =0
virtual bool IsCoordVar(string varname) const
Definition: DC.h:1991
virtual bool getBaseVarInfo(string varname, DC::BaseVar &var) const =0
virtual std::vector< string > getMeshNames() const =0
virtual bool GetDimension(string dimname, DC::Dimension &dimension, long ts) const
Definition: DC.h:1315
virtual std::vector< string > getDimensionNames() const =0
virtual int GetVar(size_t ts, string varname, int level, int lod, double *data)
Definition: DC.h:1748
virtual bool GetDataVarInfo(string varname, DC::DataVar &datavar) const
Definition: DC.h:1388
virtual size_t GetVarTopologyDim(string varname) const
virtual std::vector< string > getDataVarNames() const =0
virtual bool getAtt(string varname, string attname, string &values) const =0
virtual bool GetVarDimensions(string varname, bool spatial, vector< DC::Dimension > &dimensions, long ts) const
virtual string GetMapProjection() const
Definition: DC.h:1570
virtual bool GetVarDimLens(string varname, bool spatial, vector< size_t > &dimlens, long ts=-1) const
virtual size_t GetNumRefLevels(string varname) const
Definition: DC.h:1455
virtual std::vector< string > GetDimensionNames() const
Definition: DC.h:1322
virtual bool getAuxVarInfo(string varname, DC::AuxVar &var) const =0
virtual int closeVariable(int fd)=0
virtual bool GetMeshDimLens(const string &mesh_name, std::vector< size_t > &dims, long ts=-1) const
virtual bool IsAuxVar(string varname) const
Definition: DC.h:2006
virtual std::vector< string > getAttNames(string varname) const =0
virtual bool GetVarDimLens(string varname, vector< size_t > &sdimlens, size_t &time_dimlen, long ts=-1) const
virtual int GetNumTimeSteps(string varname) const
virtual bool getAtt(string varname, string attname, vector< double > &values) const =0
virtual int Read(int fd, float *data)
Definition: DC.h:1634
virtual int CloseVariable(int fd)
Definition: DC.h:1615
virtual bool getDimension(string dimname, DC::Dimension &dimension) const =0
std::vector< string > GetTimeCoordVarNames() const
DC::FileTable _fileTable
Definition: DC.h:2098
virtual int ReadSlice(int fd, float *slice)
Definition: DC.h:1659
virtual int readRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, double *region)=0
virtual bool GetVarDimNames(string varname, bool spatial, vector< string > &dimnames) const
virtual size_t GetVarGeometryDim(string varname) const
virtual bool getDimension(string dimname, DC::Dimension &dimension, long ts) const
Definition: DC.h:2110
virtual std::vector< string > GetMeshNames() const
Definition: DC.h:1329
virtual std::vector< string > GetAuxVarNames() const
Definition: DC.h:1438
virtual int GetVar(size_t ts, string varname, int level, int lod, int *data)
Definition: DC.h:1749
virtual int ReadRegion(int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)
Definition: DC.h:1689
virtual std::vector< string > GetAttNames(string varname) const
Definition: DC.h:1495
virtual string getMapProjection() const =0
virtual vector< size_t > getBlockSize() const
Definition: DC.h:2178
virtual int GetVar(string varname, int level, int lod, int *data)
Definition: DC.h:1718
virtual bool GetVarDimNames(string varname, vector< string > &sdimnames, string &time_dimname) const
virtual bool GetAuxVarInfo(string varname, DC::AuxVar &var) const
Definition: DC.h:1401
virtual bool GetAtt(string varname, string attname, vector< double > &values) const
Definition: DC.h:1476
virtual int GetVar(string varname, int level, int lod, double *data)
Definition: DC.h:1717
virtual int GetVar(size_t ts, string varname, int level, int lod, float *data)
Definition: DC.h:1747
virtual int Read(int fd, int *data)
Definition: DC.h:1636
virtual bool GetMesh(string mesh_name, DC::Mesh &mesh) const
Definition: DC.h:1340
virtual int GetDimLensAtLevel(string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts=-1) const
Definition: DC.h:1540
virtual bool GetAtt(string varname, string attname, string &values) const
Definition: DC.h:1480
virtual bool getAtt(string varname, string attname, vector< long > &values) const =0
virtual std::vector< string > getCoordVarNames() const =0
Wasp base class.
Definition: MyBase.h:67
#define VDF_API
Definition: common.h:73