VAPOR3 3.9.4
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VAPoR::DC Class Referenceabstract

A Template Method design pattern for reading a collection of data. More...

#include <DC.h>

Inheritance diagram for VAPoR::DC:
Wasp::MyBase VAPoR::DCBOV VAPoR::DCCF VAPoR::DCMPAS VAPoR::DCP VAPoR::DCRAM VAPoR::DCWRF VAPoR::DerivedVarMgr VAPoR::VDC

Classes

class  Attribute
 Variable or global metadata. More...
 
class  AuxVar
 Auxiliary variable metadata. More...
 
class  BaseVar
 Base class for storing variable metadata. More...
 
class  CoordVar
 Coordinate variable metadata. More...
 
class  DataVar
 Data variable metadata. More...
 
class  Dimension
 Metadata describing a named dimension length. More...
 
class  FileTable
 
class  Mesh
 Metadata describing a computational mesh. More...
 

Public Types

enum  XType {
  INVALID = -1 , FLOAT , DOUBLE , UINT8 ,
  INT8 , INT32 , INT64 , TEXT
}
 External storage types for primitive data. More...
 
- Public Types inherited from Wasp::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 

Public Member Functions

 DC ()
 
virtual ~DC ()
 
virtual int Initialize (const std::vector< string > &paths, const std::vector< string > &options=std::vector< string >())
 
virtual bool GetDimension (string dimname, DC::Dimension &dimension, long ts) const
 
virtual std::vector< string > GetDimensionNames () const
 
virtual std::vector< string > GetMeshNames () const
 
virtual bool GetMesh (string mesh_name, DC::Mesh &mesh) const
 
virtual bool GetMeshDimLens (const string &mesh_name, std::vector< size_t > &dims, long ts=-1) const
 
virtual bool GetMeshDimNames (const string &mesh_name, std::vector< string > &dimnames) const
 
virtual bool GetCoordVarInfo (string varname, DC::CoordVar &cvar) const
 
virtual bool GetDataVarInfo (string varname, DC::DataVar &datavar) const
 
virtual bool GetAuxVarInfo (string varname, DC::AuxVar &var) const
 
virtual bool GetBaseVarInfo (string varname, DC::BaseVar &var) const
 
virtual std::vector< string > GetDataVarNames () const
 
virtual std::vector< string > GetCoordVarNames () const
 
virtual std::vector< string > GetAuxVarNames () const
 
virtual size_t GetNumRefLevels (string varname) const
 
virtual bool GetAtt (string varname, string attname, vector< double > &values) const
 
virtual bool GetAtt (string varname, string attname, vector< long > &values) const
 
virtual bool GetAtt (string varname, string attname, string &values) const
 
virtual std::vector< string > GetAttNames (string varname) const
 
virtual XType GetAttType (string varname, string attname) const
 
virtual int GetDimLensAtLevel (string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts=-1) const
 
virtual int GetDimLens (string varname, std::vector< size_t > &dims, long ts=-1)
 
virtual string GetMapProjection () const
 
virtual int OpenVariableRead (size_t ts, string varname, int level=0, int lod=0)
 
virtual int CloseVariable (int fd)
 
virtual int Read (int fd, float *data)
 
virtual int Read (int fd, double *data)
 
virtual int Read (int fd, int *data)
 
virtual int ReadSlice (int fd, float *slice)
 
virtual int ReadSlice (int fd, double *slice)
 
virtual int ReadSlice (int fd, int *slice)
 
virtual int ReadRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, float *region)
 
virtual int ReadRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, double *region)
 
virtual int ReadRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)
 
virtual int GetVar (string varname, int level, int lod, float *data)
 
virtual int GetVar (string varname, int level, int lod, double *data)
 
virtual int GetVar (string varname, int level, int lod, int *data)
 
virtual int GetVar (size_t ts, string varname, int level, int lod, float *data)
 
virtual int GetVar (size_t ts, string varname, int level, int lod, double *data)
 
virtual int GetVar (size_t ts, string varname, int level, int lod, int *data)
 
virtual bool VariableExists (size_t ts, string varname, int reflevel=0, int lod=0) const
 
virtual int GetHyperSliceInfo (string varname, int level, std::vector< size_t > &dims, size_t &nslice, long ts=-1)
 
virtual std::vector< string > GetDataVarNames (int ndim) const
 
virtual bool GetVarDimensions (string varname, bool spatial, vector< DC::Dimension > &dimensions, long ts) const
 
virtual bool GetVarDimLens (string varname, bool spatial, vector< size_t > &dimlens, long ts=-1) const
 
virtual bool GetVarDimLens (string varname, vector< size_t > &sdimlens, size_t &time_dimlen, long ts=-1) const
 
virtual bool GetVarDimNames (string varname, bool spatial, vector< string > &dimnames) const
 
virtual bool GetVarDimNames (string varname, vector< string > &sdimnames, string &time_dimname) const
 
virtual size_t GetVarTopologyDim (string varname) const
 
virtual size_t GetVarGeometryDim (string varname) const
 
virtual bool IsTimeVarying (string varname) const
 
virtual bool IsCompressed (string varname) const
 
virtual int GetNumTimeSteps (string varname) const
 
virtual std::vector< size_t > GetCRatios (string varname) const
 
virtual bool IsDataVar (string varname) const
 
virtual bool IsCoordVar (string varname) const
 
virtual bool IsAuxVar (string varname) const
 
virtual bool GetVarCoordVars (string varname, bool spatial, std::vector< string > &coord_vars) const
 
bool GetVarConnVars (string varname, string &face_node_var, string &node_face_var, string &face_edge_var, string &face_face_var, string &edge_node_var, string &edge_face_var) const
 
virtual size_t GetNumDimensions (string varname) const
 
std::vector< string > GetTimeCoordVarNames () const
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

virtual int initialize (const std::vector< string > &paths, const std::vector< string > &options=std::vector< string >())=0
 
virtual bool getDimension (string dimname, DC::Dimension &dimension) const =0
 
virtual bool getDimension (string dimname, DC::Dimension &dimension, long ts) const
 
virtual std::vector< string > getDimensionNames () const =0
 
virtual std::vector< string > getMeshNames () const =0
 
virtual bool getMesh (string mesh_name, DC::Mesh &mesh) const =0
 
virtual bool getCoordVarInfo (string varname, DC::CoordVar &cvar) const =0
 
virtual bool getDataVarInfo (string varname, DC::DataVar &datavar) const =0
 
virtual bool getAuxVarInfo (string varname, DC::AuxVar &var) const =0
 
virtual bool getBaseVarInfo (string varname, DC::BaseVar &var) const =0
 
virtual std::vector< string > getDataVarNames () const =0
 
virtual std::vector< string > getCoordVarNames () const =0
 
virtual std::vector< string > getAuxVarNames () const =0
 
virtual size_t getNumRefLevels (string varname) const =0
 
virtual bool getAtt (string varname, string attname, vector< double > &values) const =0
 
virtual bool getAtt (string varname, string attname, vector< long > &values) const =0
 
virtual bool getAtt (string varname, string attname, string &values) const =0
 
virtual std::vector< string > getAttNames (string varname) const =0
 
virtual XType getAttType (string varname, string attname) const =0
 
