VAPoR  0.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VAPoR::DataMgrWC Class Reference

A cache based data reader. More...

#include <DataMgrWC.h>

Inheritance diagram for VAPoR::DataMgrWC:
VAPoR::DataMgr VAPoR::WaveCodecIO VetsUtil::MyBase VAPoR::VDFIOBase VetsUtil::EasyThreads VAPoR::MetadataVDC VetsUtil::MyBase VAPoR::Metadata VetsUtil::MyBase VAPoR::ParsedXml

Public Member Functions

 DataMgrWC (const string &metafile, size_t mem_size)
 
 DataMgrWC (const MetadataVDC &metadata, size_t mem_size)
 
virtual ~DataMgrWC ()
 
- Public Member Functions inherited from VAPoR::DataMgr
 DataMgr (size_t mem_size)
 
virtual ~DataMgr ()
 
virtual void GetDim (size_t dim[3], int reflevel=0) const
 
int GetNumTransforms () const
 
virtual vector< size_t > GetCRatios () const
 
virtual string GetCoordSystemType () const
 
virtual string GetGridType () const
 
virtual vector< double > GetExtents (size_t ts=0)
 
virtual long GetNumTimeSteps () const
 
virtual string GetMapProjection () const
 
virtual vector< string > GetVariableNames () const
 
virtual vector< string > GetVariables3D () const
 
virtual vector< string > GetVariables2DXY () const
 
virtual vector< string > GetVariables2DXZ () const
 
virtual vector< string > GetVariables2DYZ () const
 
virtual vector< string > GetCoordinateVariables () const
 
virtual vector< long > GetPeriodicBoundary () const
 
virtual vector< long > GetGridPermutation () const
 
virtual double GetTSUserTime (size_t ts) const
 
virtual void GetTSUserTimeStamp (size_t ts, string &s) const
 
virtual RegularGridGetGrid (size_t ts, string varname, int reflevel, int lod, const size_t min[3], const size_t max[3], bool lock=false)
 
void UnlockGrid (const RegularGrid *rg)
 
int UnlockRegion (const float *)
 
void Clear ()
 
int GetDataRange (size_t ts, const char *varname, float range[2], int reflevel=0, int lod=0)
 
int GetValidRegion (size_t ts, const char *varname, int reflevel, size_t min[3], size_t max[3])
 
virtual int VariableExists (size_t ts, const char *varname, int reflevel=0, int lod=0)
 
bool BestMatch (size_t ts, const char *varname, int req_reflevel, int req_lod, int &reflevel, int &lod)
 
int NewPipeline (PipeLine *pipeline)
 
void RemovePipeline (string name)
 
bool IsVariableDerived (string varname) const
 
bool IsVariableNative (string varname) const
 
virtual VarType_T GetVarType (const string &varname) const
 
bool GetMissingValue (string varname, float &value) const
 
void PurgeVariable (string varname)
 
virtual void MapUserToVox (size_t timestep, const double vcoord0[3], size_t vcoord1[3], int reflevel=0, int lod=0)
 
virtual void MapVoxToUser (size_t timestep, const size_t vcoord0[3], double vcoord1[3], int ref_level=0, int lod=0)
 
virtual void GetEnclosingRegion (size_t ts, const double minu[3], const double maxu[3], size_t min[3], size_t max[3], int reflevel=0, int lod=0)
 
virtual bool IsCoordinateVariable (string varname) const
 
void PrintCache (std::ostream &o)
 
void SetInterpolationOrder (int order)
 
int GetInterpolationOrder () const
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 
- Public Member Functions inherited from VAPoR::WaveCodecIO
 WaveCodecIO (const MetadataVDC &metadata, int nthreads=0)
 
 WaveCodecIO (const string &metafile, int nthreads=0)
 
virtual ~WaveCodecIO ()
 
virtual int OpenVariableRead (size_t timestep, const char *varname, int reflevel=0, int lod=0)
 
virtual int OpenVariableWrite (size_t timestep, const char *varname, int reflevel=-1, int lod=-1)
 
virtual int CloseVariable ()
 
virtual int BlockReadRegion (const size_t bmin[3], const size_t bmax[3], float *region, bool unblock=true)
 
