VAPoR  3.0.0
Public Member Functions | Friends | List of all members
VAPoR::DC::DataVar Class Reference

Data variable metadata. More...

#include <DC.h>

Inheritance diagram for VAPoR::DC::DataVar:
VAPoR::DC::BaseVar

Public Member Functions

 DataVar ()
 constructor for default Data variable definition More...
 
 DataVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< size_t > bs, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, std::vector< string > coordvars, double missing_value)
 
 DataVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< size_t > bs, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, std::vector< string > coordvars, double missing_value, string maskvar)
 
 DataVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< size_t > bs, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, std::vector< string > coordvars)
 
 DataVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< bool > periodic, std::vector< string > coordvars, double missing_value)
 
 DataVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< bool > periodic, std::vector< string > coordvars, double missing_value, string maskvar)
 
 DataVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< bool > periodic, std::vector< string > coordvars)
 
virtual ~DataVar ()
 
std::vector< string > GetCoordvars () const
 Access data variable's coordinate variable names. More...
 
void SetCoordvars (std::vector< string > coordvars)
 
string GetMaskvar () const
 Access data variable's mask variable names. More...
 
void SetMaskvar (string maskvar)
 
bool GetHasMissing () const
 Access data variable's missing data flag. More...
 
void SetHasMissing (bool has_missing)
 
double GetMissingValue () const
 Access data variable's missing data value. More...
 
void SetMissingValue (double missing_value)
 
- Public Member Functions inherited from VAPoR::DC::BaseVar
 BaseVar ()
 
 BaseVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< size_t > bs, string wname, std::vector< size_t > cratios, std::vector< bool > periodic)
 
 BaseVar (string name, std::vector< DC::Dimension > dimensions, string units, XType type, std::vector< bool > periodic)
 
virtual ~BaseVar ()
 
string GetName () const
 Get variable name. More...
 
void SetName (string name)
 
std::vector< DC::DimensionGetDimensions () const
 Access variable's dimension names. More...
 
void SetDimensions (std::vector< DC::Dimension > dimensions)
 
string GetUnits () const
 Access variable units. More...
 
void SetUnits (string units)
 
XType GetXType () const
 Access variable external storage type. More...
 
void SetXType (XType type)
 
std::vector< size_t > GetBS () const
 Access variable's block size. More...
 
void SetBS (std::vector< size_t > bs)
 
string GetWName () const
 Access variable's wavelet family name. More...
 
void SetWName (string wname)
 
std::vector< size_t > GetCRatios () const
 Access variable's compression ratios. More...
 
void SetCRatios (std::vector< size_t > cratios)
 
std::vector< bool > GetPeriodic () const
 Access variable bounary periodic. More...
 
void SetPeriodic (std::vector< bool > periodic)
 
std::map< string, AttributeGetAttributes () const
 Access variable attributes. More...
 
void SetAttributes (std::map< string, Attribute > &atts)
 
bool IsCompressed () const
 Return true if no wavelet is defined. More...
 
bool IsTimeVarying () const
 Return true if a time dimension is present. More...
 

Friends

VDF_API friend std::ostream & operator<< (std::ostream &o, const DataVar &var)
 

Detailed Description

Data variable metadata.

This class defines metadata associatd with a Data variable

Definition at line 557 of file DC.h.

Constructor & Destructor Documentation

VAPoR::DC::DataVar::DataVar ( )
inline

constructor for default Data variable definition

Definition at line 562 of file DC.h.

VAPoR::DC::DataVar::DataVar ( string  name,
std::vector< DC::Dimension dimensions,
string  units,
XType  type,
std::vector< size_t >  bs,
string  wname,
std::vector< size_t >  cratios,
std::vector< bool >  periodic,
std::vector< string >  coordvars,
double  missing_value 
)
inline

Construct Data variable definition with missing values

Elements of the variable whose value matches that specified by missing_value are considered invalid

Constructor

Parameters
[in]nameThe variable's name
[in]dimensionsAn ordered vector specifying the variable's spatial and/or temporal dimensions
[in]unitsA string recognized by Udunits-2 specifying the unit measure for the variable. An empty string indicates that the variable is unitless.
[in]typeThe external storage type for variable data
[in]bsAn ordered array specifying the storage blocking factor for the variable. Results are undefined if the rank of of bs does not match that of dimensions spatial dimensions. dimensions only the needed elements of bs are accessed
[in]wnameThe wavelet family name for compressed variables
[in]cratiosSpecifies a vector of compression factors for compressed variable definitions. If empty, or if cratios.size()==1 and cratios[0]==1, the variable is not compressed
[in]periodicAn ordered array of booleans specifying the spatial boundary periodicity. Results are undefined if the rank of of periodic does not match that of dimensions.
[in]coordvarsNames of coordinate variables associated with this variables dimensions
[in]missing_valueValue of the missing value indicator

Definition at line 584 of file DC.h.

VAPoR::DC::DataVar::DataVar ( string  name,
std::vector< DC::Dimension dimensions,
string  units,
XType  type,
std::vector< size_t >  bs,
string  wname,
std::vector< size_t >  cratios,
std::vector< bool >  periodic,
std::vector< string >  coordvars,
double  missing_value,
string  maskvar 
)
inline

Construct Data variable definition with a mask variable

This version of the constructor specifies the name of a variable varmask whose contents indicate the presense or absense of invalid entries in the data variable. The contents of the mask array are treated as booleans, true values indicating valid data. The rank of of the variable may be less than or equal to that of name. The dimensions of maskvar must match the fastest varying dimensions of name.

Constructor