virtual vector< size_t > getBlockSize () const
 
virtual int getDimLensAtLevel (string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level) const =0
 
virtual int getDimLensAtLevel (string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts) const
 
virtual string getMapProjection () const =0
 
virtual int openVariableRead (size_t ts, string varname, int level=0, int lod=0)=0
 
virtual int closeVariable (int fd)=0
 
virtual int readRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, float *region)=0
 
virtual int readRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, double *region)=0
 
virtual int readRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)=0
 
virtual bool variableExists (size_t ts, string varname, int reflevel=0, int lod=0) const =0
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Protected Attributes

DC::FileTable _fileTable
 

Additional Inherited Members

- Static Public Member Functions inherited from Wasp::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message.
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code.
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code.
 
static int GetErrCode ()
 Retrieve the current error code.
 
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.
 
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 bool GetEnableErrMsg ()
 
- Static Public Attributes inherited from Wasp::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
 

Detailed Description

A Template Method design pattern for reading a collection of data.

Author
John Clyne
Date
January, 2015

The Data Collection (DC) class defines an Template Method for reading metadata and sampled data from a data collection. A data collection is a set of related data, most typically the discrete outputs from a single numerical simulation. The DC class is a Template Method: if provides an abstract interface for accessing a data collection, and a set of protected pure virtual functions that must be implemented by derived classes providing access to a particular file format.

Variables in a DC may have 1, 2, or 3 topological dimensions, and 0 or 1 temporal dimensions.

The DC is structured in the spirit of the "NetCDF Climate and Forecast (CF) Metadata Conventions", version 1.6, 5, December 2011. It supports only a subset of the CF functionality (e.g. there is no support for "Discrete Sampling Geometries"). Moreover, it is more restrictive than the CF in a number of areas. Particular items of note include:

This class inherits from Wasp::MyBase. Unless otherwise documented any method that returns an integer value is returning status. A negative value indicates failure. Error messages are logged via Wasp::MyBase::SetErrMsg(). Methods that return a boolean do not, unless otherwise documented, log an error message upon failure (return of false).

Parameters
level

Grid refinement level for multiresolution variables. Compressed variables in the DC, if they exist, have a multi-resolution representation: the sampling grid for multi-resolution variables is hierarchical, and the dimension lengths of adjacent levels in the hierarchy differ by a factor of two. The level parameter is used to select a particular depth of the hierarchy.

To provide maximum flexibility as well as compatibility with previous versions of the DC the interpretation of level is somewhat complex. Both positive and negative values may be used to specify the refinement level and have different interpretations.

For positive values of level, a value of 0 indicates the coarsest member of the grid hierarchy. A value of 1 indicates the next grid refinement after the coarsest, and so on. Using postive values the finest level in the hierarchy is given by GetNumRefLevels() - 1. Values of level that are greater than GetNumRefLevels() - 1 are treated as if they were equal to GetNumRefLevels() - 1.

For negative values of level a value of -1 indicates the variable's native grid resolution (the finest resolution available). A value of -2 indicates the next coarsest member in the hierarchy after the finest, and so on. Using negative values the coarsest available level in the hierarchy is given by negating the value returned by GetNumRefLevels(). Values of level that are less than the negation of GetNumRefLevels() are treated as if they were equal to the negation of the GetNumRefLevels() return value.

lod

The level-of-detail parameter, lod, selects the approximation level for a compressed variable. The lod parameter is similar to the level parameter in that it provides control over accuracy of a compressed variable. However, instead of selecting the grid resolution the lod parameter controls the compression factor by indexing into the cratios vector (see below). As with the level parameter, both positive and negative values may be used to index into cratios and different interpretations.

For positive values of lod, a value of 0 indicates the the first element of cratios, a value of 1 indicates the second element, and so on up to the size of the cratios vector (See DC::GetCRatios()).

For negative values of lod a value of -1 indexes the last element of cratios, a value of -2 indexes the second to last element, and so on. Using negative values the first element of cratios - the greatest compression rate - is indexed by negating the size of the cratios vector.

cratiosA monotonically decreasing vector of compression ratios. Compressed variables in the DC are stored with a fixed, finite number of compression factors. The cratios vector is used to specify the available compression factors (ratios). A compression factor of 1 indicates no compression (1:1). A value of 2 indciates two to one compression (2:1), and so on. The minimum valid value of cratios is 1. The maximum value is determined by a number of factors and can be obtained using the CompressionInfo() method.
bsAn ordered list of block dimensions that specifies the spatial block decomposition of the variable. The rank of bs may be less than that of a variable's array dimensions (or empty), in which case only the n fastest varying variable dimensions will be blocked, where n is the rank of bs. The ordering of the dimensions in bs is from fastest to slowest. A block is the basic unit of compression in the DC: variables are decomposed into blocks, and individual blocks are compressed independently. Note, the time dimension is never blocked.
wnameName of wavelet used for transforming compressed variables between wavelet and physical space. Valid values are "bior1.1", "bior1.3", "bior1.5", "bior2.2", "bior2.4", "bior2.6", "bior2.8", "bior3.1", "bior3.3", "bior3.5", "bior3.7", "bior3.9", "bior4.4"

Definition at line 150 of file DC.h.

Member Enumeration Documentation

◆ XType

External storage types for primitive data.

Enumerator
INVALID 
FLOAT 
DOUBLE 
UINT8 
INT8 
INT32 
INT64 
TEXT 

Definition at line 154 of file DC.h.

Constructor & Destructor Documentation

◆ DC()

VAPoR::DC::DC ( )

Class constuctor

◆ ~DC()

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

Definition at line 1283 of file DC.h.

Member Function Documentation

◆ CloseVariable()

virtual int VAPoR::DC::CloseVariable ( int  fd)
inlinevirtual

Close the currently opened variable

Close the handle for variable opened with OpenVariableRead()

Parameters
[in]fdA valid file descriptor returned by OpenVariableRead()
See also
OpenVariableRead()

Reimplemented in VAPoR::DCUGRID.

Definition at line 1615 of file DC.h.

◆ closeVariable()

virtual int VAPoR::DC::closeVariable ( int  fd)
protectedpure virtual

Close the currently opened variable

Close the handle for variable opened with OpenVariableRead()

Parameters
[in]fdA valid file descriptor returned by OpenVariableRead()
See also
OpenVariableRead()

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, VAPoR::VDCNetCDF, and VAPoR::VDC.

◆ GetAtt() [1/3]

virtual bool VAPoR::DC::GetAtt ( string  varname,
string  attname,
string &  values 
) const
inlinevirtual

Definition at line 1480 of file DC.h.

◆ getAtt() [1/3]

virtual bool VAPoR::DC::getAtt ( string  varname,
string  attname,
string &  values 
) const
protectedpure virtual

◆ GetAtt() [2/3]

virtual bool VAPoR::DC::GetAtt ( string  varname,
string  attname,
vector< double > &  values 
) const
inlinevirtual

Read an attribute

This method reads an attribute from the DC. The attribute can either be "global", if varname is the empty string, or bound to a variable if varname indentifies a variable in the DC.

