VAPOR3 3.9.4
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 ()
 
 DataVar (string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value)
 
 DataVar (string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value, string maskvar)
 
 DataVar (string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location)
 
 DataVar (string name, string units, XType type, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value)
 
 DataVar (string name, string units, XType type, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location, double missing_value, string maskvar)
 
 DataVar (string name, string units, XType type, std::vector< bool > periodic, string mesh, string time_coord_var, Mesh::Location location)
 
virtual ~DataVar ()
 
string GetMeshName () const
 
void SetMeshName (string mesh)
 
string GetTimeCoordVar () const
 
void SetTimeCoordVar (string time_coord_var)
 
Mesh::Location GetSamplingLocation () const
 
string GetMaskvar () const
 Access data variable's mask variable names.
 
void SetMaskvar (string maskvar)
 
bool GetHasMissing () const
 Access data variable's missing data flag.
 
void SetHasMissing (bool has_missing)
 
double GetMissingValue () const
 Access data variable's missing data value.
 
void SetMissingValue (double missing_value)
 
- Public Member Functions inherited from VAPoR::DC::BaseVar
 BaseVar ()
 
 BaseVar (string name, string units, XType type, string wname, std::vector< size_t > cratios, std::vector< bool > periodic)
 
 BaseVar (string name, string units, XType type, std::vector< bool > periodic)
 
virtual ~BaseVar ()
 
string GetName () const
 Get variable name.
 
void SetName (string name)
 
string GetUnits () const
 Access variable units.
 
void SetUnits (string units)
 
XType GetXType () const
 Access variable external storage type.
 
void SetXType (XType type)
 
string GetWName () const
 Access variable's wavelet family name.
 
void SetWName (string wname)
 
std::vector< size_t > GetCRatios () const
 Access variable's compression ratios.
 
void SetCRatios (std::vector< size_t > cratios)
 
std::vector< bool > GetPeriodic () const
 
void SetPeriodic (std::vector< bool > periodic)
 
const std::map< string, Attribute > & GetAttributes () const
 Access variable attributes.
 
void SetAttributes (std::map< string, Attribute > &atts)
 
bool GetAttribute (string name, Attribute &att) const
 
void SetAttribute (const Attribute &att)
 
bool IsCompressed () const
 Return true if no wavelet is defined.
 

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 987 of file DC.h.

Constructor & Destructor Documentation

◆ DataVar() [1/7]

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

Definition at line 989 of file DC.h.

◆ DataVar() [2/7]

VAPoR::DC::DataVar::DataVar ( string  name,
string  units,
XType  type,
string  wname,
std::vector< size_t >  cratios,
std::vector< bool >  periodic,
string  mesh,
string  time_coord_var,
Mesh::Location  location,
double  missing_value 
)
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]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]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
Deprecated:
Results are undefined if the rank of of periodic does not match that of dimensions.
Parameters
[in]meshName of mesh upon which this variable is sampled
[in]time_coord_varName of time coordinate variable. If the variable is time varying this parameter provides the name of it's time coordinate variable. If the variable is invariant over time time_coord_var should be the empty string.
[in]locationLocation of samples on Mesh. Samples can be located at the Mesh nodes, edge centers, face centers, or volume centers.
[in]missing_valueValue of the missing value indicator

Definition at line 1023 of file DC.h.

◆ DataVar() [3/7]

VAPoR::DC::DataVar::DataVar ( string  name,
string  units,
XType  type,
string  wname,
std::vector< size_t >  cratios,
std::vector< bool >  periodic,
string  mesh,
string  time_coord_var,
Mesh::Location  location,
double  missing_value,
string  maskvar 
)
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]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]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
Deprecated:
Results are undefined if the rank of of periodic does not match that of dimensions.
Parameters
[in]meshName of mesh upon which this variable is sampled
[in]time_coord_varName of time coordinate variable. If the variable is time varying this parameter provides the name of it's time coordinate variable. If the variable is invariant over time time_coord_var should be the empty string.
[in]locationLocation of samples on Mesh. Samples can be located at the Mesh nodes, edge centers, face centers, or volume centers.
[in]missing_valueValue used to fill masked values
[in]maskvarName of variable containing mask array.

Definition at line 1058 of file DC.h.

◆ DataVar() [4/7]

VAPoR::DC::DataVar::DataVar ( string  name,
string  units,
XType  type,
string  wname,
std::vector< size_t >  cratios,
std::vector< bool >  periodic,
string  mesh,
string  time_coord_var,
Mesh::Location  location 
)
inline

Construct Data variable definition without missing values