virtual int ReadRegion (const size_t min[3], const size_t max[3], float *region)
 
virtual int ReadRegion (float *region)
 
virtual int ReadSlice (float *slice)
 
virtual int BlockWriteRegion (const float *region, const size_t bmin[3], const size_t bmax[3], bool block=true)
 
virtual int WriteRegion (const float *region, const size_t min[3], const size_t max[3])
 
virtual int WriteRegion (const float *region)
 
virtual int WriteSlice (const float *slice)
 
virtual void SetBoundaryPadOnOff (bool pad)
 
const float * GetDataRange () const
 
void GetValidRegion (size_t min[3], size_t max[3], int reflevel) const
 
virtual int VariableExists (size_t ts, const char *varname, int reflevel=0, int lod=0) const
 
virtual int GetNumTransforms () const
 
virtual void GetBlockSize (size_t bs[3], int reflevel) const
 
void SetCollectiveIO (bool newCollectiveIO)
 
int getNumThread ()
 
void EnableBuffering (size_t count[3], size_t divisor, int rank)
 
- Public Member Functions inherited from VAPoR::VDFIOBase
 VDFIOBase (const MetadataVDC &metadata)
 
 VDFIOBase (const string &metafile)
 
virtual ~VDFIOBase ()
 
double GetReadTimer () const
 
double GetSeekTimer () const
 
void SeekTimerReset ()
 
void SeekTimerStart ()
 
void SeekTimerStop ()
 
double GetWriteTimer () const
 
double GetXFormTimer () const
 
- Public Member Functions inherited from VAPoR::MetadataVDC
 MetadataVDC (const size_t dim[3], size_t numTransforms, const size_t bs[3], int nFilterCoef=1, int nLiftingCoef=1, int msbFirst=1, int vdfVersion=VDF_VERSION)
 
 MetadataVDC (const size_t dim[3], const size_t bs[3], const vector< size_t > &cratios, string wname, string wmode)
 
 MetadataVDC (const string &metafile)
 
 MetadataVDC (const MetadataVDC &node)
 
virtual ~MetadataVDC ()
 
int Merge (const MetadataVDC &metadata, size_t ts=0)
 
int Merge (const string &path, size_t ts=0)
 
int MakeCurrent () const
 
const string & GetParentDir () const
 
const string & GetMetafileName () const
 
const string & GetDataDirName () const
 
int ConstructFullVBase (size_t ts, const string &var, string *path) const
 
int ConstructFullAuxBase (size_t ts, string *path) const
 
int Write (const string &path, int relative_path=1)
 
virtual const size_t * GetBlockSize () const
 
virtual void GetGridDim (size_t dim[3]) const
 
const size_t * GetDimension () const
 
int GetFilterCoef () const
 
int GetLiftingCoef () const
 
int GetMSBFirst () const
 
int GetVDFVersion () const
 
string GetWaveName () const
 
string GetBoundaryMode () const
 
virtual vector< size_t > GetCRatios () const
 
int GetVDCType () const
 
int SetGridType (const string &value)
 
string GetGridType () const
 
int IsValidGridType (const string &value) const
 
int SetCoordSystemType (const string &value)
 
string GetCoordSystemType () const
 
int IsValidCoordSystemType (const string &value) const
 
int SetExtents (const vector< double > &value)
 
vector< double > GetExtents (size_t ts=0) const
 
int IsValidExtents (const vector< double > &value) const
 
int SetNumTimeSteps (long value)
 
long GetNumTimeSteps () const
 
int IsValidTimeStep (long value) const
 
int SetVariableNames (const vector< string > &value)
 
int SetVariables3D (const vector< string > &value)
 
vector< string > GetVariables3D () const
 
vector< string > GetCoordinateVariables () const
 
int SetCoordinateVariables (const vector< string > &value)
 
int SetVariables2DXY (const vector< string > &value)
 
int SetVariables2DXZ (const vector< string > &value)
 
int SetVariables2DYZ (const vector< string > &value)
 
vector< string > GetVariables2DXY () const
 
vector< string > GetVariables2DXZ () const
 
vector< string > GetVariables2DYZ () const
 
int SetComment (const string &value)
 
string GetComment () const
 