Parameters
[in]varnameThe name of the variable the attribute is bound to, or the empty string if the attribute is global
[in]attnameThe attributes name
[out]typeThe primitive data type storage format. This is the type that will be used to store the attribute on disk
[out]valuesA vector to contain the returned floating point attribute values
Return values
statusTrue is returned on success. False is returned if either the variable or the attribute is undefined.

Definition at line 1476 of file DC.h.

◆ getAtt() [2/3]

virtual bool VAPoR::DC::getAtt ( string  varname,
string  attname,
vector< double > &  values 
) const
protectedpure virtual

◆ GetAtt() [3/3]

virtual bool VAPoR::DC::GetAtt ( string  varname,
string  attname,
vector< long > &  values 
) const
inlinevirtual

Definition at line 1478 of file DC.h.

◆ getAtt() [3/3]

virtual bool VAPoR::DC::getAtt ( string  varname,
string  attname,
vector< long > &  values 
) const
protectedpure virtual

◆ GetAttNames()

virtual std::vector< string > VAPoR::DC::GetAttNames ( string  varname) const
inlinevirtual

Return a list of available attribute's names

Returns a vector of all attribute names for the variable, varname. If varname is the empty string the names of all of the global attributes are returned. If varname is not defined an empty vector is returned.

Parameters
[in]varnameThe name of the variable to query, or the empty string if the names of global attributes are desired.
Return values
attnamesA vector of returned attribute names
See also
GetAtt()

Definition at line 1495 of file DC.h.

◆ getAttNames()

virtual std::vector< string > VAPoR::DC::getAttNames ( string  varname) const
protectedpure virtual

Return a list of available attribute's names

Returns a vector of all attribute names for the variable, varname. If varname is the empty string the names of all of the global attributes are returned. If varname is not defined an empty vector is returned.

Parameters
[in]varnameThe name of the variable to query, or the empty string if the names of global attributes are desired.
Return values
attnamesA vector of returned attribute names
See also
GetAtt()

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetAttType()

virtual XType VAPoR::DC::GetAttType ( string  varname,
string  attname 
) const
inlinevirtual

Return the external data type for an attribute

Returns the external storage type of the named variable attribute.

Parameters
[in]varnameThe name of the variable to query, or the empty string if the names of global attributes are desired.
[in]nameName of the attribute.
Return values
Ifan attribute named by name does not exist, a negative value is returned.

Definition at line 1508 of file DC.h.

◆ getAttType()

virtual XType VAPoR::DC::getAttType ( string  varname,
string  attname 
) const
protectedpure virtual

Return the external data type for an attribute

Returns the external storage type of the named variable attribute.

Parameters
[in]varnameThe name of the variable to query, or the empty string if the names of global attributes are desired.
[in]nameName of the attribute.
Return values
Ifan attribute named by name does not exist, a negative value is returned.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetAuxVarInfo()

virtual bool VAPoR::DC::GetAuxVarInfo ( string  varname,
DC::AuxVar var 
) const
inlinevirtual

Return metadata about an auxiliary variable

If the variable varname is defined as an auxiliary variable its metadata will be returned in var.

Return values
boolIf the named variable cannot be found false is returned and the values of var are undefined.
See also
GetDataVarInfo(), GetCoordVarInfo()

Definition at line 1401 of file DC.h.

◆ getAuxVarInfo()

virtual bool VAPoR::DC::getAuxVarInfo ( string  varname,
DC::AuxVar var 
) const
protectedpure virtual

Return metadata about an auxiliary variable

If the variable varname is defined as an auxiliary variable its metadata will be returned in var.

Return values
boolIf the named variable cannot be found false is returned and the values of var are undefined.
See also
GetDataVarInfo(), GetCoordVarInfo()

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::VDC, and VAPoR::DerivedVarMgr.

◆ GetAuxVarNames()

virtual std::vector< string > VAPoR::DC::GetAuxVarNames ( ) const
inlinevirtual

Return a list of names for all of the defined Auxiliary variables.

Returns a list of names for all Auxiliary variables defined

See also
DC::AuxVar

Definition at line 1438 of file DC.h.

◆ getAuxVarNames()

virtual std::vector< string > VAPoR::DC::getAuxVarNames ( ) const
protectedpure virtual

Return a list of names for all of the defined Auxiliary variables.

Returns a list of names for all Auxiliary variables defined

See also
DC::AuxVar

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetBaseVarInfo()

virtual bool VAPoR::DC::GetBaseVarInfo ( string  varname,
DC::BaseVar var 
) const
inlinevirtual

Return metadata about a data or coordinate variable

If the variable varname is defined as either a data or coordinate variable its metadata will be returned in var.

Return values
boolIf the named variable cannot be found false is returned and the values of var are undefined.
See also
GetDataVarInfo(), GetCoordVarInfo()

Definition at line 1414 of file DC.h.

◆ getBaseVarInfo()

virtual bool VAPoR::DC::getBaseVarInfo ( string  varname,
DC::BaseVar var 
) const
protectedpure virtual

Return metadata about a data or coordinate variable

If the variable varname is defined as either a data or coordinate variable its metadata will be returned in var.

Return values
boolIf the named variable cannot be found false is returned and the values of var are undefined.
See also
GetDataVarInfo(), GetCoordVarInfo()

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::VDC, and VAPoR::DerivedVarMgr.

◆ getBlockSize()

virtual vector< size_t > VAPoR::DC::getBlockSize ( ) const
inlineprotectedvirtual

Reimplemented in VAPoR::VDC.

Definition at line 2178 of file DC.h.

◆ GetCoordVarInfo()

virtual bool VAPoR::DC::GetCoordVarInfo ( string  varname,
DC::CoordVar cvar 
) const
inlinevirtual

Return a coordinate variable's definition

Return a reference to a DC::CoordVar object describing the coordinate variable named by varname

Parameters
[in]varnameA string specifying the name of the coordinate variable.
[out]coordvarA CoordVar object containing the definition of the named variable.
Return values
boolFalse is returned if the named coordinate variable does not exist, and the contents of cvar will be undefined.

Definition at line 1374 of file DC.h.

◆ getCoordVarInfo()

virtual bool VAPoR::DC::getCoordVarInfo ( string  varname,
DC::CoordVar cvar 
) const
protectedpure virtual

Return a coordinate variable's definition

Return a reference to a DC::CoordVar object describing the coordinate variable named by varname

Parameters
[in]varnameA string specifying the name of the coordinate variable.
[out]coordvarA CoordVar object containing the definition of the named variable.
Return values
boolFalse is returned if the named coordinate variable does not exist, and the contents of cvar will be undefined.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::VDC, and VAPoR::DerivedVarMgr.

◆ GetCoordVarNames()

virtual std::vector< string > VAPoR::DC::GetCoordVarNames ( ) const
inlinevirtual

Return a list of names for all of the defined coordinate variables.

Returns a list of names for all coordinate variables defined

See also
DC::CoordVar

Definition at line 1430 of file DC.h.

◆ getCoordVarNames()

virtual std::vector< string > VAPoR::DC::getCoordVarNames ( ) const
protectedpure virtual

Return a list of names for all of the defined coordinate variables.

Returns a list of names for all coordinate variables defined

See also
DC::CoordVar

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetCRatios()

virtual std::vector< size_t > VAPoR::DC::GetCRatios ( string  varname) const
virtual

Return the compression ratio vector for the indicated variable