Parameters
[in]nameThe variable's name
[in]dimensionsAn ordered vector specifying the variable's spatial and/or temporal dimensions
[in]unitsA string recognized by Udunits-2 specifying the unit measure for the variable. An empty string indicates that the variable is unitless.
[in]typeThe external storage type for variable data
[in]bsAn ordered array specifying the storage blocking factor for the variable. Results are undefined if the rank of of bs does not match that of dimensions spatial dimensions. dimensions only the needed elements of bs are accessed
[in]wnameThe wavelet family name for compressed variables
[in]cratiosSpecifies a vector of compression factors for compressed variable definitions. If empty, or if cratios.size()==1 and cratios[0]==1, the variable is not compressed
[in]periodicAn ordered array of booleans specifying the spatial boundary periodicity. Results are undefined if the rank of of periodic does not match that of dimensions.
[in]coordvarsNames of coordinate variables associated with this variables dimensions
[in]missing_valueValue used to fill masked values
[in]maskvarName of variable containing mask array.

Definition at line 622 of file DC.h.

VAPoR::DC::DataVar::DataVar ( string  name,
std::vector< DC::Dimension dimensions,
string  units,
XType  type,
std::vector< size_t >  bs,
string  wname,
std::vector< size_t >  cratios,
std::vector< bool >  periodic,
std::vector< string >  coordvars 
)
inline

Construct Data variable definition without missing values

Parameters
[in]coordvarsNames of coordinate variables associated with this variables dimensions

Definition at line 651 of file DC.h.

VAPoR::DC::DataVar::DataVar ( string  name,
std::vector< DC::Dimension dimensions,
string  units,
XType  type,
std::vector< bool >  periodic,
std::vector< string >  coordvars,
double  missing_value 
)
inline

Construct Data variable definition with missing values but no compression

No compression constructor

Parameters
[in]nameThe variable's name
[in]dimensionsAn ordered vector specifying the variable's spatial and/or temporal dimensions
[in]unitsA string recognized by Udunits-2 specifying the unit measure for the variable. An empty string indicates that the variable is unitless.
[in]typeThe external storage type for variable data factor for the variable.
[in]periodicAn ordered array of booleans specifying the spatial boundary periodicity. Results are undefined if the rank of of periodic does not match that of dimensions.
[in]coordvarsNames of coordinate variables associated with this variables dimensions
[in]missing_valueValue of the missing value indicator

Definition at line 678 of file DC.h.

VAPoR::DC::DataVar::DataVar ( string  name,
std::vector< DC::Dimension dimensions,
string  units,
XType  type,
std::vector< bool >  periodic,
std::vector< string >  coordvars,
double  missing_value,
string  maskvar 
)
inline

Construct Data variable definition with a mask but no compression

This version of the constructor specifies the name of a variable varmask whose contents indicate the presense or absense of invalid entries in the data variable. The contents of the mask array are treated as booleans, true values indicating valid data. The rank of of the variable may be less than or equal to that of name. The dimensions of maskvar must match the fastest varying dimensions of name.

No compression constructor

Parameters
[in]nameThe variable's name
[in]dimensionsAn ordered vector specifying the variable's spatial and/or temporal dimensions
[in]unitsA string recognized by Udunits-2 specifying the unit measure for the variable. An empty string indicates that the variable is unitless.
[in]typeThe external storage type for variable data factor for the variable.
[in]periodicAn ordered array of booleans specifying the spatial boundary periodicity. Results are undefined if the rank of of periodic does not match that of dimensions.
[in]coordvarsNames of coordinate variables associated with this variables dimensions
[in]missing_valueValue used to fill masked values
[in]maskvarName of variable containing mask array.

Definition at line 711 of file DC.h.

VAPoR::DC::DataVar::DataVar ( string  name,
std::vector< DC::Dimension dimensions,
string  units,
XType  type,
std::vector< bool >  periodic,
std::vector< string >  coordvars 
)
inline

Construct Data variable definition with no missing values or compression

No compression constructor

Parameters
[in]nameThe variable's name
[in]dimensionsAn ordered vector specifying the variable's spatial and/or temporal dimensions
[in]unitsA string recognized by Udunits-2 specifying the unit measure for the variable. An empty string indicates that the variable is unitless.
[in]typeThe external storage type for variable data factor for the variable.
[in]periodicAn ordered array of booleans specifying the spatial boundary periodicity. Results are undefined if the rank of of periodic does not match that of dimensions.
[in]coordvarsNames of coordinate variables associated with this variables dimensions

Definition at line 735 of file DC.h.

virtual VAPoR::DC::DataVar::~DataVar ( )
inlinevirtual

Definition at line 750 of file DC.h.

Member Function Documentation

std::vector<string> VAPoR::DC::DataVar::GetCoordvars ( ) const
inline

Access data variable's coordinate variable names.

Definition at line 754 of file DC.h.

bool VAPoR::DC::DataVar::GetHasMissing ( ) const
inline

Access data variable's missing data flag.

Definition at line 764 of file DC.h.

string VAPoR::DC::DataVar::GetMaskvar ( ) const
inline

Access data variable's mask variable names.

Definition at line 759 of file DC.h.

double VAPoR::DC::DataVar::GetMissingValue ( ) const
inline

Access data variable's missing data value.

Definition at line 769 of file DC.h.

void VAPoR::DC::DataVar::SetCoordvars ( std::vector< string >  coordvars)
inline

Definition at line 755 of file DC.h.

void VAPoR::DC::DataVar::SetHasMissing ( bool  has_missing)
inline

Definition at line 765 of file DC.h.

void VAPoR::DC::DataVar::SetMaskvar ( string  maskvar)
inline

Definition at line 760 of file DC.h.

void VAPoR::DC::DataVar::SetMissingValue ( double  missing_value)
inline

Definition at line 770 of file DC.h.

Friends And Related Function Documentation

VDF_API friend std::ostream& operator<< ( std::ostream &  o,
const DataVar var 
)
friend

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