int SetPeriodicBoundary (const vector< long > &value)
 
vector< long > GetPeriodicBoundary () const
 
int SetGridPermutation (const vector< long > &value)
 
int SetMissingValue (double value)
 
int SetMissingValue ()
 
vector< double > GetMissingValue () const
 
vector< long > GetGridPermutation () const
 
int SetMapProjection (const string &value)
 
virtual string GetMapProjection () const
 
int SetTSUserTime (size_t ts, const vector< double > &value)
 
double GetTSUserTime (size_t ts) const
 
int SetTSUserTimeStamp (size_t ts, const string &s)
 
void GetTSUserTimeStamp (size_t ts, string &s) const
 
string GetTSAuxBasePath (size_t ts) const
 
int HasTSUserTime (size_t ts) const
 
int IsValidUserTime (const vector< double > &value) const
 
int SetTSXCoords (size_t ts, const vector< double > &value)
 
vector< double > GetTSXCoords (size_t ts) const
 
int SetTSYCoords (size_t ts, const vector< double > &value)
 
vector< double > GetTSYCoords (size_t ts) const
 
int SetTSZCoords (size_t ts, const vector< double > &value)
 
vector< double > GetTSZCoords (size_t ts) const
 
int SetTSComment (size_t ts, const string &value)
 Set a comment for the time step indicated by ts. More...
 
string GetTSComment (size_t ts) const
 Return the comment for the indicated time step, ts, if it exists. More...
 
int SetTSExtents (size_t ts, const vector< double > &value)
 
vector< double > GetTSExtents (size_t ts) const
 
int SetTSMissingValue (size_t ts, double v)
 
vector< double > GetTSMissingValue (size_t ts) const
 Returns the time-varying missing value, if any. More...
 
int SetVComment (size_t ts, const string &var, const string &value)
 
string GetVComment (size_t ts, const string &var) const
 
string GetVBasePath (size_t ts, const string &var) const
 
int SetVBasePath (size_t ts, const string &var, const string &value)
 
int SetVDataRange (size_t ts, const string &var, const vector< double > &value)
 
vector< double > GetVDataRange (size_t ts, const string &var) const
 
int IsValidVDataRange (const vector< double > &value) const
 
int SetVMissingValue (size_t ts, const string &var, double v)
 
vector< double > GetVMissingValue (size_t ts, const string &var) const
 
vector< string > GetUserDataLongTags () const
 
int SetUserDataLong (const string &tag, const vector< long > &value)
 
vector< long > GetUserDataLong (const string &tag) const
 
vector< string > GetUserDataDoubleTags () const
 
int SetUserDataDouble (const string &tag, const vector< double > &value)
 
vector< double > GetUserDataDouble (const string &tag) const
 
vector< string > GetUserDataStringTags () const
 
int SetUserDataString (const string &tag, const string &value)
 
string GetUserDataString (const string &tag) const
 
int SetUserDataStringVec (const string &tag, const vector< string > &value)
 
vector< string > GetUserDataStringVec (const string &tag) const
 
vector< string > GetTSUserDataLongTags () const
 
int SetTSUserDataLong (size_t ts, const string &tag, const vector< long > &value)
 
vector< long > GetTSUserDataLong (size_t ts, const string &tag) const
 
int SetTSUserDataDouble (size_t ts, const string &tag, const vector< double > &value)
 
vector< double > GetTSUserDataDouble (size_t ts, const string &tag) const
 
vector< string > GetTSUserDataDoubleTags () const
 
int SetTSUserDataString (size_t ts, const string &tag, const string &value)
 
string GetTSUserDataString (size_t ts, const string &tag) const
 
vector< string > GetTSUserDataStringTags () const
 
vector< string > GetVUserDataLongTags () const
 
int SetVUserDataLong (size_t ts, const string &var, const string &tag, const vector< long > &value)
 
vector< long > GetVUserDataLong (size_t ts, const string &var, const string &tag) const
 
vector< string > GetVUserDataDoubleTags () const
 
int SetVUserDataDouble (size_t ts, const string &var, const string &tag, const vector< double > &value)
 
vector< double > GetVUserDataDouble (size_t ts, const string &var, const string &tag) const
 