Return the compression ratio vector for the indicated variable. The vector returned contains an ordered list of available compression ratios for the variable named by variable. If the variable is not compressed, or the variable named varname does not exist, the cratios parameter will contain a single element, one.

Return values
cratiosOrdered vector of compression ratios

◆ GetDataVarInfo()

virtual bool VAPoR::DC::GetDataVarInfo ( string  varname,
DC::DataVar datavar 
) const
inlinevirtual

Return a data variable's definition

Return a reference to a DC::DataVar object describing the data variable named by varname

Parameters
[in]varnameA string specifying the name of the variable.
[out]datavarA DataVar object containing the definition of the named Data variable.
Return values
boolIf the named data variable cannot be found false is returned and the values of datavar are undefined.

Definition at line 1388 of file DC.h.

◆ getDataVarInfo()

virtual bool VAPoR::DC::getDataVarInfo ( string  varname,
DC::DataVar datavar 
) const
protectedpure virtual

Return a data variable's definition

Return a reference to a DC::DataVar object describing the data variable named by varname

Parameters
[in]varnameA string specifying the name of the variable.
[out]datavarA DataVar object containing the definition of the named Data variable.
Return values
boolIf the named data variable cannot be found false is returned and the values of datavar are undefined.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::VDC, and VAPoR::DerivedVarMgr.

◆ GetDataVarNames() [1/2]

virtual std::vector< string > VAPoR::DC::GetDataVarNames ( ) const
inlinevirtual

Return a list of names for all of the defined data variables.

Returns a list of names for all data variables defined

See also
DC::DataVar

Definition at line 1422 of file DC.h.

◆ getDataVarNames()

virtual std::vector< string > VAPoR::DC::getDataVarNames ( ) const
protectedpure virtual

Return a list of names for all of the defined data variables.

Returns a list of names for all data variables defined

See also
DC::DataVar

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetDataVarNames() [2/2]

virtual std::vector< string > VAPoR::DC::GetDataVarNames ( int  ndim) const
virtual

Return a list of data variables with a given topological dimension

Returns a list of all data variables defined having a a topological dimension ndim.

Parameters
[in]ndimTopological dimension
See also
GetVarTopologyDim()

◆ getDimension() [1/2]

virtual bool VAPoR::DC::getDimension ( string  dimname,
DC::Dimension dimension 
) const
protectedpure virtual

Return a dimensions's definition

This method returns the definition of the dimension named by dimname as a reference to a DC::Dimension object. If dimname is not defined as a dimension then the name of dimension will be the empty string()

Parameters
[in]dimnameA string specifying the name of the dimension.
[out]dimensionThe returned Dimension object reference
Return values
boolIf the named dimension can not be found false is returned.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetDimension()

virtual bool VAPoR::DC::GetDimension ( string  dimname,
DC::Dimension dimension,
long  ts 
) const
inlinevirtual

Return a dimensions's definition

This method returns the definition of the dimension named by dimname as a reference to a DC::Dimension object. If dimname is not defined as a dimension then the name of dimension will be the empty string()

Parameters
[in]dimnameA string specifying the name of the dimension.
[out]dimensionThe returned Dimension object reference
Return values
boolIf the named dimension can not be found false is returned.

Definition at line 1315 of file DC.h.

◆ getDimension() [2/2]

virtual bool VAPoR::DC::getDimension ( string  dimname,
DC::Dimension dimension,
long  ts 
) const
inlineprotectedvirtual

Return a dimensions's definition

This method returns the definition of the dimension named by dimname as a reference to a DC::Dimension object. If dimname is not defined as a dimension then the name of dimension will be the empty string()

Parameters
[in]dimnameA string specifying the name of the dimension.
[out]dimensionThe returned Dimension object reference
Return values
boolIf the named dimension can not be found false is returned.

Reimplemented in VAPoR::DCP, and VAPoR::DCRAM.

Definition at line 2110 of file DC.h.

References getDimension().

Referenced by getDimension().

◆ GetDimensionNames()

virtual std::vector< string > VAPoR::DC::GetDimensionNames ( ) const
inlinevirtual

Return names of all defined dimensions

This method returns the list of names of all of the dimensions defined in the DC.

Definition at line 1322 of file DC.h.

◆ getDimensionNames()

virtual std::vector< string > VAPoR::DC::getDimensionNames ( ) const
protectedpure virtual

Return names of all defined dimensions

This method returns the list of names of all of the dimensions defined in the DC.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetDimLens()

virtual int VAPoR::DC::GetDimLens ( string  varname,
std::vector< size_t > &  dims,
long  ts = -1 
)
inlinevirtual

Return a variable's array dimension lengths

This method is equivalent to calling GetDimLensAtLevel() with level equal to -1

Definition at line 1550 of file DC.h.

◆ getDimLensAtLevel() [1/2]

virtual int VAPoR::DC::getDimLensAtLevel ( string  varname,
int  level,
std::vector< size_t > &  dims_at_level,
std::vector< size_t > &  bs_at_level 
) const
protectedpure virtual

Return a variable's array dimension lengths at a specified refinement level

Compressed variables may have a multi-resolution grid representation. This method returns the variable's ordered array dimension lengths, and block dimensions at the multiresolution refinement level specified by level.

If the variable named by varname is not compressed the variable's native dimensions are returned.

Note
The number of elements in dims_at_level will match that of bs_at_level. If the data are not blocked the value of each element of bs_at_level will be 1.
Parameters
[in]varnameData or coordinate variable name.
[in]levelSpecifies a member of a multi-resolution variable's grid hierarchy as described above.
[out]dims_at_levelAn ordered vector containing the variable's dimensions at the specified refinement level
[out]bs_at_levelAn ordered vector containing the variable's block dimensions at the specified refinement level
Return values
statusZero is returned upon success, otherwise -1.
Note
For unstructured grids the number of dimensions may be less than the topological dimension returned by DC::Mesh::GetTopologyDim().
See also
VAPoR::DC, DC::DataVar::GetBS(), DC::GetVarDimLens()

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ getDimLensAtLevel() [2/2]

virtual int VAPoR::DC::getDimLensAtLevel ( string  varname,
int  level,
std::vector< size_t > &  dims_at_level,
std::vector< size_t > &  bs_at_level,
long  ts 
) const
inlineprotectedvirtual

Return a variable's array dimension lengths at a specified refinement level

Compressed variables may have a multi-resolution grid representation. This method returns the variable's ordered array dimension lengths, and block dimensions at the multiresolution refinement level specified by level.

If the variable named by varname is not compressed the variable's native dimensions are returned.

Note
The number of elements in dims_at_level will match that of bs_at_level. If the data are not blocked the value of each element of bs_at_level will be 1.
Parameters
[in]varnameData or coordinate variable name.
[in]levelSpecifies a member of a multi-resolution variable's grid hierarchy as described above.
[out]dims_at_levelAn ordered vector containing the variable's dimensions at the specified refinement level
[out]bs_at_levelAn ordered vector containing the variable's block dimensions at the specified refinement level
Return values
statusZero is returned upon success, otherwise -1.
Note
For unstructured grids the number of dimensions may be less than the topological dimension returned by DC::Mesh::GetTopologyDim().
See also
VAPoR::DC, DC::DataVar::GetBS(), DC::GetVarDimLens()

