VAPOR3 3.9.4
Public Member Functions | Protected Member Functions | List of all members
VAPoR::DerivedVarMgr Class Reference

Derived variables constructed from other variables. More...

#include <DerivedVarMgr.h>

Inheritance diagram for VAPoR::DerivedVarMgr:
VAPoR::DC Wasp::MyBase

Public Member Functions

 DerivedVarMgr ()
 
virtual ~DerivedVarMgr ()
 
void AddCoordVar (DerivedCoordVar *cvar)
 
void AddDataVar (DerivedDataVar *dvar)
 
void RemoveVar (const DerivedVar *var)
 
DerivedVarGetVar (string name) const
 
bool HasVar (string name) const
 
void AddMesh (const Mesh &m)
 
- Public Member Functions inherited from VAPoR::DC
 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 >())
 
virtual bool getDimension (string dimname, DC::Dimension &dimension) 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 getCoordVarInfo (string varname, DC::CoordVar &cvarInfo) const
 
virtual bool getDataVarInfo (string varname, DC::DataVar &datavarInfo) const
 
virtual bool getAuxVarInfo (string varname, DC::AuxVar &varInfo) const
 
virtual bool getBaseVarInfo (string varname, DC::BaseVar &varInfo) 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) const
 
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 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, float *region)
 
virtual int readRegion (int fd, const vector< size_t > &min, const vector< size_t > &max, int *region)
 
virtual bool variableExists (size_t ts, string varname, int reflevel=0, int lod=0) const
 
- Protected Member Functions inherited from VAPoR::DC
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)
 

Additional Inherited Members

- Public Types inherited from VAPoR::DC
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)
 
- 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
 
- Protected Attributes inherited from VAPoR::DC
DC::FileTable _fileTable
 

Detailed Description

Derived variables constructed from other variables.

Author
John Clyne
Date
January, 2017

Definition at line 20 of file DerivedVarMgr.h.

Constructor & Destructor Documentation

◆ DerivedVarMgr()

VAPoR::DerivedVarMgr::DerivedVarMgr ( )

Class constuctor

◆ ~DerivedVarMgr()

virtual VAPoR::DerivedVarMgr::~DerivedVarMgr ( )
inlinevirtual

Definition at line 26 of file DerivedVarMgr.h.

Member Function Documentation

◆ AddCoordVar()

void VAPoR::DerivedVarMgr::AddCoordVar ( DerivedCoordVar cvar)

◆ AddDataVar()

void VAPoR::DerivedVarMgr::AddDataVar ( DerivedDataVar dvar)

◆ AddMesh()

void VAPoR::DerivedVarMgr::AddMesh ( const Mesh m)

◆ closeVariable()

virtual int VAPoR::DerivedVarMgr::closeVariable ( int  fd)
protectedvirtual

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()

Implements VAPoR::DC.

◆ getAtt() [1/3]

virtual bool VAPoR::DerivedVarMgr::getAtt ( string  varname,
string  attname,
string &  values 
) const
protectedvirtual

Implements VAPoR::DC.

◆ getAtt() [2/3]

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

Implements VAPoR::DC.

◆ getAtt() [3/3]

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

Implements VAPoR::DC.

◆ getAttNames()

virtual std::vector< string > VAPoR::DerivedVarMgr::getAttNames ( string  varname) const
protectedvirtual

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()

Implements VAPoR::DC.

◆ getAttType()

virtual XType VAPoR::DerivedVarMgr::getAttType ( string  varname,
string  attname 
) const
protectedvirtual

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.

Implements VAPoR::DC.

◆ getAuxVarInfo()

virtual bool VAPoR::DerivedVarMgr::getAuxVarInfo ( string  varname,
DC::AuxVar varInfo 
) const
inlineprotectedvirtual

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()

Implements VAPoR::DC.

Definition at line 71 of file DerivedVarMgr.h.

◆ getAuxVarNames()

virtual std::vector< string > VAPoR::DerivedVarMgr::getAuxVarNames ( ) const
inlineprotectedvirtual

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

Implements VAPoR::DC.

Definition at line 87 of file DerivedVarMgr.h.

◆ getBaseVarInfo()

virtual bool VAPoR::DerivedVarMgr::getBaseVarInfo ( string  varname,
DC::BaseVar varInfo 
) const
protectedvirtual

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()

Implements VAPoR::DC.

◆ getCoordVarInfo()

virtual bool VAPoR::DerivedVarMgr::getCoordVarInfo ( string  varname,
DC::CoordVar cvarInfo 
) const
protectedvirtual

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.

Implements VAPoR::DC.

◆ getCoordVarNames()

virtual std::vector< string > VAPoR::DerivedVarMgr::getCoordVarNames ( ) const
protectedvirtual

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

Implements VAPoR::DC.

◆ getDataVarInfo()

virtual bool VAPoR::DerivedVarMgr::getDataVarInfo ( string  varname,
DC::DataVar datavarInfo 
) const
protectedvirtual

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.

Implements VAPoR::DC.

◆ getDataVarNames()

virtual std::vector< string > VAPoR::DerivedVarMgr::getDataVarNames ( ) const
protectedvirtual

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

Implements VAPoR::DC.

◆ getDimension()

virtual bool VAPoR::DerivedVarMgr::getDimension ( string  dimname,
DC::Dimension dimension 
) 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.

Implements VAPoR::DC.

Definition at line 47 of file DerivedVarMgr.h.

◆ getDimensionNames()

virtual std::vector< string > VAPoR::DerivedVarMgr::getDimensionNames ( ) const
inlineprotectedvirtual

Return names of all defined dimensions

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

Implements VAPoR::DC.

Definition at line 51 of file DerivedVarMgr.h.

◆ getDimLensAtLevel()

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

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()

Implements VAPoR::DC.

◆ getMapProjection()

virtual string VAPoR::DerivedVarMgr::getMapProjection ( ) const
inlineprotectedvirtual

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.

Implements VAPoR::DC.

Definition at line 119 of file DerivedVarMgr.h.

◆ getMesh()

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

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.

Implements VAPoR::DC.

◆ getMeshNames()

virtual std::vector< string > VAPoR::DerivedVarMgr::getMeshNames ( ) const
protectedvirtual

Return names of all defined meshes

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

Implements VAPoR::DC.

◆ getNumRefLevels()

virtual size_t VAPoR::DerivedVarMgr::getNumRefLevels ( string  varname) const
protectedvirtual

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.

Implements VAPoR::DC.

◆ GetVar()

DerivedVar * VAPoR::DerivedVarMgr::GetVar ( string  name) const

◆ HasVar()

bool VAPoR::DerivedVarMgr::HasVar ( string  name) const
inline

Definition at line 36 of file DerivedVarMgr.h.

◆ initialize()

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

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

Implements VAPoR::DC.

◆ openVariableRead()

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

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()

Implements VAPoR::DC.

◆ readRegion() [1/3]

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

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()

Implements VAPoR::DC.

◆ readRegion() [2/3]

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

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()

Implements VAPoR::DC.

◆ readRegion() [3/3]

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

Implements VAPoR::DC.

Definition at line 133 of file DerivedVarMgr.h.

◆ RemoveVar()

void VAPoR::DerivedVarMgr::RemoveVar ( const DerivedVar var)

◆ variableExists()

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

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.

Implements VAPoR::DC.


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