int SetVUserDataString (size_t ts, const string &var, const string &tag, const string &value)
 
string GetVUserDataString (size_t ts, const string &var, const string &tag) const
 
vector< string > GetVUserDataStringTags () const
 
- Public Member Functions inherited from VAPoR::ParsedXml
virtual ~ParsedXml ()
 
virtual bool charHandler (ExpatParseMgr *, const XML_Char *, int)
 

Protected Member Functions

virtual void _GetDim (size_t dim[3], int reflevel) const
 
virtual void _GetBlockSize (size_t bs[3], int reflevel) const
 
virtual int _GetNumTransforms () const
 
virtual vector< size_t > _GetCRatios () const
 
virtual string _GetCoordSystemType () const
 
virtual string _GetGridType () const
 
virtual vector< double > _GetExtents (size_t ts) const
 
virtual vector< double > _GetTSXCoords (size_t ts) const
 
virtual vector< double > _GetTSYCoords (size_t ts) const
 
virtual vector< double > _GetTSZCoords (size_t ts) const
 
virtual long _GetNumTimeSteps () const
 
virtual string _GetMapProjection () const
 
virtual vector< string > _GetVariables3D () const
 
virtual vector< string > _GetVariables2DXY () const
 
virtual vector< string > _GetVariables2DXZ () const
 
virtual vector< string > _GetVariables2DYZ () const
 
virtual vector< string > _GetCoordinateVariables () const
 
virtual vector< long > _GetPeriodicBoundary () const
 
virtual vector< long > _GetGridPermutation () const
 
virtual double _GetTSUserTime (size_t ts) const
 
virtual void _GetTSUserTimeStamp (size_t ts, string &s) const
 
virtual int _VariableExists (size_t ts, const char *varname, int reflevel=0, int lod=0) const
 
virtual int _OpenVariableRead (size_t timestep, const char *varname, int reflevel=0, int lod=0)
 
virtual void _GetValidRegion (size_t min[3], size_t max[3], int reflevel) const
 
virtual const float * _GetDataRange () const
 
virtual bool _GetMissingValue (string varname, float &value) const
 
virtual int _BlockReadRegion (const size_t bmin[3], const size_t bmax[3], float *region)
 
virtual int _CloseVariable ()
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 
- Protected Member Functions inherited from VAPoR::VDFIOBase
void _ReadTimerReset ()
 
void _ReadTimerStart ()
 
void _ReadTimerStop ()
 
void _WriteTimerReset ()
 
void _WriteTimerStart ()
 
void _WriteTimerStop ()
 
void _XFormTimerReset ()
 
void _XFormTimerStart ()
 
void _XFormTimerStop ()
 
int _MaskOpenWrite (size_t timestep, string varname, int reflevel)
 
int _MaskOpenRead (size_t timestep, string varname, int reflevel)
 
int _MaskClose ()
 
int _MaskWrite (const float *srcblk, const size_t bmin_p[3], const size_t bmax_p[3], bool block)
 
int _MaskRead (const size_t bmin_p[3], const size_t bmax_p[3])
 
void _MaskRemove (float *blk, bool &valid_data) const
 
void _MaskReplace (size_t bx, size_t by, size_t bz, float *blk) const
 
- Protected Member Functions inherited from VetsUtil::EasyThreads
 EasyThreads (int nthreads)
 
 ~EasyThreads ()
 
int ParRun (void *(*start)(void *), std::vector< void * > arg)
 
int ParRun (void *(*start)(void *), void **arg)
 
int Barrier ()
 
int MutexLock ()
 
int MutexUnlock ()
 
int GetNumThreads () const
 

Protected Attributes

size_t _ts
 
string _varname
 
- Protected Attributes inherited from VAPoR::DataMgr
const vector< string > emptyVec
 

Additional Inherited Members

- Public Types inherited from VAPoR::DataMgr
enum  VarType_T {
  VARUNKNOWN = -1, VAR3D, VAR2D_XY, VAR2D_XZ,
  VAR2D_YZ
}
 
- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message. More...
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
- Static Public Member Functions inherited from VAPoR::WaveCodecIO
static size_t GetMaxCRatio (const size_t bs[3], string wavename, string wmode)
 