Reimplemented in VAPoR::DCP, and VAPoR::DCRAM.

Definition at line 2186 of file DC.h.

◆ GetDimLensAtLevel()

virtual int VAPoR::DC::GetDimLensAtLevel ( string  varname,
int  level,
std::vector< size_t > &  dims_at_level,
std::vector< size_t > &  bs_at_level,
long  ts = -1 
) const
inlinevirtual

Return a variable's array dimension lengths at a specified refinement level

Compressed variables may have a multi-resolution grid representation. This method returns the variable's ordered array dimension lengths, and block dimensions at the multiresolution refinement level specified by level.

If the variable named by varname is not compressed the variable's native dimensions are returned.

Note
The number of elements in dims_at_level will match that of bs_at_level. If the data are not blocked the value of each element of bs_at_level will be 1.
Parameters
[in]varnameData or coordinate variable name.
[in]levelSpecifies a member of a multi-resolution variable's grid hierarchy as described above.
[out]dims_at_levelAn ordered vector containing the variable's dimensions at the specified refinement level
[out]bs_at_levelAn ordered vector containing the variable's block dimensions at the specified refinement level
Return values
statusZero is returned upon success, otherwise -1.
Note
For unstructured grids the number of dimensions may be less than the topological dimension returned by DC::Mesh::GetTopologyDim().
See also
VAPoR::DC, DC::DataVar::GetBS(), DC::GetVarDimLens()

Definition at line 1540 of file DC.h.

◆ GetHyperSliceInfo()

virtual int VAPoR::DC::GetHyperSliceInfo ( string  varname,
int  level,
std::vector< size_t > &  dims,
size_t &  nslice,
long  ts = -1 
)
virtual

Get dimensions of hyperslice read by ReadSlice

Returns the dimensions of a hyperslice when the variable varname is opened at level level and read using ReadSlice();

Parameters
[in]varnameA valid variable name
[in]reflevelRefinement level requested.
[out]dimsAn ordered vector containing the variable's hyperslice dimensions at the specified refinement level
[out]nsliceNumber of hyperslices
See also
GetDimLensAtLevel(), OpenVariableRead(), ReadSlice()

◆ GetMapProjection()

virtual string VAPoR::DC::GetMapProjection ( ) const
inlinevirtual

Return default Proj4 map projection string.

For georeference data sets that have map projections this method returns the default properly formatted Proj4 projection string for mapping from geographic to cartographic coordinates. If no projection exists, an empty string is returned.

Return values
projstringAn empty string if a Proj4 map projection is not available for the named variable, otherwise a properly formatted Proj4 projection string is returned.

Definition at line 1570 of file DC.h.

◆ getMapProjection()

virtual string VAPoR::DC::getMapProjection ( ) const
protectedpure virtual

Return default Proj4 map projection string.

For georeference data sets that have map projections this method returns the default properly formatted Proj4 projection string for mapping from geographic to cartographic coordinates. If no projection exists, an empty string is returned.

Return values
projstringAn empty string if a Proj4 map projection is not available for the named variable, otherwise a properly formatted Proj4 projection string is returned.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, VAPoR::VDC, and VAPoR::DCUGRID.

◆ GetMesh()

virtual bool VAPoR::DC::GetMesh ( string  mesh_name,
DC::Mesh mesh 
) const
inlinevirtual

Return a Mesh's definition

This method returns the definition of the mesh named by mesh_name as a reference to a DC::Mesh object.

Parameters
[in]mesh_nameA string specifying the name of the Mesh.
[out]meshThe returned Mesh object reference
Return values
boolIf the named mesh can not be found false is returned.

Definition at line 1340 of file DC.h.

◆ getMesh()

virtual bool VAPoR::DC::getMesh ( string  mesh_name,
DC::Mesh mesh 
) const
protectedpure virtual

Return a Mesh's definition

This method returns the definition of the mesh named by mesh_name as a reference to a DC::Mesh object.

Parameters
[in]mesh_nameA string specifying the name of the Mesh.
[out]meshThe returned Mesh object reference
Return values
boolIf the named mesh can not be found false is returned.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetMeshDimLens()

virtual bool VAPoR::DC::GetMeshDimLens ( const string &  mesh_name,
std::vector< size_t > &  dims,
long  ts = -1 
) const
virtual

Return the ordered list of dimensions for a mesh

This method is a convenience function that returns the ordered vector of dimension lengths for the mesh named mesh. If mesh is unknown, or invalid false is returned.

See also
DC::GetMesh(), DC::GetDimension()

◆ GetMeshDimNames()

virtual bool VAPoR::DC::GetMeshDimNames ( const string &  mesh_name,
std::vector< string > &  dimnames 
) const
virtual

Return the ordered list of dimension names for a mesh

This method is a convenience function that returns the ordered vector of dimension names for the mesh named mesh. If mesh is unknown, or invalid false is returned.

See also
DC::GetMesh(), DC::GetDimension()

◆ GetMeshNames()

virtual std::vector< string > VAPoR::DC::GetMeshNames ( ) const
inlinevirtual

Return names of all defined meshes

This method returns the list of names of all of the meshes defined in the DC.

Definition at line 1329 of file DC.h.

◆ getMeshNames()

virtual std::vector< string > VAPoR::DC::getMeshNames ( ) const
protectedpure virtual

Return names of all defined meshes

This method returns the list of names of all of the meshes defined in the DC.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetNumDimensions()

virtual size_t VAPoR::DC::GetNumDimensions ( string  varname) const
virtual

Get the rank of a variable

This method returns the number of rank of the array describing a variable. For structured data variables the rank is equal to the topological dimension (See GetTopologyDim()).

Parameters
[in]varnameName of variable to query
Return values
Arrayrank. A value between 0 and 3, inclusive. If varname is unknown 0 is returned.

◆ GetNumRefLevels()

virtual size_t VAPoR::DC::GetNumRefLevels ( string  varname) const
inlinevirtual

Return the number of refinement levels for the indicated variable

Compressed variables may have a multi-resolution grid representation. This method returns the number of levels in the hiearchy. A value of one indicates that only the native resolution is available. A value of two indicates that two levels, the native plus the next coarsest are available, and so on.

Parameters
[in]varnameData or coordinate variable name.
Return values
numIf varname is unknown one is returned. if varname is not compressed (has no multi-resolution representation) one is returned. Otherwise the total number of levels in the multi-resolution hierarchy are returned.

Definition at line 1455 of file DC.h.

◆ getNumRefLevels()

virtual size_t VAPoR::DC::getNumRefLevels ( string  varname) const
protectedpure virtual

Return the number of refinement levels for the indicated variable

Compressed variables may have a multi-resolution grid representation. This method returns the number of levels in the hiearchy. A value of one indicates that only the native resolution is available. A value of two indicates that two levels, the native plus the next coarsest are available, and so on.

Parameters
[in]varnameData or coordinate variable name.
Return values
numIf varname is unknown one is returned. if varname is not compressed (has no multi-resolution representation) one is returned. Otherwise the total number of levels in the multi-resolution hierarchy are returned.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ GetNumTimeSteps()

virtual int VAPoR::DC::GetNumTimeSteps ( string  varname) const
virtual

Return the time dimension length for a variable