Deprecated:
Parameters
[in]coord_varsNames of coordinate variables associated with this variables dimensions
[in]meshName of mesh upon which this variable is sampled
[in]time_coord_varName of time coordinate variable. If the variable is time varying this parameter provides the name of it's time coordinate variable. If the variable is invariant over time time_coord_var should be the empty string.
[in]locationLocation of samples on Mesh. Samples can be located at the Mesh nodes, edge centers, face centers, or volume centers.

Definition at line 1087 of file DC.h.

◆ DataVar() [5/7]

VAPoR::DC::DataVar::DataVar ( string  name,
string  units,
XType  type,
std::vector< bool >  periodic,
string  mesh,
string  time_coord_var,
Mesh::Location  location,
double  missing_value 
)
inline

Construct Data variable definition with missing values but no compression

No compression constructor

Parameters
[in]nameThe variable's name
Deprecated:
Parameters
[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.
Deprecated:
Parameters
[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.
Deprecated:
Parameters
[in]coord_varsNames of coordinate variables associated with this variables dimensions
[in]meshName of mesh upon which this variable is sampled
[in]time_coord_varName of time coordinate variable. If the variable is time varying this parameter provides the name of it's time coordinate variable. If the variable is invariant over time time_coord_var should be the empty string.
[in]locationLocation of samples on Mesh. Samples can be located at the Mesh nodes, edge centers, face centers, or volume centers.
[in]missing_valueValue of the missing value indicator

Definition at line 1115 of file DC.h.

◆ DataVar() [6/7]

VAPoR::DC::DataVar::DataVar ( string  name,
string  units,
XType  type,
std::vector< bool >  periodic,
string  mesh,
string  time_coord_var,
Mesh::Location  location,
double  missing_value,
string  maskvar 
)
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
Deprecated:
Parameters
[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.
Deprecated:
Parameters
[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.
Deprecated:
Parameters
[in]coord_varsNames of coordinate variables associated
[in]meshName of mesh upon which this variable is sampled
[in]time_coord_varName of time coordinate variable. If the variable is time varying this parameter provides the name of it's time coordinate variable. If the variable is invariant over time time_coord_var should be the empty string.
[in]locationLocation of samples on Mesh. Samples can be located at the Mesh nodes, edge centers, face centers, or volume centers.

with this variables dimensions

Parameters
[in]missing_valueValue used to fill masked values
[in]maskvarName of variable containing mask array.

Definition at line 1151 of file DC.h.

◆ DataVar() [7/7]

VAPoR::DC::DataVar::DataVar ( string  name,
string  units,
XType  type,
std::vector< bool >  periodic,
string  mesh,
string  time_coord_var,
Mesh::Location  location 
)
inline

Construct Data variable definition with no missing values or compression

No compression constructor

Parameters
[in]nameThe variable's name
Deprecated:
Parameters
[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.
Deprecated:
Parameters
[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]coord_varsNames of coordinate variables associated with this variables dimensions
[in]time_coord_varName of time coordinate variable. If the variable is time varying this parameter provides the name of it's time coordinate variable. If the variable is invariant over time time_coord_var should be the empty string.

Definition at line 1171 of file DC.h.

◆ ~DataVar()

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

Definition at line 1176 of file DC.h.

Member Function Documentation

◆ GetHasMissing()

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

Access data variable's missing data flag.

Definition at line 1202 of file DC.h.

◆ GetMaskvar()

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

Access data variable's mask variable names.

Definition at line 1197 of file DC.h.

◆ GetMeshName()

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

Access variable's mesh name

Version
3.1

Definition at line 1181 of file DC.h.

◆ GetMissingValue()

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

Access data variable's missing data value.

Definition at line 1207 of file DC.h.

◆ GetSamplingLocation()

Mesh::Location VAPoR::DC::DataVar::GetSamplingLocation ( ) const
inline

Access variable's sampling location on mesh

Version
3.1

Definition at line 1193 of file DC.h.

◆ GetTimeCoordVar()

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

Access variable's time coordinate variable name

Version
3.1

Definition at line 1187 of file DC.h.

◆ SetHasMissing()

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

Definition at line 1203 of file DC.h.

◆ SetMaskvar()

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

Definition at line 1198 of file DC.h.

◆ SetMeshName()

void VAPoR::DC::DataVar::SetMeshName ( string  mesh)
inline

Definition at line 1182 of file DC.h.

◆ SetMissingValue()

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

Definition at line 1208 of file DC.h.

◆ SetTimeCoordVar()

void VAPoR::DC::DataVar::SetTimeCoordVar ( string  time_coord_var)
inline

Definition at line 1188 of file DC.h.

Friends And Related Function Documentation

◆ operator<<

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

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