- Public Attributes inherited from VAPoR::WaveCodecIO
int _nthreads
 
- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 
- Static Public Attributes inherited from VetsUtil::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 
- Static Protected Member Functions inherited from VAPoR::VDFIOBase
static void _UnpackCoord (VarType_T vtype, const size_t src[3], size_t dst[3], size_t fill)
 
static void _PackCoord (VarType_T vtype, const size_t src[3], size_t dst[3], size_t fill)
 
static void _FillPackedCoord (VarType_T vtype, const size_t src[3], size_t dst[3], size_t fill)
 
- Static Protected Member Functions inherited from VetsUtil::EasyThreads
static void Decompose (int n, int size, int rank, int *offset, int *length)
 
static int NProc ()
 
- Static Protected Attributes inherited from VAPoR::ParsedXml
static const string _stringType
 
static const string _longType
 
static const string _doubleType
 
static const string _typeAttr
 

Detailed Description

A cache based data reader.

Author
John Clyne
Version
$Revision$
Date
$Date$

This class provides a wrapper to the WaveCodecIO() classes that includes a memory cache. Data regions read from disk through this interface are stored in a cache in main memory, where they may be be available for future access without reading from disk.

Definition at line 30 of file DataMgrWC.h.

Constructor & Destructor Documentation

VAPoR::DataMgrWC::DataMgrWC ( const string &  metafile,
size_t  mem_size 
)
VAPoR::DataMgrWC::DataMgrWC ( const MetadataVDC metadata,
size_t  mem_size 
)
virtual VAPoR::DataMgrWC::~DataMgrWC ( )
inlinevirtual

Definition at line 45 of file DataMgrWC.h.

Member Function Documentation

virtual int VAPoR::DataMgrWC::_BlockReadRegion ( const size_t  bmin[3],
const size_t  bmax[3],
float *  region 
)
inlineprotectedvirtual

Read in and return a subregion from the currently opened multiresolution data volume.

The dimensions of the region are provided in block coordinates. However, the returned region is not blocked.

Parameters
[in]bminMinimum region extents in block coordinates
[in]bmaxMaximum region extents in block coordinates
[out]regionThe requested volume subregion
Return values
statusReturns a non-negative value on success
See also
_OpenVariableRead(), _GetBlockSize()

Implements VAPoR::DataMgr.

Definition at line 172 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::BlockReadRegion().

virtual int VAPoR::DataMgrWC::_CloseVariable ( )
inlineprotectedvirtual

Close the currently opened variable.

See also
_OpenVariableRead()

Implements VAPoR::DataMgr.

Definition at line 179 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::CloseVariable().

virtual void VAPoR::DataMgrWC::_GetBlockSize ( size_t  bs[3],
int  reflevel 
) const
inlineprotectedvirtual

Return the internal blocking factor at a given refinement level

For multi-resolution data this method returns the dimensions of a data block at refinement level reflevel, where reflevel is in the range 0 to GetNumTransforms(). A value of -1 may be specified to indicate the maximum refinement level. In fact, any value outside the valid refinement level range will be treated as the maximum refinement level.

Parameters
[in]reflevelRefinement level

Implements VAPoR::DataMgr.

Definition at line 58 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetBlockSize().

virtual vector<string> VAPoR::DataMgrWC::_GetCoordinateVariables ( ) const
inlineprotectedvirtual

Return the names of the coordinate variables.

This method returns a three-element vector naming the X, Y, and Z coordinate variables, respectively. The special name "NONE" indicates that a coordinate variable name does not exist for a particular dimension.

Note
The existence of a coordinate variable name does not imply the existence of the coordinate variable itself.
Return values
vectoris three-element vector of coordinate variable names.

Reimplemented from VAPoR::DataMgr.

Definition at line 118 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetCoordinateVariables().

virtual string VAPoR::DataMgrWC::_GetCoordSystemType ( ) const
inlineprotectedvirtual

Return the coordinate system type. One of cartesian or spherical

Return values
type

Reimplemented from VAPoR::DataMgr.

Definition at line 70 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetCoordSystemType().

virtual vector<size_t> VAPoR::DataMgrWC::_GetCRatios ( ) const
inlineprotectedvirtual