Returns the number of time steps (length of the time dimension) for which a variable is defined. If varname does not have a time coordinate 1 is returned. If varname is not defined as a variable zero is returned;

Parameters
[in]varnameA string specifying the name of the variable.
Return values
countThe length of the time dimension, or a negative int if varname is undefined.
nReturns the number of time steps for which the variable is defined, or zero if the variable is not defined.
See also
IsTimeVarying()

◆ GetTimeCoordVarNames()

std::vector< string > VAPoR::DC::GetTimeCoordVarNames ( ) const

Return a list of all of the available time coordinate variables

This method returns all time coordinate variables defined

◆ GetVar() [1/6]

virtual int VAPoR::DC::GetVar ( size_t  ts,
string  varname,
int  level,
int  lod,
double *  data 
)
inlinevirtual

Definition at line 1748 of file DC.h.

◆ GetVar() [2/6]

virtual int VAPoR::DC::GetVar ( size_t  ts,
string  varname,
int  level,
int  lod,
float *  data 
)
inlinevirtual

Read an entire variable at a given time step in one call

This method reads and entire variable (all grid points) at time step ts from a DC. This is the simplest interface for reading data from a DC. Any variables currently opened with OpenVariableRead() are first closed. Thus variables need not be opened with OpenVariableRead() prior to calling GetVar();

It is an error to call this method in define mode

Parameters
[in]tsTime step of the variable to write. This is the integer offset into the variable's temporal dimension. If the variable does not have a temporal dimension ts is ignored.
[in]varnameName of the variable to write
[in]levelRefinement level of the variable. Ignored if the variable is not compressed.
[in]lodApproximation level of the variable. A value of -1 indicates the maximum approximation level defined for the DC. Ignored if the variable is not compressed.
[out]dataPointer to where data will be copied. It is the caller's responsbility to ensure data points to sufficient memory.
Return values
statusA negative int is returned on failure

Definition at line 1747 of file DC.h.

◆ GetVar() [3/6]

virtual int VAPoR::DC::GetVar ( size_t  ts,
string  varname,
int  level,
int  lod,
int *  data 
)
inlinevirtual

Definition at line 1749 of file DC.h.

◆ GetVar() [4/6]

virtual int VAPoR::DC::GetVar ( string  varname,
int  level,
int  lod,
double *  data 
)
inlinevirtual

Definition at line 1717 of file DC.h.

◆ GetVar() [5/6]

virtual int VAPoR::DC::GetVar ( string  varname,
int  level,
int  lod,
float *  data 
)
inlinevirtual

Read an entire variable in one call

This method reads and entire variable (all time steps, all grid points) from a DC. This is the simplest interface for reading data from a DC. If the variable is split across multiple files GetVar() ensures that the data are correctly gathered and assembled into memory Any variables currently opened with OpenVariableRead() are first closed. Thus variables need not be opened with OpenVariableRead() prior to calling GetVar();

It is an error to call this method in define mode

Parameters
[in]varnameName of the variable to write
[in]levelRefinement level of the variable. Ignored if the variable is not compressed.
[in]lodApproximation level of the variable. A value of -1 indicates the maximum approximation level defined for the DC. Ignored if the variable is not compressed.
[out]dataPointer to where data will be copied. It is the caller's responsbility to ensure data points to sufficient memory.
Return values
statusA negative int is returned on failure

Definition at line 1716 of file DC.h.

◆ GetVar() [6/6]

virtual int VAPoR::DC::GetVar ( string  varname,
int  level,
int  lod,
int *  data 
)
inlinevirtual

Definition at line 1718 of file DC.h.

◆ GetVarConnVars()

bool VAPoR::DC::GetVarConnVars ( string  varname,
string &  face_node_var,
string &  node_face_var,
string &  face_edge_var,
string &  face_face_var,
string &  edge_node_var,
string &  edge_face_var 
) const

Get mesh connectivity variables for a data variable

Return the mesh connectivity variables for a data variable. For a structured grid all connectivity variables will be empty. For an unstructured mesh only the face_node_var, node_face_var are guaranteed to be set to valid variable names

◆ GetVarCoordVars()

virtual bool VAPoR::DC::GetVarCoordVars ( string  varname,
bool  spatial,
std::vector< string > &  coord_vars 
) const
virtual

Return an ordered list of a data variable's coordinate names

Returns a list of a coordinate variable names for the variable varname, ordered from fastest to slowest. If spatial is true and the variable is time varying the time coordinate variable name will be included. The time coordinate variable is always the slowest varying coordinate axis

Parameters
[in]varnameA valid variable name
[in]spatialIf true only return spatial dimensions
[out]coordvarsOrdered list of coordinate variable names.
Return values
Returnstrue upon success, false if the variable is not defined.

◆ GetVarDimensions()

virtual bool VAPoR::DC::GetVarDimensions ( string  varname,
bool  spatial,
vector< DC::Dimension > &  dimensions,
long  ts 
) const
virtual

Return an ordered list of the variables dimensions

Returns a list of a variables dimensions ordered from fastest to slowest. If time is true and the variable is time varying the time dimension will be included. The time dimension is always the slowest varying dimension.

Parameters
[in]varnameA valid variable name
[in]spatialIf true only return spatial dimensions
[out]dimensionsOrdered list of variable dimensions on success.
Return values
Returnstrue upon success, false if the variable is not defined.

◆ GetVarDimLens() [1/2]

virtual bool VAPoR::DC::GetVarDimLens ( string  varname,
bool  spatial,
vector< size_t > &  dimlens,
long  ts = -1 
) const
virtual

Return an ordered list of the variables dimension lengths

Returns a list of a variables dimension lengths ordered from fastest to slowest. If spatial is true and the variable is time varying the time dimension will be included. The time dimension is always the slowest varying dimension.

Parameters
[in]varnameA valid variable name
[in]spatialIf true only return spatial dimensions
[out]dimensionsOrdered list of variable dimension lengths on success.
Return values
Returnstrue upon success, false if the variable is not defined.

◆ GetVarDimLens() [2/2]

virtual bool VAPoR::DC::GetVarDimLens ( string  varname,
vector< size_t > &  sdimlens,
size_t &  time_dimlen,
long  ts = -1 
) const
virtual

Return an ordered list of the variables dimension lengths

Returns a list of a variable's spatial dimension lengths ordered from fastest to slowest, and, if the variable is time varying, the variable's time dimension lengths is returned as well.

Parameters
[in]varnameA valid variable name
[out]sdimlensOrdered list of variable spatial dimension lengths on success.
[out]time_dimlenThe variable's time dimension length. If the variable is not time varying time_dim_length will be set to 0.
Return values
Returnstrue upon success, false if the variable is not defined.

◆ GetVarDimNames() [1/2]

virtual bool VAPoR::DC::GetVarDimNames ( string  varname,
bool  spatial,
vector< string > &  dimnames 
) const
virtual

Return an ordered list of the variables dimension names

Returns a list of a variables dimension names ordered from fastest to slowest. If spatial is true and the variable is time varying the time dimension names will be included. The time dimension is always the slowest varying dimension.

Parameters
[in]varnameA valid variable name
[in]spatialIf true only return spatial dimensions
[out]dimensionsOrdered list of variable dimension names on success.
Return values
Returnstrue upon success, false if the variable is not defined.

