VAPoR  0.1
DataMgrROMS.h
Go to the documentation of this file.
1 #include <vector>
2 #include <string>
3 #include <vapor/DCReaderROMS.h>
4 #include <vapor/DataMgr.h>
5 #include <vapor/common.h>
6 
7 #ifndef _DataMgrROMS_h_
8 #define _DataMgrROMS_h_
9 
10 namespace VAPoR {
11 
12 //
19 //
21 
22 public:
23 
25  const vector <string> &files,
26  size_t mem_size
27  );
28 
29 
30  virtual ~DataMgrROMS() { };
31 
32 protected:
33 
34 
35  //
36  // Metadata methods
37  //
38 
39  virtual void _GetDim(size_t dim[3], int ) const {
40  return(DCReaderROMS::GetGridDim(dim));
41  };
42 
43  virtual void _GetBlockSize(size_t bs[3], int reflevel) const {
44  return(DCReaderROMS::GetGridDim(bs));
45  }
46 
47  virtual int _GetNumTransforms() const {
48  return(0);
49  };
50 
51  virtual string _GetGridType() const {
52  return(DCReaderROMS::GetGridType());
53  }
54 
55  virtual vector<double> _GetExtents(size_t ) const {
56  return(DCReaderROMS::GetExtents());
57  };
58 
59  virtual long _GetNumTimeSteps() const {
61  };
62 
63  virtual string _GetMapProjection() const {
65  };
66 
67  virtual vector <string> _GetVariables3D() const {
69  };
70 
71  virtual vector <string> _GetVariables2DXY() const {
73  };
74 
75  virtual vector <string> _GetVariables2DXZ() const {
77  };
78 
79  virtual vector <string> _GetVariables2DYZ() const {
81  };
82 
83  virtual vector<long> _GetPeriodicBoundary() const {
85  };
86 
87  virtual vector<long> _GetGridPermutation() const {
89  };
90 
91  virtual double _GetTSUserTime(size_t ts) const {
92  return(DCReaderROMS::GetTSUserTime(ts));
93  };
94 
95  virtual void _GetTSUserTimeStamp(size_t ts, string &s) const {
97  }
98 
99  virtual int _VariableExists(
100  size_t ts,
101  const char *varname,
102  int reflevel = 0,
103  int lod = 0
104  ) const {
105  return (DCReaderROMS::VariableExists(ts,varname));
106  };
107 
108 
109  virtual int _OpenVariableRead(
110  size_t timestep,
111  const char *varname,
112  int,
113  int
114  ) {
115  return(DCReaderROMS::OpenVariableRead(timestep, varname));
116  };
117 
118  virtual const float *_GetDataRange() const {
119  return(NULL); // Not implemented. Let DataMgr figure it out
120  }
121 
122  virtual void _GetValidRegion(
123  size_t min[3], size_t max[3], int
124  ) const {
125  size_t dim[3]; DCReaderROMS::GetGridDim(dim);
126  min[0] = min[1] = min[2] = 0;
127  max[0] = dim[0]-1; max[1] = dim[1]-1; max[2] = dim[2]-1;
128  };
129 
130  virtual bool _GetMissingValue(string varname, float &value) const {
131  return(DCReaderROMS::GetMissingValue(varname, value));
132  };
133 
134 
135  virtual int _BlockReadRegion(
136  const size_t *, const size_t *, float *region
137  ) {
138  return(DCReaderROMS::Read(region));
139  };
140 
141  virtual int _CloseVariable() {
142  return (DCReaderROMS::CloseVariable());
143  };
144 
145 };
146 
147 };
148 
149 #endif // _DataMgrROMS_h_
virtual string _GetMapProjection() const
Definition: DataMgrROMS.h:63
double GetTSUserTime(size_t ts) const
virtual void GetGridDim(size_t dim[3]) const
Definition: DCReaderROMS.h:36
virtual vector< string > _GetVariables2DXZ() const
Definition: DataMgrROMS.h:75
virtual int _VariableExists(size_t ts, const char *varname, int reflevel=0, int lod=0) const
Definition: DataMgrROMS.h:99
bool GetMissingValue(string varname, float &value) const
virtual int CloseVariable()
#define VDF_API
Definition: common.h:61
A cache based data reader.
Definition: DataMgr.h:39
long GetNumTimeSteps() const
Definition: DCReaderROMS.h:58
virtual int _CloseVariable()
Definition: DataMgrROMS.h:141
virtual string GetMapProjection() const
virtual int _OpenVariableRead(size_t timestep, const char *varname, int, int)
Definition: DataMgrROMS.h:109
virtual std::vector< string > GetVariables2DYZ() const
Definition: DCReaderROMS.h:77
virtual vector< long > _GetGridPermutation() const
Definition: DataMgrROMS.h:87
virtual long _GetNumTimeSteps() const
Definition: DataMgrROMS.h:59
virtual string GetGridType() const
Definition: DCReaderROMS.h:44
virtual int OpenVariableRead(size_t timestep, string varname, int reflevel=0, int lod=0)
virtual int Read(float *data)
virtual string _GetGridType() const
Definition: DataMgrROMS.h:51
void GetTSUserTimeStamp(size_t ts, string &s) const
virtual void _GetBlockSize(size_t bs[3], int reflevel) const
Definition: DataMgrROMS.h:43
virtual void _GetDim(size_t dim[3], int) const
Definition: DataMgrROMS.h:39
virtual std::vector< double > GetExtents(size_t ts=0) const
Definition: DCReaderROMS.h:53
virtual std::vector< long > GetGridPermutation() const
Definition: DCReaderROMS.h:111
virtual std::vector< string > GetVariables2DXZ() const
Definition: DCReaderROMS.h:73
virtual bool _GetMissingValue(string varname, float &value) const
Definition: DataMgrROMS.h:130
virtual std::vector< string > GetVariables3D() const
Definition: DCReaderROMS.h:64
virtual ~DataMgrROMS()
Definition: DataMgrROMS.h:30
virtual void _GetValidRegion(size_t min[3], size_t max[3], int) const
Definition: DataMgrROMS.h:122
virtual const float * _GetDataRange() const
Definition: DataMgrROMS.h:118
virtual bool VariableExists(size_t ts, string varname, int i0=0, int i1=0) const
Definition: DCReaderROMS.h:136
virtual vector< string > _GetVariables3D() const
Definition: DataMgrROMS.h:67
virtual double _GetTSUserTime(size_t ts) const
Definition: DataMgrROMS.h:91
virtual vector< double > _GetExtents(size_t) const
Definition: DataMgrROMS.h:55
virtual vector< string > _GetVariables2DXY() const
Definition: DataMgrROMS.h:71
virtual void _GetTSUserTimeStamp(size_t ts, string &s) const
Definition: DataMgrROMS.h:95
virtual std::vector< long > GetPeriodicBoundary() const
Definition: DCReaderROMS.h:105
virtual vector< string > _GetVariables2DYZ() const
Definition: DataMgrROMS.h:79
virtual std::vector< string > GetVariables2DXY() const
Definition: DCReaderROMS.h:68
A cache based data reader.
Definition: DataMgrROMS.h:20
virtual vector< long > _GetPeriodicBoundary() const
Definition: DataMgrROMS.h:83
virtual int _BlockReadRegion(const size_t *, const size_t *, float *region)
Definition: DataMgrROMS.h:135
virtual int _GetNumTransforms() const
Definition: DataMgrROMS.h:47