Return the compression ratios available.

For data sets offering level-of-detail, the method returns a vector of integers, each specifying an available compression factor. For example, a factor of 10 indicates a compression ratio of 10:1. The vector returned is sorted from highest compression ratio to lowest. I.e. the most compressed data maps to index 0 in the returned vector.

Return values
crA vector of one or more compression factors

Reimplemented from VAPoR::DataMgr.

Definition at line 66 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetCRatios().

virtual const float* VAPoR::DataMgrWC::_GetDataRange ( ) const
inlineprotectedvirtual

Return the data range for the currently open variable

The method returns the minimum and maximum data values, respectively, for the variable currently opened. If the variable is not opened, or if it is opened for writing, the results are undefined.

Returns
range A pointer to a two-element array containing the Min and Max data values, respectively. If the derived class' implementation of this method returns NULL, the DataMgr class will compute the min and max itself.

Reimplemented from VAPoR::DataMgr.

Definition at line 165 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::GetDataRange().

virtual void VAPoR::DataMgrWC::_GetDim ( size_t  dim[3],
int  reflevel 
) const
inlineprotectedvirtual

Get the dimension of a volume

Returns the X,Y,Z coordinate dimensions of all data variables in grid (voxel) coordinates at the resolution level indicated by reflevel. Hence, all variables of a given type (3D or 2D) must have the same dimension. If reflevel is -1 (or the value returned by GetNumTransforms()) the native grid resolution is returned. In fact, any value outside the valid range is treated as the maximum refinement level

Parameters
[in]reflevelRefinement level of the variable
[out]dimA three element vector (ordered X, Y, Z) containing the voxel dimensions of the data at the specified resolution.
See also
GetNumTransforms()

Implements VAPoR::DataMgr.

Definition at line 54 of file DataMgrWC.h.

References VAPoR::Metadata::GetDim().

virtual vector<double> VAPoR::DataMgrWC::_GetExtents ( size_t  ts) const
inlineprotectedvirtual

Return the domain extents specified in user coordinates

Return the domain extents specified in user coordinates for the indicated time step. Variables in the data have spatial positions defined in a user coordinate system. These positions may vary with time. This method returns min and max bounds, in user coordinates, of all variables at a given time step.

Parameters
[in]tsA valid data set time step in the range from zero to GetNumTimeSteps() - 1. If ts is out of range, GetExtents() will return a reasonable default value.
Return values
extentsA six-element array containing the min and max bounds of the data domain in user-defined coordinates. The first three elements specify the minimum X, Y, and Z bounds, respectively, the second three elements specify the maximum bounds.

Implements VAPoR::DataMgr.

Definition at line 78 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetExtents().

virtual vector<long> VAPoR::DataMgrWC::_GetGridPermutation ( ) const
inlineprotectedvirtual

Return a three-element integer array indicating the coordinate ordering permutation.

Return values
integer-vector

Reimplemented from VAPoR::DataMgr.

Definition at line 126 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetGridPermutation().

virtual string VAPoR::DataMgrWC::_GetGridType ( ) const
inlineprotectedvirtual

Return the grid type. One of regular, stretched, block_amr, or spherical

Return values
type

Reimplemented from VAPoR::DataMgr.

Definition at line 74 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetGridType().

virtual string VAPoR::DataMgrWC::_GetMapProjection ( ) const
inlineprotectedvirtual

Return the Proj4 map projection string.

Return values
valueAn empty string if a Proj4 map projection is not available, otherwise a properly formatted Proj4 projection string is returned.

Reimplemented from VAPoR::DataMgr.

Definition at line 98 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetMapProjection().

virtual bool VAPoR::DataMgrWC::_GetMissingValue ( string  varname,
float &  value 
) const
protectedvirtual

Return the value of the missing data value

This method returns the value of the missing data value for the currently opened variable. If no missing data are present the method returns false

Parameters
[out]valueThe missing data value. Undefined if no missing value is present.
Return values
returnstrue if missing data are present

Reimplemented from VAPoR::DataMgr.

virtual long VAPoR::DataMgrWC::_GetNumTimeSteps ( ) const
inlineprotectedvirtual

Return the number of time steps in the data collection