◆ GetVarDimNames() [2/2]

virtual bool VAPoR::DC::GetVarDimNames ( string  varname,
vector< string > &  sdimnames,
string &  time_dimname 
) const
virtual

Return an ordered list of the variables dimension names

Returns a list of a variable's spatial dimension names ordered from fastest to slowest, and, if the variable is time varying, the variable's time dimension name is returned as well.

Parameters
[in]varnameA valid variable name
[out]sdimnamesOrdered list of variable spatial dimension names on success.
[out]time_dimnameThe variable's time dimension name. If the variable is not time varying time_dim_name will be set to the emptry string.
Return values
Returnstrue upon success, false if the variable is not defined.

◆ GetVarGeometryDim()

virtual size_t VAPoR::DC::GetVarGeometryDim ( string  varname) const
virtual

Return the geometric dimension of a variable

Return the geometric dimension of the mesh the defines the variable data varname. I.e. return the number of spatial coordinate variables associated with each node in the mesh.

Return values
dimGeometric dimension or zero if variable is not known
See also
DC::Mesh::GetGeometryDim()

◆ GetVarTopologyDim()

virtual size_t VAPoR::DC::GetVarTopologyDim ( string  varname) const
virtual

Return the topological dimension of a variable

Return the topological dimension of the mesh the defines the variable data varname

Return values
dimTopological dimension or zero if variable is not known
See also
DC::Mesh::GetTopologyDim()

◆ Initialize()

virtual int VAPoR::DC::Initialize ( const std::vector< string > &  paths,
const std::vector< string > &  options = std::vector<string>() 
)
inlinevirtual

Initialize the DC class

Prepare a DC for reading. This method prepares the master DC file indicated by path for reading. The method should be called immediately after the constructor, before any other class methods. This method exists only because C++ constructors can not return error codes.

Parameters
[in]pathPath name of file that contains, or will contain, the DC master file for this data collection
[in]optionsA vector of option pairs (name, value) that may be accepted by the derived class.
Return values
statusA negative int is returned on failure

Definition at line 1302 of file DC.h.

◆ initialize()

virtual int VAPoR::DC::initialize ( const std::vector< string > &  paths,
const std::vector< string > &  options = std::vector< string >() 
)
protectedpure virtual

Initialize the DC class

Prepare a DC for reading. This method prepares the master DC file indicated by path for reading. The method should be called immediately after the constructor, before any other class methods. This method exists only because C++ constructors can not return error codes.

Parameters
[in]pathPath name of file that contains, or will contain, the DC master file for this data collection
[in]optionsA vector of option pairs (name, value) that may be accepted by the derived class.
Return values
statusA negative int is returned on failure

Implemented in VAPoR::VDC, and VAPoR::DerivedVarMgr.

◆ IsAuxVar()

virtual bool VAPoR::DC::IsAuxVar ( string  varname) const
inlinevirtual

Return a boolean indicating whether a variable is an Auxiliary variable

Version
3.1

This method returns true if a Auxiliary variable is defined with the name varname. Otherwise the method returns false.

Return values
boolReturns true if varname names a defined Auxiliary variable

Definition at line 2006 of file DC.h.

◆ IsCompressed()

virtual bool VAPoR::DC::IsCompressed ( string  varname) const
virtual

Return a boolean indicating whether a variable is compressed

This method returns true if the variable named by varname is defined and it has a compressed representation. If either of these conditions is not true the method returns false.

Parameters
[in]varnameA string specifying the name of the variable.
Return values
boolReturns true if variable varname exists and is compressed

◆ IsCoordVar()

virtual bool VAPoR::DC::IsCoordVar ( string  varname) const
inlinevirtual

Return a boolean indicating whether a variable is a coordinate variable

This method returns true if a coordinate variable is defined with the name varname. Otherwise the method returns false.

Return values
boolReturns true if varname names a defined coordinate variable

Definition at line 1991 of file DC.h.

◆ IsDataVar()

virtual bool VAPoR::DC::IsDataVar ( string  varname) const
inlinevirtual

Return a boolean indicating whether a variable is a data variable

This method returns true if a data variable is defined with the name varname. Otherwise the method returns false.

Return values
boolReturns true if varname names a defined data variable

Definition at line 1977 of file DC.h.

◆ IsTimeVarying()

virtual bool VAPoR::DC::IsTimeVarying ( string  varname) const
virtual

Return a boolean indicating whether a variable is time varying

This method returns true if the variable named by varname is a DataVar and it has a time coordiante (See DataVar::GetTimeCoord()), or if the variable is a CoordVar and its axis is time. Otherwise false is returnd.

Parameters
[in]varnameA string specifying the name of the variable.
Return values
boolReturns true if variable varname exists and is time varying.

◆ OpenVariableRead()

virtual int VAPoR::DC::OpenVariableRead ( size_t  ts,
string  varname,
int  level = 0,
int  lod = 0 
)
inlinevirtual

Open the named variable for reading

This method prepares a data or coordinate variable, indicated by a variable name and time step pair, for subsequent read operations by methods of this class. The value of the refinement levels parameter, level, indicates the resolution of the volume in the multiresolution hierarchy as described by GetDimLensAtLevel().

The level-of-detail parameter, lod, selects the approximation level. Valid values for lod are integers in the range 0..n-1, where n is returned by DC::BaseVar::GetCRatios().size(), or the value -1 may be used to select the best approximation available.

An error occurs, indicated by a negative return value, if the volume identified by the {varname, timestep, level, lod} tupple is not available. Note the availability of a volume can be tested with the VariableExists() method.

Parameters
[in]tsTime step of the variable to read. This is the integer offset into the variable's temporal dimension. If the variable does not have a temporal dimension ts is ignored.
[in]varnameName of the variable to read
[in]levelRefinement level of the variable. Ignored if the variable is not compressed.
[in]lodApproximation level of the variable. A value of -1 indicates the maximum approximation level defined for the DC. Ignored if the variable is not compressed.
Return values
statusReturns a non-negative file descriptor on success
See also
GetNumRefLevels(), DC::BaseVar::GetCRatios(), OpenVariableRead()

Reimplemented in VAPoR::DCUGRID.

Definition at line 1606 of file DC.h.

◆ openVariableRead()

virtual int VAPoR::DC::openVariableRead ( size_t  ts,
string  varname,
int  level = 0,
int  lod = 0 
)
protectedpure virtual

Open the named variable for reading

This method prepares a data or coordinate variable, indicated by a variable name and time step pair, for subsequent read operations by methods of this class. The value of the refinement levels parameter, level, indicates the resolution of the volume in the multiresolution hierarchy as described by GetDimLensAtLevel().

The level-of-detail parameter, lod, selects the approximation level. Valid values for lod are integers in the range 0..n-1, where n is returned by DC::BaseVar::GetCRatios().size(), or the value -1 may be used to select the best approximation available.

An error occurs, indicated by a negative return value, if the volume identified by the {varname, timestep, level, lod} tupple is not available. Note the availability of a volume can be tested with the VariableExists() method.

