VAPoR
0.1
|
A class for managing data set metadata. More...
#include <MetadataVDC.h>
Public Member Functions | |
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 | GetBlockSize (size_t bs[3], int) const |
virtual void | GetGridDim (size_t dim[3]) const |
const size_t * | GetDimension () const |
int | GetFilterCoef () const |
int | GetLiftingCoef () const |
virtual int | GetNumTransforms () 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::Metadata | |
Metadata () | |
virtual | ~Metadata () |
virtual std::vector< std::string > | GetVariableNames () const |
virtual void | GetTSUserTimeStamp (size_t ts, std::string &s) const =0 |
virtual void | GetDim (size_t dim[3], int reflevel=0) const |
virtual void | GetDimBlk (size_t bdim[3], int reflevel=0) const |
virtual bool | GetMissingValue (std::string varname, float &value) const |
virtual void | MapVoxToBlk (const size_t vcoord[3], size_t bcoord[3], int reflevel=-1) const |
virtual void | MapVoxToUser (size_t timestep, const size_t vcoord0[3], double vcoord1[3], int ref_level=0) const |
void | MapUserToVox (size_t timestep, const double vcoord0[3], size_t vcoord1[3], int reflevel) const |
virtual VarType_T | GetVarType (const std::string &varname) const |
virtual int | IsValidRegion (const size_t min[3], const size_t max[3], int reflevel=0) const |
virtual int | IsValidRegionBlk (const size_t min[3], const size_t max[3], int reflevel=0) const |
virtual bool | IsCoordinateVariable (std::string varname) const |
Public Member Functions inherited from VetsUtil::MyBase | |
MyBase () | |
const string & | getClassName () const |
Public Member Functions inherited from VAPoR::ParsedXml | |
virtual | ~ParsedXml () |
virtual bool | charHandler (ExpatParseMgr *, const XML_Char *, int) |
Additional Inherited Members | |
Public Types inherited from VAPoR::Metadata | |
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) |
Public Attributes inherited from VAPoR::ParsedXml | |
ParsedXml * | previousClass |
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 |
Protected Member Functions inherited from VetsUtil::MyBase | |
void | SetClassName (const string &name) |
Protected Attributes inherited from VAPoR::Metadata | |
bool | _deprecated_get_dim |
Static Protected Attributes inherited from VAPoR::ParsedXml | |
static const string | _stringType |
static const string | _longType |
static const string | _doubleType |
static const string | _typeAttr |
A class for managing data set metadata.
The MetadataVDC class is used to read and write VAPoR metadata files. A metadata file desribes a time-varying, multi-variate, multiresolution data set. Elements of the data set are 3D volumes of gridded field data. A data set's metadata describes attributes of the field data, such as its dimension, grid spacing, real world coordinates, etc., but does specify the values of the dependent field values themselves. In a VAPoR data set, metadata and dependent field data are store in separate files.
The MetadataVDC class is derived from the MyBase base class. Hence all of the methods make use of MyBase's error reporting capability - the success of any method (including constructors) can (and should) be tested with the GetErrCode() method. If non-zero, an error message can be retrieved with GetErrMsg().
Methods that retrieve required MetadataVDC elements will set an error code via MyBase::SetErrMsg() if the requested element is not present in the MetadataVDC object. Methods that retrieve optional elements will NOT set an error code if an optional element is not present.
Definition at line 92 of file MetadataVDC.h.
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 |
||
) |
Create a VDC type 1 metadata object from scratch.
[in] | dim | The X, Y, and Z coordinate dimensions of all data volumes, specified in grid coordinates (voxels) |
[in] | numTransforms | Number of wavelet transforms to perform |
[in] | bs | Internal blocking factor for transformed data. Must be a power of two. |
[in] | nFilterCoef | Number of filter coefficients used by wavelet transforms |
[in] | nLiftingCoef | Number of lifting coefficients used by wavelet transforms |
[in] | msbFirst | Boolean, if true storage order for volume data will be most significant byte fist (i.e. big endian). |
[in] | vdfVersion | VDF file version number. In general this should not be changed from the default |
VAPoR::MetadataVDC::MetadataVDC | ( | const size_t | dim[3], |
const size_t | bs[3], | ||
const vector< size_t > & | cratios, | ||
string | wname, | ||
string | wmode | ||
) |
Create a VDC type 2 metadata object from scratch.
[in] | dim | The X, Y, and Z coordinate dimensions of all data volumes, specified in grid coordinates (voxels) |
[in] | bs | Internal blocking factor for transformed data. Must be a power of two. |
[in] | cratios | A vector of compression ratios |
[in] | wname | Wavelet name |
[in] | wmode | Wavelet boundary handling mode |
VAPoR::MetadataVDC::MetadataVDC | ( | const string & | metafile | ) |
Create a metadata object from a metadata file stored on disk. If the metafile is an earlier version the resulting metadata object will be converted to the current version.
[in] | path | Path to metadata file |
VAPoR::MetadataVDC::MetadataVDC | ( | const MetadataVDC & | node | ) |
Copy constructor for the MetadataVDC class.
Create's a new MetadataVDC node from an existing one.
[in] | node | MetadataVDC instance from which to construct a copy |
|
virtual |
int VAPoR::MetadataVDC::ConstructFullAuxBase | ( | size_t | ts, |
string * | path | ||
) | const |
int VAPoR::MetadataVDC::ConstructFullVBase | ( | size_t | ts, |
const string & | var, | ||
string * | path | ||
) | const |
|
inlinevirtual |
Return the internal blocking factor use for WaveletBlock files
size | Internal block factor |
Definition at line 264 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrWB::_GetBlockSize(), and VAPoR::DataMgrWC::_GetBlockSize().
|
inlinevirtual |
Return the internal blocking factor at a particular refinement level
[in] | reflevel | Refinement level of the variable |
[out] | dim | Transformed dimension. |
size | Internal block factor |
Implements VAPoR::Metadata.
Reimplemented in VAPoR::WaveCodecIO.
Definition at line 273 of file MetadataVDC.h.
|
inline |
Returns wavelet boundary handling mode
wavename | Wavelet boundary handling mode |
Definition at line 336 of file MetadataVDC.h.
|
inline |
Return the global comment, if it exists
value | The global comment. An empty string is returned if the global comment is not defined. |
Definition at line 578 of file MetadataVDC.h.
|
inlinevirtual |
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.
vector | is three-element vector of coordinate variable names. |
Reimplemented from VAPoR::Metadata.
Definition at line 506 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrWB::_GetCoordinateVariables(), and VAPoR::DataMgrWC::_GetCoordinateVariables().
|
inlinevirtual |
Return the coordinate system type.
type | The grid type |
Reimplemented from VAPoR::Metadata.
Definition at line 406 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrWB::_GetCoordSystemType(), and VAPoR::DataMgrWC::_GetCoordSystemType().
|
inlinevirtual |
Returns compression ratios
cratios | vector of compression ratios |
Reimplemented from VAPoR::Metadata.
Definition at line 343 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrWC::_GetCRatios().
|
inline |
Return the base of file path name to the data subdirectory. If the class was constructed with a path name, this method returns the basename of the path name, with any file extensions removed, and "_data" appended. If the class was not constructed with a path name, an empty string is returned
dirname | : parent directory or an empty string |
Definition at line 245 of file MetadataVDC.h.
|
inline |
Returns the X,Y,Z coordinate dimensions of the data in grid coordinates
dim | A three element vector containing the voxel dimension of the data at its native resolution |
Definition at line 287 of file MetadataVDC.h.
|
virtual |
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.
[in] | ts | A 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. |
extents | A 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::Metadata.
Referenced by VAPoR::DataMgrAMR::_GetExtents(), VAPoR::DataMgrWB::_GetExtents(), and VAPoR::DataMgrWC::_GetExtents().
|
inline |
Returns the number of filter coefficients employed for wavelet transforms
_nFilterCoef | Number of filter coefficients |
Definition at line 294 of file MetadataVDC.h.
|
inlinevirtual |
Get the native dimension of a volume
Returns the X,Y,Z coordinate dimensions of all data variables in grid (voxel) coordinates full resolution.
[in] | reflevel | Refinement level of the variable |
[out] | dim | A three element vector (ordered X, Y, Z) containing the voxel dimensions of the data at full resolution. |
Implements VAPoR::Metadata.
Definition at line 277 of file MetadataVDC.h.
|
inlinevirtual |
Return a three-element integer array indicating the coordinate ordering permutation.
integer-vector |
Implements VAPoR::Metadata.
Definition at line 662 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetGridPermutation(), VAPoR::DataMgrWB::_GetGridPermutation(), and VAPoR::DataMgrWC::_GetGridPermutation().
|
inlinevirtual |
Return the grid type.
type | The grid type |
Reimplemented from VAPoR::Metadata.
Definition at line 377 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrWB::_GetGridType(), and VAPoR::DataMgrWC::_GetGridType().
|
inline |
Returns the number of lifting coefficients employed for wavelet transforms
_nLiftingCoef | Number of lifting coefficients |
Definition at line 301 of file MetadataVDC.h.
|
virtual |
Return the map projection argument string, if it exists
value | The map projection string. An empty string is returned if a map projection is not defined. |
Reimplemented from VAPoR::Metadata.
Referenced by VAPoR::DataMgrWB::_GetMapProjection(), and VAPoR::DataMgrWC::_GetMapProjection().
|
inline |
Return the base of file path name to the metafile. If the class was constructed with a path name, this method returns the basename of the path name. If the class was not constructed with a path name, an empty string is returned
dirname | : parent directory or an empty string |
Definition at line 236 of file MetadataVDC.h.
|
inline |
Return the current global missing value, if any
This method returns a one-element vector containing the current missing value. If no missing value is defined an empty vector will be returned.
Definition at line 651 of file MetadataVDC.h.
|
inline |
Returns true if the storage order for data is most signicant byte first
_msbFirst | Booean |
Definition at line 315 of file MetadataVDC.h.
|
virtual |
Return the number of time steps in the collection
value | The number of time steps or a negative number on error |
Implements VAPoR::Metadata.
Referenced by VAPoR::DataMgrAMR::_GetNumTimeSteps(), VAPoR::DataMgrWB::_GetNumTimeSteps(), and VAPoR::DataMgrWC::_GetNumTimeSteps().
|
inlinevirtual |
Returns the number of wavelet transforms
_numTransforms | Number of transforms |
Reimplemented from VAPoR::Metadata.
Reimplemented in VAPoR::WaveCodecIO.
Definition at line 308 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetNumTransforms(), and VAPoR::DataMgrWB::_GetNumTransforms().
|
inline |
Return the file path name to the metafile's parent directory. If the class was constructed with a path name, this method returns the parent directory of the path name. If the class was not constructed with a path name, an empty string is returned
dirname | : parent directory or an empty string |
Definition at line 228 of file MetadataVDC.h.
|
inlinevirtual |
Return a three-element boolean array indicating if the X,Y,Z axes have periodic boundaries, respectively.
boolean-vector |
Implements VAPoR::Metadata.
Definition at line 601 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetPeriodicBoundary(), VAPoR::DataMgrWB::_GetPeriodicBoundary(), and VAPoR::DataMgrWC::_GetPeriodicBoundary().
|
inline |
Return the base path for auxiliary data, indicated by the time step, ts
, if it exists.
Paths to data files are constructed from the base path.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
path | Auxiliary data base path name |
Definition at line 747 of file MetadataVDC.h.
References CHK_TS_REQ.
|
inline |
Return the comment for the indicated time step, ts
, if it exists.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
comment | A comment string. An empty string is returned if the comment for the specified time step is not defined. |
Definition at line 842 of file MetadataVDC.h.
References CHK_TS_OPT.
|
inline |
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
extents | A six-element array containing the min and max bounds of the data domain in user-defined coordinates. The global extents vector is returned if the extents for the specified time step is not defined. |
Definition at line 871 of file MetadataVDC.h.
|
inline |
Returns the time-varying missing value, if any.
Definition at line 886 of file MetadataVDC.h.
References CHK_TS_OPT.
|
inline |
Definition at line 1173 of file MetadataVDC.h.
References CHK_TS_OPT.
|
inline |
Definition at line 1177 of file MetadataVDC.h.
|
inline |
Get time step, user-defined metadata
Get the value(s) of a time step, user-defined metadata tag of type long, associated with time step ts
.
[in] | ts | The time step this metadata field applies to |
[in] | tag | Name of metadata tag |
vector | A vector of metadata values associated with tag . If tag is not defined by the metadata class, the vector returned is empty. |
Definition at line 1159 of file MetadataVDC.h.
References CHK_TS_OPT.
|
inline |
Return a vector of time step metadata tags for long data
The vector returned contains the tags (names) for any user-defined, time step metadata. The value(s) of the metadata associated with the returned tags may be queried with GetTSUserDataLong().
vector | A vector of tag names |
Definition at line 1124 of file MetadataVDC.h.
|
inline |
Definition at line 1191 of file MetadataVDC.h.
References CHK_TS_OPT.
|
inline |
Definition at line 1195 of file MetadataVDC.h.
|
inlinevirtual |
Return the time for a time step, if it exists,
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
value | A single element vector specifying the time |
Implements VAPoR::Metadata.
Definition at line 720 of file MetadataVDC.h.
References CHK_TS_OPT.
Referenced by VAPoR::DataMgrAMR::_GetTSUserTime(), VAPoR::DataMgrWB::_GetTSUserTime(), and VAPoR::DataMgrWC::_GetTSUserTime().
|
inline |
Definition at line 730 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetTSUserTimeStamp(), VAPoR::DataMgrWB::_GetTSUserTimeStamp(), and VAPoR::DataMgrWC::_GetTSUserTimeStamp().
|
inlinevirtual |
Return the X dimension coordinate array, if it exists
value | An array of monotonically increasing values specifying the X // 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. |
Reimplemented from VAPoR::Metadata.
Definition at line 805 of file MetadataVDC.h.
References CHK_TS_OPT.
Referenced by VAPoR::DataMgrWB::_GetTSXCoords(), and VAPoR::DataMgrWC::_GetTSXCoords().
|
inlinevirtual |
Reimplemented from VAPoR::Metadata.
Definition at line 812 of file MetadataVDC.h.
References CHK_TS_OPT.
Referenced by VAPoR::DataMgrWB::_GetTSYCoords(), and VAPoR::DataMgrWC::_GetTSYCoords().
|
inlinevirtual |
Reimplemented from VAPoR::Metadata.
Definition at line 819 of file MetadataVDC.h.
References CHK_TS_OPT.
Referenced by VAPoR::DataMgrWB::_GetTSZCoords(), and VAPoR::DataMgrWC::_GetTSZCoords().
|
inline |
Definition at line 1077 of file MetadataVDC.h.
|
inline |
Definition at line 1070 of file MetadataVDC.h.
|
inline |
Get global, user-defined metadata
Get the value(s) of a top-level (global), user-defined metadata tag of type long.
[in] | tag | Name of metadata tag |
vector | A vector of metadata values associated with tag . If tag is not defined by the metadata class, the vector returned is empty. |
Definition at line 1066 of file MetadataVDC.h.
|
inline |
Return a vector of global, user-defined metadata tags for long data
The vector returned contains the tags (names) for any user-defined, global metadata. The value(s) of the metadata associated with the returned tags may be queried with GetUserDataLong().
vector | A vector of tag names |
Definition at line 1035 of file MetadataVDC.h.
|
inline |
Definition at line 1088 of file MetadataVDC.h.
|
inline |
Definition at line 1081 of file MetadataVDC.h.
|
inline |
Definition at line 1097 of file MetadataVDC.h.
|
inlinevirtual |
Return the names of the 2D, XY variables in the collection
value | is a space-separated list of 2D XY variable names |
Implements VAPoR::Metadata.
Definition at line 543 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetVariables2DXY(), VAPoR::DataMgrWB::_GetVariables2DXY(), and VAPoR::DataMgrWC::_GetVariables2DXY().
|
inlinevirtual |
Return the names of the 2D, XZ variables in the collection
value | is a vectort of 2D ZY variable names An emptry string is returned if no variables of this type are present |
Implements VAPoR::Metadata.
Definition at line 548 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetVariables2DXZ(), VAPoR::DataMgrWB::_GetVariables2DXZ(), and VAPoR::DataMgrWC::_GetVariables2DXZ().
|
inlinevirtual |
Return the names of the 2D, YZ variables in the collection
value | is a vector of 2D YZ variable names An emptry string is returned if no variables of this type are present |
Implements VAPoR::Metadata.
Definition at line 553 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetVariables2DYZ(), VAPoR::DataMgrWB::_GetVariables2DYZ(), and VAPoR::DataMgrWC::_GetVariables2DYZ().
|
inlinevirtual |
Return the names of the 3D variables in the collection
value | is a space-separated list of 3D variable names |
Implements VAPoR::Metadata.
Definition at line 498 of file MetadataVDC.h.
Referenced by VAPoR::DataMgrAMR::_GetVariables3D(), VAPoR::DataMgrWB::_GetVariables3D(), and VAPoR::DataMgrWC::_GetVariables3D().
string VAPoR::MetadataVDC::GetVBasePath | ( | size_t | ts, |
const string & | var | ||
) | const |
Return the base path for the variable, v
, indicated by the time step, ts
, if it exists.
Paths to data files are constructed from the base path.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | var | A valid data set variable name |
path | Variable base path name |
|
inline |
Return the comment for the variable, v
, indicated by the time step, ts
, if it exists
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | var | A valid data set variable name |
comment | A comment string. An emptry string is returned if no comment is defined for the specified variable |
Definition at line 912 of file MetadataVDC.h.
References CHK_VAR_OPT.
|
inline |
Return the base path for the variable, v
, indicated by the time step, ts
, if it exists.
Paths to data files are constructed from the base path.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | var | A valid data set variable name |
path | Variable base path name |
This method is deprecated and should no longer be used.
Definition at line 958 of file MetadataVDC.h.
References CHK_VAR_REQ.
|
inline |
Returns VDC type (1 or 2)
int | 1 or 2 |
Definition at line 350 of file MetadataVDC.h.
Referenced by VAPoR::DataStatus::setDataMissing2D(), and VAPoR::DataStatus::setDataMissing3D().
|
inline |
Returns vdf file version number
_vdfVersion | Version number |
Definition at line 322 of file MetadataVDC.h.
|
inline |
Definition at line 982 of file MetadataVDC.h.
References CHK_VAR_REQ.
|
inline |
Definition at line 1283 of file MetadataVDC.h.
References CHK_VAR_OPT.
|
inline |
Definition at line 1271 of file MetadataVDC.h.
|
inline |
Get variable, user-defined metadata
Get the value(s) of a variable, user-defined metadata tag of type long, associated with time step ts
and variable var
.
[in] | ts | The time step this metadata field applies to |
[in] | var | The field variable this metadata field applies to |
[in] | tag | Name of metadata tag |
vector | A vector of metadata values associated with tag . If tag is not defined by the metadata class, the vector returned is empty. |
Definition at line 1264 of file MetadataVDC.h.
References CHK_VAR_OPT.
|
inline |
Return a vector of variable metadata tags for long data
The vector returned contains the tags (names) for any user-defined, variable metadata. The value(s) of the metadata associated with the returned tags may be queried with GetVUserDataLong().
vector | A vector of tag names |
Definition at line 1224 of file MetadataVDC.h.
|
inline |
Definition at line 1299 of file MetadataVDC.h.
References CHK_VAR_OPT.
|
inline |
Definition at line 1306 of file MetadataVDC.h.
|
inline |
Returns wavelet family name
wavename | Wavelet name |
Definition at line 329 of file MetadataVDC.h.
|
inline |
Return true if a user time exists for the indicated time step
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
boolean | True if value is a valid argument |
Definition at line 762 of file MetadataVDC.h.
|
inline |
Return true if value
is a valid coordinate system type.
boolean | True if value is a valid type |
Definition at line 414 of file MetadataVDC.h.
References VetsUtil::StrCmpNoCase().
int VAPoR::MetadataVDC::IsValidExtents | ( | const vector< double > & | value | ) | const |
Return true if value
is a valid coordinate extent definition
boolean | True if value is a valid argument |
|
inline |
Return true if value
is a valid grid type.
[in] | value | Grid type |
boolean | True if value is a valid grid type |
Definition at line 385 of file MetadataVDC.h.
References VetsUtil::StrCmpNoCase().
|
inline |
Return true if value
is a valid time step specification
boolean | True if value is a valid argument |
Definition at line 462 of file MetadataVDC.h.
|
inline |
Return true if value
is a valid time specification.
boolean | True if value is a valid argument |
Definition at line 771 of file MetadataVDC.h.
|
inline |
Definition at line 963 of file MetadataVDC.h.
|
inline |
Make the metadata object current
This method updates the metadata object to the most current version. MetadataVDC objects older than version 1 cannot be updated.
status | A negative integer is returned on failure, otherwise the method has succeeded. |
Definition at line 220 of file MetadataVDC.h.
int VAPoR::MetadataVDC::Merge | ( | const MetadataVDC & | metadata, |
size_t | ts = 0 |
||
) |
Merge the contents of two metadata objects
This method merges the contents of the metadata object pointed to by metadata
with the current class object. In instances where there are collisions (nodes with the same name), the values metadata
take precedence over the current object. The timestep parameter, ts
, may be used to specify a time step offset. I.e. The first timestep in metadata
will be merged with the timestep of this class objected indicated by ts
.
The following MetadataVDC attributes are required to match in both MetadataVDC objects for the merge to take place:
The following metadata parameters are simply ignored (i.e. the parameter values for this class instance take precedence over those in the object pointed to by metadata
):
Similary, global and time step comments found in metadata
are not merged, nor is any user-defined data.
As a side effect both the MetadataVDC object pointed to by this class and the MetadataVDC object pointed to by metadata
are made current with MakeCurrent().
[in] | metadata | A pointer to a valid metadata object. |
[in] | ts | Timestep offset |
status | A negative integer is returned on failure, otherwise the method has succeeded. |
int VAPoR::MetadataVDC::Merge | ( | const string & | path, |
size_t | ts = 0 |
||
) |
Merge the contents of two metadata objects
This method is identical to the overloaded version of the same name. However, a path name to a .vdf file is provided instead of an MetadataVDC object
[in] | path | Path to metadata file |
[in] | ts | Timestep offset |
status | A negative integer is returned on failure, otherwise the method has succeeded. |
|
inline |
Set a global comment
The comment is intended to refer to the entire data set
[in] | value | A user defined comment |
status | Returns a non-negative integer on success |
Definition at line 566 of file MetadataVDC.h.
int VAPoR::MetadataVDC::SetCoordinateVariables | ( | const vector< string > & | value | ) |
Indicate which variables in a VDC are coordinate variables
This method specifies the names of three coordinate variables corresponding to the X, Y, and Z axis.
[in] | value | A three-element vector containing the names of the grid coordinate variables for the X, Y, and Z axis, respectively. |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetCoordSystemType | ( | const string & | value | ) |
Set the coordinate system type
[in] | value | Coordinate system type. One of cartesian or spherical |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetExtents | ( | const vector< double > & | value | ) |
Set the domain extents of the data set
Set the domain extents of the data set in user-defined (world) coordinates.
value | A six-element array, the first three elements specify the minimum coordinate extents, the last three elements specify the maximum coordinate extents. |
status | Returns a non-negative integer on success |
|
inline |
Set the grid coordinate ordering
value | A three-element array indicating the association between the X,Y,Z (long, lat, radius) coordinates and the ordering of the data. By default, the fastest varying coordinate is X (long.), followed by Y (lat), then Z (radius). This method permits a permutation of the data oredering to be specified via a three-element array containing a permutation of the ordered set (0,1,2). |
status | Returns a non-negative integer on success |
Definition at line 617 of file MetadataVDC.h.
int VAPoR::MetadataVDC::SetGridType | ( | const string & | value | ) |
Set the grid type.
[in] | value | Grid type. One of regular or stretched or layered |
status | Returns a non-negative integer on success |
|
inline |
Set a map projection argument string
This method defines a 2D map projection from spherical to 2D space. The projection string defines a mapping from a portion of the earth's surface to a plane. The format of the string is white-space separated list of parameter names and values. I.e.
+param_name=param_value [+param_name=param_value...]
where param_name is the name of the parameter and param_value is the value associated with param_name. Further documentation on allowable parameters and values may be found in the references below.
[in] | value | projection string argument list |
status | Returns a non-negative integer on success |
Definition at line 685 of file MetadataVDC.h.
|
inline |
Set a global missing value
This method establishes a global missing value for the VDC. Any grid location, for any variable at any time step, with a data value equal to value
will be treated as having missing data
Definition at line 629 of file MetadataVDC.h.
|
inline |
Unset a previous set missing value
This method will, despite its name, will unset any missing value previously set with SetMissingValue(value)
Definition at line 640 of file MetadataVDC.h.
int VAPoR::MetadataVDC::SetNumTimeSteps | ( | long | value | ) |
Set the number of time steps in the data collection
[in] | value | The number of time steps in the data set |
status | Returns a non-negative integer on success |
|
inline |
Set the grid boundary type
value | A three-element array, indicating whether the boundary conditions for X, Y, and Z coordinate axis, respectively, are periodic. Any non-zero value is interpreted as true. |
status | Returns a non-negative integer on success |
Definition at line 589 of file MetadataVDC.h.
int VAPoR::MetadataVDC::SetTSComment | ( | size_t | ts, |
const string & | value | ||
) |
Set a comment for the time step indicated by ts
.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
value | A comment string |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetTSExtents | ( | size_t | ts, |
const vector< double > & | value | ||
) |
Set the spatial domain extents of the indicated time step
Set the spatial domain extents of the data set in user-defined (world) coordinates for the indicated time step.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
value | A six-element array, the first three elements specify the minimum coordinate extents, the last three elements specify the maximum coordinate extents. |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetTSMissingValue | ( | size_t | ts, |
double | v | ||
) |
Set a time-varying missing value
This method establishes a time-varying missing value for the VDC. Any grid location, for any variable at time step = ts
, with a data value equal to value
will be treated as having missing data
A time-varying missing value takes prededence over a global missing value.
|
inline |
Definition at line 1164 of file MetadataVDC.h.
References CHK_TS_REQ.
|
inline |
Set time step, user-defined metadata
Set the value(s) of a time step, user-defined metadata tag of type long, associated with time step ts
. This method both defines the tag name and sets it's value
[in] | ts | The time step this metadata field applies to |
[in] | tag | Name of metadata tag |
[in] | value | A vector of one or more metadata values |
Definition at line 1138 of file MetadataVDC.h.
References CHK_TS_REQ.
|
inline |
Definition at line 1182 of file MetadataVDC.h.
References CHK_TS_REQ.
int VAPoR::MetadataVDC::SetTSUserTime | ( | size_t | ts, |
const vector< double > & | value | ||
) |
Set the time of a time step in user-defined coordinates.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | value | A single element vector specifying the time |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetTSUserTimeStamp | ( | size_t | ts, |
const string & | s | ||
) |
int VAPoR::MetadataVDC::SetTSXCoords | ( | size_t | ts, |
const vector< double > & | value | ||
) |
Specify the X dimension coordinates for a stretched grid
Specify the X dimension coordinates of data samples for a stretched grid. Similar arrays must be specified for Y and Z sample coordinates. These arrays are ignored if the grid type is regular, in which case the grid spacing is treated as uniform and derived from the metadata Extents attribute. Coordinate arrays are specified for the time step indicated by ts
.
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | value | An array of monotonically increasing values specifying the X coordinates, in a user-defined coordinate system, of each YZ sample plane. |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetTSYCoords | ( | size_t | ts, |
const vector< double > & | value | ||
) |
int VAPoR::MetadataVDC::SetTSZCoords | ( | size_t | ts, |
const vector< double > & | value | ||
) |
|
inline |
Definition at line 1072 of file MetadataVDC.h.
|
inline |
Set global, user-defined metadata
Set the value(s) of a top-level (global) user-defined metadata tag of type long. This method both defines the tag name and sets it's value
[in] | tag | Name of metadata tag |
[in] | value | A vector of one or more metadata values |
status | Returns a non-negative integer on success |
Definition at line 1047 of file MetadataVDC.h.
|
inline |
Definition at line 1083 of file MetadataVDC.h.
|
inline |
Definition at line 1092 of file MetadataVDC.h.
|
inline |
Set the names of the field variables in the data collection
All variables specified are of type 3D.
[in] | value | A white-space delimited list of names |
status | Returns a non-negative integer on success |
Definition at line 474 of file MetadataVDC.h.
int VAPoR::MetadataVDC::SetVariables2DXY | ( | const vector< string > & | value | ) |
Indicate which variables in a VDC are of type 2DXY
Specifies which variables in a VDC represent two-dimensional, XY-plane fields. The variable names must match names previoulsy provided by SetVariableNames().
[in] | value | A white-space delimited list of names |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetVariables2DXZ | ( | const vector< string > & | value | ) |
int VAPoR::MetadataVDC::SetVariables2DYZ | ( | const vector< string > & | value | ) |
int VAPoR::MetadataVDC::SetVariables3D | ( | const vector< string > & | value | ) |
Indicate which variables in a VDC are of type 3D
Specifies which variables in a VDC represent three-dimensional fields. The variable names must match names previoulsy provided by SetVariableNames().
[in] | value | A white-space delimited list of names |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetVBasePath | ( | size_t | ts, |
const string & | var, | ||
const string & | value | ||
) |
int VAPoR::MetadataVDC::SetVComment | ( | size_t | ts, |
const string & | var, | ||
const string & | value | ||
) |
Set a comment for the variable, v
at the time step indicated by ts
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | var | A valid data set variable name |
[in] | value | A comment string |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetVDataRange | ( | size_t | ts, |
const string & | var, | ||
const vector< double > & | value | ||
) |
Set the data range for the variable, v
at the time step indicated by ts
[in] | ts | A valid data set time step in the range from zero to GetNumTimeSteps() - 1. |
[in] | var | A valid data set variable name |
[in] | value | A two-element vector containing the min and max values for the indicated volume |
status | Returns a non-negative integer on success |
int VAPoR::MetadataVDC::SetVMissingValue | ( | size_t | ts, |
const string & | var, | ||
double | v | ||
) |
Set a variable-specific missing value
This method establishes a time-varying, variable-specific missing value for the VDC. Any grid location, for variable = var
, at time step = ts
, with a data value equal to value
will be treated as having missing data
A time-varying, variable-specific missing value takes prededence over a time-varying or global missing value.
|
inline |
Definition at line 1274 of file MetadataVDC.h.
References CHK_VAR_REQ.
|
inline |
Set variable, user-defined metadata
Set the value(s) of a variable, user-defined metadata tag of type long, associated with time step ts
and variable var
. This method both defines the tag name and sets it's value
[in] | ts | The time step this metadata field applies to |
[in] | var | The field variable this metadata field applies to |
[in] | tag | Name of metadata tag |
[in] | value | A vector of one or more metadata values |
status | Returns a non-negative integer on success |
Definition at line 1240 of file MetadataVDC.h.
References CHK_VAR_REQ.
|
inline |
Definition at line 1290 of file MetadataVDC.h.
References CHK_VAR_REQ.
int VAPoR::MetadataVDC::Write | ( | const string & | path, |
int | relative_path = 1 |
||
) |
Write the metadata object to a file
[in] | path | Name of the file to write to |
[in] | relative_path | Use relative path names for all data paths |
status | Returns a non-negative integer on success |