Return values
valueThe number of time steps

Implements VAPoR::DataMgr.

Definition at line 94 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetNumTimeSteps().

virtual int VAPoR::DataMgrWC::_GetNumTransforms ( ) const
inlineprotectedvirtual

Return number of transformations in hierarchy

For multi-resolution data this method returns the number of coarsened approximations present. If no approximations are available - if only the native data are present - the return value is 0.

Return values
nThe number of coarsened data approximations available

Implements VAPoR::DataMgr.

Definition at line 62 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::GetNumTransforms().

virtual vector<long> VAPoR::DataMgrWC::_GetPeriodicBoundary ( ) const
inlineprotectedvirtual

Return a three-element boolean array indicating if the X,Y,Z axes have periodic boundaries, respectively.

Return values
boolean-vector

Implements VAPoR::DataMgr.

Definition at line 122 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetPeriodicBoundary().

virtual double VAPoR::DataMgrWC::_GetTSUserTime ( size_t  ts) const
inlineprotectedvirtual

Return the time for a time step

This method returns the time, in user-defined coordinates, associated with the time step, ts. Variables such as velocity field components that are expressed in distance per units of time are expected to use the same time coordinates as the values returned by this mehtod.

Parameters
[in]tsA valid data set time step in the range from zero to GetNumTimeSteps() - 1.
Return values
valueThe user time at time step ts. If ts is outside the valid range zero is returned.

Implements VAPoR::DataMgr.

Definition at line 130 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetTSUserTime().

virtual void VAPoR::DataMgrWC::_GetTSUserTimeStamp ( size_t  ts,
string &  s 
) const
inlineprotectedvirtual

Return the time for a time step

This method returns the user time, associated with the time step, ts, as a formatted string. The returned time stamp is intended to be used for annotation purposes

Parameters
[in]tsA valid data set time step in the range from zero to GetNumTimeSteps() - 1.
[out]sA formated time string. If ts is outside the valid range zero the empty string is returned.

Implements VAPoR::DataMgr.

Definition at line 134 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetTSUserTimeStamp().

virtual vector<double> VAPoR::DataMgrWC::_GetTSXCoords ( size_t  ts) const
inlineprotectedvirtual

Return the X dimension coordinate array, if it exists

For stretched grids, _GetGridType() == "stretched", this method returns the X component of the grid user coordinates. This method is only called for stretched grids.

Return values
valueAn array of monotonically changing values specifying the X dimension user coordinates, in a user-defined coordinate system, of each YZ sample plane. An empty vector is returned if the coordinate dimension array is not defined for the specified time step.
See also
_GetGridType(), GetTSXCoords()

Reimplemented from VAPoR::DataMgr.

Definition at line 82 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetTSXCoords().

virtual vector<double> VAPoR::DataMgrWC::_GetTSYCoords ( size_t  ts) const
inlineprotectedvirtual

Return the Y dimension coordinate array, if it exists

Reimplemented from VAPoR::DataMgr.

Definition at line 86 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetTSYCoords().

virtual vector<double> VAPoR::DataMgrWC::_GetTSZCoords ( size_t  ts) const
inlineprotectedvirtual

Return the Z dimension coordinate array, if it exists

Reimplemented from VAPoR::DataMgr.

Definition at line 90 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetTSZCoords().

virtual void VAPoR::DataMgrWC::_GetValidRegion ( size_t  min[3],
size_t  max[3],
int  reflevel 
) const
inlineprotectedvirtual

Return the valid bounds of the currently opened region

The data model permits the storage of volume subregions. This method may be used to query the valid domain of the currently opened volume. Results are returned in voxel coordinates, relative to the refinement level indicated by reflevel.

Parameters
[out]minA pointer to the minimum bounds of the subvolume
[out]maxA pointer to the maximum bounds of the subvolume
[in]reflevelRefinement level of the variable. A value of -1 indicates the maximum refinment level defined for the VDC
Return values
statusReturns a negative value if the volume is not opened for reading.
See also
_OpenVariableRead()

Implements VAPoR::DataMgr.

Definition at line 159 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::GetValidRegion().

virtual vector<string> VAPoR::DataMgrWC::_GetVariables2DXY ( ) const
inlineprotectedvirtual