Parameters
[in]tsTime step of the variable to read. This is the integer offset into the variable's temporal dimension. If the variable does not have a temporal dimension ts is ignored.
[in]varnameName of the variable to read
[in]levelRefinement level of the variable. Ignored if the variable is not compressed.
[in]lodApproximation level of the variable. A value of -1 indicates the maximum approximation level defined for the DC. Ignored if the variable is not compressed.
Return values
statusReturns a non-negative file descriptor on success
See also
GetNumRefLevels(), DC::BaseVar::GetCRatios(), OpenVariableRead()

Implemented in VAPoR::VDCNetCDF, VAPoR::DerivedVarMgr, VAPoR::VDC, VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, and VAPoR::DCWRF.

◆ Read() [1/3]

virtual int VAPoR::DC::Read ( int  fd,
double *  data 
)
inlinevirtual

Definition at line 1635 of file DC.h.

◆ Read() [2/3]

virtual int VAPoR::DC::Read ( int  fd,
float *  data 
)
inlinevirtual

Read all spatial values of the currently opened variable

This method reads, and decompresses as necessary, the contents of the currently opened variable into the array data. The number of values read into data is given by the product of the spatial dimensions of the open variable at the refinement level specified.

It is the caller's responsibility to ensure data points to adequate space.

Parameters
[in]fdA valid file descriptor returned by OpenVariableRead()
[out]dataAn array of data to be written
Return values
statusReturns a non-negative value on success
See also
OpenVariableRead()

Definition at line 1634 of file DC.h.

◆ Read() [3/3]

virtual int VAPoR::DC::Read ( int  fd,
int *  data 
)
inlinevirtual

Reimplemented in VAPoR::DCUGRID.

Definition at line 1636 of file DC.h.

◆ ReadRegion() [1/3]

virtual int VAPoR::DC::ReadRegion ( int  fd,
const vector< size_t > &  min,
const vector< size_t > &  max,
double *  region 
)
inlinevirtual

Definition at line 1688 of file DC.h.

◆ readRegion() [1/3]

virtual int VAPoR::DC::readRegion ( int  fd,
const vector< size_t > &  min,
const vector< size_t > &  max,
double *  region 
)
protectedpure virtual

◆ ReadRegion() [2/3]

virtual int VAPoR::DC::ReadRegion ( int  fd,
const vector< size_t > &  min,
const vector< size_t > &  max,
float *  region 
)
inlinevirtual

Read in and return a subregion from the currently opened variable

This method reads and returns a subset of variable data. The min and max vectors, whose dimensions must match the spatial rank of the currently opened variable, identify the minimum and maximum extents, in grid coordinates, of the subregion of interest. The minimum and maximum valid values of an element of min or max are 0 and n-1, respectively, where n is the length of the associated dimension at the opened refinement level.

The region returned is stored in the memory region pointed to by region. It is the caller's responsbility to ensure adequate space is available.

Parameters
[in]fdA valid file descriptor returned by OpenVariableRead()
[in]minMinimum region extents in grid coordinates
[in]maxMaximum region extents in grid coordinates
[out]regionThe requested volume subregion
Return values
statusReturns a non-negative value on success
See also
OpenVariableRead(), GetDimLensAtLevel(), GetDimensionNames()

Definition at line 1687 of file DC.h.

◆ readRegion() [2/3]

virtual int VAPoR::DC::readRegion ( int  fd,
const vector< size_t > &  min,
const vector< size_t > &  max,
float *  region 
)
protectedpure virtual

Read in and return a subregion from the currently opened variable

This method reads and returns a subset of variable data. The min and max vectors, whose dimensions must match the spatial rank of the currently opened variable, identify the minimum and maximum extents, in grid coordinates, of the subregion of interest. The minimum and maximum valid values of an element of min or max are 0 and n-1, respectively, where n is the length of the associated dimension at the opened refinement level.

The region returned is stored in the memory region pointed to by region. It is the caller's responsbility to ensure adequate space is available.

Parameters
[in]fdA valid file descriptor returned by OpenVariableRead()
[in]minMinimum region extents in grid coordinates
[in]maxMaximum region extents in grid coordinates
[out]regionThe requested volume subregion
Return values
statusReturns a non-negative value on success
See also
OpenVariableRead(), GetDimLensAtLevel(), GetDimensionNames()

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, and VAPoR::VDC.

◆ ReadRegion() [3/3]

virtual int VAPoR::DC::ReadRegion ( int  fd,
const vector< size_t > &  min,
const vector< size_t > &  max,
int *  region 
)
inlinevirtual

Reimplemented in VAPoR::DCUGRID.

Definition at line 1689 of file DC.h.

◆ readRegion() [3/3]

virtual int VAPoR::DC::readRegion ( int  fd,
const vector< size_t > &  min,
const vector< size_t > &  max,
int *  region 
)
protectedpure virtual

◆ ReadSlice() [1/3]

virtual int VAPoR::DC::ReadSlice ( int  fd,
double *  slice 
)
inlinevirtual

Definition at line 1660 of file DC.h.

◆ ReadSlice() [2/3]

virtual int VAPoR::DC::ReadSlice ( int  fd,
float *  slice 
)
inlinevirtual

Read a single slice of data from the currently opened variable

Decompress, as necessary, and read a single hyperslice of data from the variable indicated by the most recent call to OpenVariableRead(). The dimensions and number of slices are given by GetHyperSliceInfo().

This method should be called exactly NZ times for each opened variable, where NZ is the dimension of slowest varying dimension returned by GetDimLensAtLevel().

It is the caller's responsibility to ensure slice points to adequate space.

Parameters
[in]fdA valid file descriptor returned by OpenVariableRead()
[out]sliceA slice of data
Return values
statusReturns a non-negative value on success
See also
OpenVariableRead(), GetHyperSliceInfo()

Definition at line 1659 of file DC.h.

◆ ReadSlice() [3/3]

virtual int VAPoR::DC::ReadSlice ( int  fd,
int *  slice 
)
inlinevirtual

Definition at line 1661 of file DC.h.

◆ VariableExists()

virtual bool VAPoR::DC::VariableExists ( size_t  ts,
string  varname,
int  reflevel = 0,
int  lod = 0 
) const
inlinevirtual

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 false if the variable is not available.

Parameters
[in]tsA valid time step between 0 and GetNumTimesteps()-1
[in]varnameA valid variable name
[in]reflevelRefinement level requested.
[in]lodCompression level of detail requested. refinement level contained in the DC.

Definition at line 1764 of file DC.h.

◆ variableExists()

virtual bool VAPoR::DC::variableExists ( size_t  ts,
string  varname,
int  reflevel = 0,
int  lod = 0 
) const
protectedpure virtual

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 false if the variable is not available.

Parameters
[in]tsA valid time step between 0 and GetNumTimesteps()-1
[in]varnameA valid variable name
[in]reflevelRefinement level requested.
[in]lodCompression level of detail requested. refinement level contained in the DC.

Implemented in VAPoR::DCBOV, VAPoR::DCCF, VAPoR::DCMPAS, VAPoR::DCP, VAPoR::DCRAM, VAPoR::DCWRF, VAPoR::DerivedVarMgr, VAPoR::VDCNetCDF, and VAPoR::VDC.

Member Data Documentation

◆ _fileTable

DC::FileTable VAPoR::DC::_fileTable
protected

Definition at line 2098 of file DC.h.


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