Return the names of the 2D, XY variables in the collection

Return values
valueis a space-separated list of 2D XY variable names An emptry string is returned if no variables of this type are present

Implements VAPoR::DataMgr.

Definition at line 106 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetVariables2DXY().

virtual vector<string> VAPoR::DataMgrWC::_GetVariables2DXZ ( ) const
inlineprotectedvirtual

Return the names of the 2D, XZ variables in the collection

Return values
valueis a space-separated list of 2D ZY variable names An emptry string is returned if no variables of this type are present

Implements VAPoR::DataMgr.

Definition at line 110 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetVariables2DXZ().

virtual vector<string> VAPoR::DataMgrWC::_GetVariables2DYZ ( ) const
inlineprotectedvirtual

Return the names of the 2D, YZ variables in the collection

Return values
valueis a space-separated list of 2D YZ variable names An emptry string is returned if no variables of this type are present

Implements VAPoR::DataMgr.

Definition at line 114 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetVariables2DYZ().

virtual vector<string> VAPoR::DataMgrWC::_GetVariables3D ( ) const
inlineprotectedvirtual
Return values
valueis a space-separated list of 3D variable names. An emptry string is returned if no variables of this type are present

Implements VAPoR::DataMgr.

Definition at line 102 of file DataMgrWC.h.

References VAPoR::MetadataVDC::GetVariables3D().

virtual int VAPoR::DataMgrWC::_OpenVariableRead ( size_t  timestep,
const char *  varname,
int  reflevel = 0,
int  lod = 0 
)
inlineprotectedvirtual

Open the named variable for reading

This method prepares the multi-resolution, multi-lod data volume, indicated by a variable name and time step pair, for subsequent read operations by methods of this class. Furthermore, the number of the refinement level parameter, reflevel indicates the resolution of the volume in the multiresolution hierarchy, and the lod parameter indicates the level of detail.

The valid range of values for reflevel is [0..max_refinement], where max_refinement is the maximum finement level of the data set: GetNumTransforms(). A value of zero indicates the coarsest resolution data, a value of max_refinement indicates the finest resolution data.

The valid range of values for lod is [0..max_lod], where max_lod is the maximum lod of the data set: GetCRatios().size() - 1. A value of zero indicates the highest compression ratio, a value of max_lod indicates the lowest compression ratio.

An error occurs, indicated by a negative return value, if the volume identified by the {varname, timestep, reflevel, lod} tupple is not present on disk. Note the presence of a volume can be tested for with the VariableExists() method.

Parameters
[in]timestepTime step of the variable to read
[in]varnameName of the variable to read
[in]reflevelRefinement level of the variable. A value of -1 indicates the maximum refinment level defined for the VDC
[in]lodLevel of detail requested. A value of -1 indicates the lowest compression level available for the VDC
See also
GetVariables3D(), GetVariables2DXY(), GetNumTransforms()

Implements VAPoR::DataMgr.

Definition at line 149 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::OpenVariableRead().

virtual int VAPoR::DataMgrWC::_VariableExists ( size_t  ts,
const char *  varname,
int  reflevel = 0,
int  lod = 0 
) const
inlineprotectedvirtual

Returns true if indicated data volume is available

Returns true if the variable identified by the timestep, variable name, refinement level, and level-of-detail is present in the data set. Returns 0 if the variable is not present.

Parameters
[in]tsA valid time step between 0 and GetNumTimesteps()-1
[in]varnameA valid variable name
[in]reflevelRefinement level requested. The coarsest refinement level is 0 (zero). A value of -1 indicates the finest refinement level contained in the VDC.
[in]lodCompression level of detail requested. The coarsest approximation level is 0 (zero). A value of -1 indicates the finest refinement level contained in the VDC.

Implements VAPoR::DataMgr.

Definition at line 139 of file DataMgrWC.h.

References VAPoR::WaveCodecIO::VariableExists().

Member Data Documentation

size_t VAPoR::DataMgrWC::_ts
protected

Definition at line 181 of file DataMgrWC.h.

string VAPoR::DataMgrWC::_varname
protected

Definition at line 185 of file DataMgrWC.h.


The documentation for this class was generated from the following file: