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

A cache based data reader. More...

#include <DataMgr.h>

Inheritance diagram for VAPoR::DataMgr:
Wasp::MyBase VAPoR::PythonDataMgr

Classes

class  BlkExts
 
struct  region_t
 
class  VarInfoCache
 

Public Types

enum class  VarType { Any , Scalar , Particle }
 
- 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

 DataMgr (string format, size_t mem_size, int nthreads=0)
 
virtual ~DataMgr ()
 
virtual int Initialize (const vector< string > &paths, const std::vector< string > &options)
 
std::vector< string > GetDimensionNames () const
 
bool GetAtt (string varname, string attname, vector< double > &values) const
 
bool GetAtt (string varname, string attname, vector< long > &values) const
 
bool GetAtt (string varname, string attname, string &values) const
 
std::vector< string > GetAttNames (string varname) const
 
DC::XType GetAttType (string varname, string attname) const
 
bool GetDimension (string dimname, DC::Dimension &dimension, long ts) const
 
long GetDimensionLength (string name, long ts) const
 
std::vector< string > GetMeshNames () const
 
bool GetMesh (string meshname, DC::Mesh &mesh) const
 
DC::Mesh GetMesh (string meshname) const
 
virtual std::vector< string > GetDataVarNames () const
 
virtual std::vector< string > GetDataVarNames (int ndim, VarType type=VarType::Any) const
 
virtual std::vector< string > GetCoordVarNames () const
 
void GetTimeCoordinates (std::vector< double > &timecoords) const
 
const std::vector< double > & GetTimeCoordinates () const
 
string GetTimeCoordVarName () const
 
bool HasTimeVaryingCoordinates () const
 
bool HasMovingDomain () const
 
virtual bool GetVarCoordVars (string varname, bool spatial, std::vector< string > &coord_vars) const
 
vector< string > GetVarCoordVars (string varname, bool spatial) const
 
bool GetDataVarInfo (string varname, VAPoR::DC::DataVar &datavar) const
 
bool GetBaseVarInfo (string varname, VAPoR::DC::BaseVar &var) const
 
bool GetCoordVarInfo (string varname, VAPoR::DC::CoordVar &cvar) const
 
bool IsTimeVarying (string varname) const
 
bool IsCompressed (string varname) const
 
int GetNumTimeSteps (string varname) const
 
int GetNumTimeSteps () const
 
size_t GetNumRefLevels (string varname) const
 
std::vector< size_t > GetCRatios (string varname) const
 
VAPoR::GridGetVariable (size_t ts, string varname, int level, int lod, bool lock=false)
 
VAPoR::GridGetVariable (size_t ts, string varname, int level, int lod, CoordType min, CoordType max, bool lock=false)
 
VAPoR::GridGetVariable (size_t ts, string varname, int level, int lod, DimsType min, DimsType max, bool lock=false)
 
int GetVariableExtents (size_t ts, string varname, int level, int lod, CoordType &min, CoordType &max)
 
int GetDataRange (size_t ts, string varname, int level, int lod, std::vector< double > &range)
 
int GetDataRange (size_t ts, string varname, int level, int lod, CoordType min, CoordType max, std::vector< double > &range)
 
virtual int GetDimLensAtLevel (string varname, int level, std::vector< size_t > &dims_at_level, long ts) const
 
virtual int GetDimLens (string varname, std::vector< size_t > &dims, long ts)
 
std::vector< size_t > GetDimLens (string varname)
 
void UnlockGrid (const VAPoR::Grid *rg)
 
size_t GetNumDimensions (string varname) const
 ;
 
size_t GetVarTopologyDim (string varname) const
 
size_t GetVarGeometryDim (string varname) const
 
void Clear ()
 
virtual bool VariableExists (size_t ts, string varname, int level=0, int lod=0) const
 
virtual string GetMapProjection () const
 ;
 
virtual string GetMapProjectionDefault () const
 ;
 
bool IsVariableDerived (string varname) const
 
bool IsVariableNative (string varname) const
 
int AddDerivedVar (DerivedDataVar *derivedVar)
 
void RemoveDerivedVar (string varname)
 
void PurgeVariable (string varname)
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

std::vector< string > _get_var_dependencies_1 (string varname) const
 
std::vector< string > _get_var_dependencies_all (std::vector< string > varnames, std::vector< string > dependencies) const
 
bool _hasHorizontalXForm () const
 
bool _hasHorizontalXForm (string meshname) const
 
bool _get_coord_vars (string varname, std::vector< string > &scvars, string &tcvar) const
 
bool _get_coord_vars (string varname, vector< DC::CoordVar > &scvarsinfo, DC::CoordVar &tcvarinfo) const
 
int _initTimeCoord ()
 
int _get_default_projection (string &projection)
 
VAPoR::RegularGrid_make_grid_regular (const DimsType &dims, const std::vector< float * > &blkvec, DimsType &bs, DimsType &bmin, const DimsType &bmax) const
 
VAPoR::StretchedGrid_make_grid_stretched (const DimsType &dims, const std::vector< float * > &blkvec, const DimsType &bs, const DimsType &bmin, const DimsType &bmax) const
 
VAPoR::LayeredGrid_make_grid_layered (const DimsType &dims, const std::vector< float * > &blkvec, const DimsType &bs, const DimsType &bmin, const DimsType &bmax) const
 
VAPoR::CurvilinearGrid_make_grid_curvilinear (size_t ts, int level, int lod, const vector< DC::CoordVar > &cvarsinfo, const DimsType &dims, const std::vector< float * > &blkvec, const DimsType &bs, const DimsType &bmin, const DimsType &bmax)
 
void _ugrid_setup (const DC::DataVar &var, DimsType &vertexDims, DimsType &faceDims, DimsType &edgeDims, UnstructuredGrid::Location &location, size_t &maxVertexPerFace, size_t &maxFacePerVertex, long &vertexOffset, long &faceOffset, long ts) const
 
UnstructuredGrid2D_make_grid_unstructured2d (size_t ts, int level, int lod, const DC::DataVar &dvarinfo, const vector< DC::CoordVar > &cvarsinfo, const DimsType, const vector< float * > &blkvec, const DimsType &bs, const DimsType &bmin, const DimsType &bmax, const vector< int * > &conn_blkvec, const DimsType &conn_bs, const DimsType &conn_bmin, const DimsType &conn_bmax)
 
VAPoR::Grid_make_grid (size_t ts, int level, int lod, const VAPoR::DC::DataVar &var, const DimsType &roi_dims, const DimsType &dims, const std::vector< float * > &blkvec, const std::vector< DimsType > &bsvec, const std::vector< DimsType > &bminvec, const std::vector< DimsType > &bmaxvec, const vector< int * > &conn_blkvec, const vector< DimsType > &conn_bsvec, const vector< DimsType > &conn_bminvec, const vector< DimsType > &conn_bmaxvec)
 
string _get_grid_type (string varname) const
 
int _find_bounding_grid (size_t ts, string varname, int level, int lod, CoordType min, CoordType max, DimsType &min_ui, DimsType &max_ui)
 
void _setupCoordVecsHelper (string data_varname, const DimsType &data_dimlens, const DimsType &data_bmin, const DimsType &data_bmax, string coord_varname, int order, DimsType &coord_dimlens, DimsType &coord_bmin, DimsType &coord_bmax, bool structured, long ts) const
 
int _setupCoordVecs (size_t ts, string varname, int level, int lod, const DimsType &min, const DimsType &max, vector< string > &varnames, DimsType &roi_dims, vector< DimsType > &dimsvec, vector< DimsType > &bsvec, vector< DimsType > &bminvec, vector< DimsType > &bmaxvec, bool structured) const
 
int _setupConnVecs (size_t ts, string varname, int level, int lod, vector< string > &varnames, vector< DimsType > &dimsvec, vector< DimsType > &bsvec, vector< DimsType > &bminvec, vector< DimsType > &bmaxvec) const
 
VAPoR::Grid_getVariable (size_t ts, string varname, int level, int lod, bool lock, bool dataless)
 
VAPoR::Grid_getVariable (size_t ts, string varname, int level, int lod, DimsType min, DimsType max, bool lock, bool dataless)
 
int _parseOptions (vector< string > &options)
 
template<typename T >
T * _get_region_from_cache (size_t ts, string varname, int level, int lod, const DimsType &bmin, const DimsType &bmax, bool lock)
 
template<typename T >
int _get_unblocked_region_from_fs (size_t ts, string varname, int level, int lod, const DimsType &grid_dims, const DimsType &grid_bs, const DimsType &grid_min, const DimsType &grid_max, T *blks)
 
template<typename T >
int _get_blocked_region_from_fs (size_t ts, string varname, int level, int lod, const DimsType &file_bs, const DimsType &file_dims, const DimsType &grid_dims, const DimsType &grid_bs, const DimsType &grid_min, const DimsType &grid_max, T *blks)
 
template<typename T >
T * _get_region_from_fs (size_t ts, string varname, int level, int lod, const DimsType &grid_dims, const DimsType &grid_bs, const DimsType &grid_bmin, const DimsType &grid_bmax, bool lock)
 
template<typename T >
T * _get_region (size_t ts, string varname, int level, int lod, int nlods, const DimsType &dims, const DimsType &bs, const DimsType &bmin, const DimsType &bmax, bool lock)
 
template<typename T >
int _get_regions (size_t ts, const std::vector< string > &varnames, int level, int lod, bool lock, const std::vector< DimsType > &dimsvec, const std::vector< DimsType > &bsvec, const std::vector< DimsType > &bminvec, const std::vector< DimsType > &bmaxvec, std::vector< T * > &blkvec)
 
void _unlock_blocks (const void *blks)
 
std::vector< string > _get_native_variables () const
 
void * _alloc_region (size_t ts, string varname, int level, int lod, DimsType bmin, DimsType bmax, DimsType bs, int element_sz, bool lock, bool fill)
 
void _free_region (size_t ts, string varname, int level, int lod, DimsType bmin, DimsType bmax, bool forceFlag=false)
 
bool _free_lru ()
 
void _free_var (string varname)
 
int _level_correction (string varname, int &level) const
 
int _lod_correction (string varname, int &lod) const
 
vector< string > _getDataVarNamesDerived (int ndim) const
 
bool _hasCoordForAxis (vector< string > coord_vars, int axis) const
 
string _defaultCoordVar (const DC::Mesh &m, int axis) const
 
void _assignHorizontalCoords (vector< string > &coord_vars) const
 
bool _getVarDimensions (string varname, vector< DC::Dimension > &dimensions, long ts) const
 
bool _getDataVarDimensions (string varname, vector< DC::Dimension > &dimensions, long ts) const
 
bool _getCoordVarDimensions (string varname, vector< DC::Dimension > &dimensions, long ts) const
 
bool _getVarDimNames (string varname, vector< string > &dimnames) const
 
bool _isDataVar (string varname) const
 
bool _isCoordVar (string varname) 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
 
DerivedVar_getDerivedVar (string varname) const
 
DerivedDataVar_getDerivedDataVar (string varname) const
 
DerivedCoordVar_getDerivedCoordVar (string varname) const
 
int _openVariableRead (size_t ts, string varname, int level, int lod)
 
template<class T >
int _readRegion (int fd, const DimsType &min, const DimsType &max, size_t ndims, T *region)
 
int _closeVariable (int fd)
 
template<class T >
int _getVar (string varname, int level, int lod, T *data)
 
template<class T >
int _getVar (size_t ts, string varname, int level, int lod, T *data)
 
void _getLonExtents (std::vector< float > &lons, DimsType dims, float &min, float &max) const
 
void _getLatExtents (std::vector< float > &lons, DimsType dims, float &min, float &max) const
 
int _getCoordPairExtents (string lon, string lat, float &lonmin, float &lonmax, float &latmin, float &latmax, long ts)
 
int _initProj4StringDefault ()
 
int _initHorizontalCoordVars ()
 
int _initVerticalCoordVars ()
 
bool _hasVerticalXForm () const
 
bool _hasVerticalXForm (string meshname, string &standard_name, string &formula_terms) const
 
bool _hasVerticalXForm (string meshname) const
 
bool _isCoordVarInUse (string varName) const
 
virtual int GetDimLensAtLevel (string varname, int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts) const
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Protected Attributes

std::map< std::pair< VarType, size_t >, std::vector< string > > _dataVarNamesCache
 
string _format
 
int _nthreads
 
size_t _mem_size
 
DC_dc
 
VAPoR::UDUnits _udunits
 
VAPoR::GridHelper _gridHelper
 
DerivedVarMgr _dvm
 
bool _doTransformHorizontal
 
bool _doTransformVertical
 
string _openVarName
 
std::vector< double > _timeCoordinates
 
string _proj4String
 
string _proj4StringDefault
 
DimsType _bs
 
std::list< region_t_regionsList
 
VAPoR::BlkMemMgr_blk_mem_mgr
 
std::vector< PipeLine * > _PipeLines
 
VarInfoCache< size_t > _varInfoCacheSize_T
 
VarInfoCache< double > _varInfoCacheDouble
 
VarInfoCache< void * > _varInfoCacheVoidPtr
 
std::map< string, BlkExts_blkExtsCache
 
std::map< const Grid *, vector< float * > > _lockedFloatBlks
 
std::map< const Grid *, vector< int * > > _lockedIntBlks
 

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 cache based data reader.

Author
John Clyne

The DataMgr class is an abstract class that defines public methods for accessing (reading) 1D, 2D and 3D field variables. The class implements a memory cache to speed data access – once a variable is read it is stored in cache for subsequent access. The DataMgr class is abstract: it declares a number of public and protected pure virtual methods that must be implemented by specializations of this class to allow access to particular file formats.

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 VDC 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 VDC 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.

Parameters
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.

Definition at line 110 of file DataMgr.h.

Member Enumeration Documentation

◆ VarType

enum class VAPoR::DataMgr::VarType
strong

Return a list of data variables with a given spatial dimension rank

This method returns a list of all data variables defined in the data set with the specified dimension rank (number of dimensions). Data variables may have 0 to 3 spatial dimensions

Parameters
[in]ndimVariable rank (number of dimensions)
Return values
listA vector containing a list of all the data variable names with the specified number of dimensions (rank).
Test:
New in 3.0
Enumerator
Any 
Scalar 
Particle 

Definition at line 260 of file DataMgr.h.

Constructor & Destructor Documentation

◆ DataMgr()

VAPoR::DataMgr::DataMgr ( string  format,
size_t  mem_size,
int  nthreads = 0 
)

Constructor for the DataMgr class.

The DataMgr will attempt to cache previously read data and coordinate variables in memory. The mem_size specifies the requested cache size in MEGABYTES!!!

Parameters
[in]formatA string indicating the format of data collection.
[in]mem_sizeSize of memory cache to be created, specified in MEGABYTES!! If 0, not restriction is placed on the cache size; the DataMgr will attempt to allocate as much memory is needed.
[in]numthreadsNumber of parallel execution threads to be run during encoding and decoding of compressed data. A value of 0, the default, indicates that the thread count should be determined by the environment in a platform-specific manner, for example using sysconf(_SC_NPROCESSORS_ONLN) under *nix OSes.

◆ ~DataMgr()

virtual VAPoR::DataMgr::~DataMgr ( )
virtual

Member Function Documentation

◆ _alloc_region()

void * VAPoR::DataMgr::_alloc_region ( size_t  ts,
string  varname,
int  level,
int  lod,
DimsType  bmin,
DimsType  bmax,
DimsType  bs,
int  element_sz,
bool  lock,
bool  fill 
)
protected

◆ _assignHorizontalCoords()

void VAPoR::DataMgr::_assignHorizontalCoords ( vector< string > &  coord_vars) const
protected

◆ _closeVariable()

int VAPoR::DataMgr::_closeVariable ( int  fd)
protected

◆ _defaultCoordVar()

string VAPoR::DataMgr::_defaultCoordVar ( const DC::Mesh m,
int  axis 
) const
protected

◆ _find_bounding_grid()

int VAPoR::DataMgr::_find_bounding_grid ( size_t  ts,
string  varname,
int  level,
int  lod,
CoordType  min,
CoordType  max,
DimsType min_ui,
DimsType max_ui 
)
protected

◆ _free_lru()

bool VAPoR::DataMgr::_free_lru ( )
protected

◆ _free_region()

void VAPoR::DataMgr::_free_region ( size_t  ts,
string  varname,
int  level,
int  lod,
DimsType  bmin,
DimsType  bmax,
bool  forceFlag = false 
)
protected

◆ _free_var()

void VAPoR::DataMgr::_free_var ( string  varname)
protected

◆ _get_blocked_region_from_fs()

template<typename T >
int VAPoR::DataMgr::_get_blocked_region_from_fs ( size_t  ts,
string  varname,
int  level,
int  lod,
const DimsType file_bs,
const DimsType file_dims,
const DimsType grid_dims,
const DimsType grid_bs,
const DimsType grid_min,
const DimsType grid_max,
T *  blks 
)
protected

◆ _get_coord_vars() [1/2]

bool VAPoR::DataMgr::_get_coord_vars ( string  varname,
std::vector< string > &  scvars,
string &  tcvar 
) const
protected

◆ _get_coord_vars() [2/2]

bool VAPoR::DataMgr::_get_coord_vars ( string  varname,
vector< DC::CoordVar > &  scvarsinfo,
DC::CoordVar tcvarinfo 
) const
protected

◆ _get_default_projection()

int VAPoR::DataMgr::_get_default_projection ( string &  projection)
protected

◆ _get_grid_type()

string VAPoR::DataMgr::_get_grid_type ( string  varname) const
protected

◆ _get_native_variables()

std::vector< string > VAPoR::DataMgr::_get_native_variables ( ) const
protected

◆ _get_region()

template<typename T >
T * VAPoR::DataMgr::_get_region ( size_t  ts,
string  varname,
int  level,
int  lod,
int  nlods,
const DimsType dims,
const DimsType bs,
const DimsType bmin,
const DimsType bmax,
bool  lock 
)
protected

◆ _get_region_from_cache()

template<typename T >
T * VAPoR::DataMgr::_get_region_from_cache ( size_t  ts,
string  varname,
int  level,
int  lod,
const DimsType bmin,
const DimsType bmax,
bool  lock 
)
protected

◆ _get_region_from_fs()

template<typename T >
T * VAPoR::DataMgr::_get_region_from_fs ( size_t  ts,
string  varname,
int  level,
int  lod,
const DimsType grid_dims,
const DimsType grid_bs,
const DimsType grid_bmin,
const DimsType grid_bmax,
bool  lock 
)
protected

◆ _get_regions()

template<typename T >
int VAPoR::DataMgr::_get_regions ( size_t  ts,
const std::vector< string > &  varnames,
int  level,
int  lod,
bool  lock,
const std::vector< DimsType > &  dimsvec,
const std::vector< DimsType > &  bsvec,
const std::vector< DimsType > &  bminvec,
const std::vector< DimsType > &  bmaxvec,
std::vector< T * > &  blkvec 
)
protected

◆ _get_unblocked_region_from_fs()

template<typename T >
int VAPoR::DataMgr::_get_unblocked_region_from_fs ( size_t  ts,
string  varname,
int  level,
int  lod,
const DimsType grid_dims,
const DimsType grid_bs,
const DimsType grid_min,
const DimsType grid_max,
T *  blks 
)
protected

◆ _get_var_dependencies_1()

std::vector< string > VAPoR::DataMgr::_get_var_dependencies_1 ( string  varname) const
protected

◆ _get_var_dependencies_all()

std::vector< string > VAPoR::DataMgr::_get_var_dependencies_all ( std::vector< string >  varnames,
std::vector< string >  dependencies 
) const
protected

◆ _getCoordPairExtents()

int VAPoR::DataMgr::_getCoordPairExtents ( string  lon,
string  lat,
float &  lonmin,
float &  lonmax,
float &  latmin,
float &  latmax,
long  ts 
)
protected

◆ _getCoordVarDimensions()

bool VAPoR::DataMgr::_getCoordVarDimensions ( string  varname,
vector< DC::Dimension > &  dimensions,
long  ts 
) const
protected

◆ _getDataVarDimensions()

bool VAPoR::DataMgr::_getDataVarDimensions ( string  varname,
vector< DC::Dimension > &  dimensions,
long  ts 
) const
protected

◆ _getDataVarNamesDerived()

vector< string > VAPoR::DataMgr::_getDataVarNamesDerived ( int  ndim) const
protected

◆ _getDerivedCoordVar()

DerivedCoordVar * VAPoR::DataMgr::_getDerivedCoordVar ( string  varname) const
protected

◆ _getDerivedDataVar()

DerivedDataVar * VAPoR::DataMgr::_getDerivedDataVar ( string  varname) const
protected

◆ _getDerivedVar()

DerivedVar * VAPoR::DataMgr::_getDerivedVar ( string  varname) const
protected

◆ _getLatExtents()

void VAPoR::DataMgr::_getLatExtents ( std::vector< float > &  lons,
DimsType  dims,
float &  min,
float &  max 
) const
protected

◆ _getLonExtents()

void VAPoR::DataMgr::_getLonExtents ( std::vector< float > &  lons,
DimsType  dims,
float &  min,
float &  max 
) const
protected

◆ _getVar() [1/2]

template<class T >
int VAPoR::DataMgr::_getVar ( size_t  ts,
string  varname,
int  level,
int  lod,
T *  data 
)
protected

◆ _getVar() [2/2]

template<class T >
int VAPoR::DataMgr::_getVar ( string  varname,
int  level,
int  lod,
T *  data 
)
protected

◆ _getVarConnVars()

bool VAPoR::DataMgr::_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
protected

◆ _getVarDimensions()

bool VAPoR::DataMgr::_getVarDimensions ( string  varname,
vector< DC::Dimension > &  dimensions,
long  ts 
) const
protected

◆ _getVarDimNames()

bool VAPoR::DataMgr::_getVarDimNames ( string  varname,
vector< string > &  dimnames 
) const
protected

◆ _getVariable() [1/2]

VAPoR::Grid * VAPoR::DataMgr::_getVariable ( size_t  ts,
string  varname,
int  level,
int  lod,
bool  lock,
bool  dataless 
)
protected

◆ _getVariable() [2/2]

VAPoR::Grid * VAPoR::DataMgr::_getVariable ( size_t  ts,
string  varname,
int  level,
int  lod,
DimsType  min,
DimsType  max,
bool  lock,
bool  dataless 
)
protected

◆ _hasCoordForAxis()

bool VAPoR::DataMgr::_hasCoordForAxis ( vector< string >  coord_vars,
int  axis 
) const
protected

◆ _hasHorizontalXForm() [1/2]

bool VAPoR::DataMgr::_hasHorizontalXForm ( ) const
protected

◆ _hasHorizontalXForm() [2/2]

bool VAPoR::DataMgr::_hasHorizontalXForm ( string  meshname) const
protected

◆ _hasVerticalXForm() [1/3]

bool VAPoR::DataMgr::_hasVerticalXForm ( ) const
protected

◆ _hasVerticalXForm() [2/3]

bool VAPoR::DataMgr::_hasVerticalXForm ( string  meshname) const
inlineprotected

Definition at line 920 of file DataMgr.h.

◆ _hasVerticalXForm() [3/3]

bool VAPoR::DataMgr::_hasVerticalXForm ( string  meshname,
string &  standard_name,
string &  formula_terms 
) const
protected

◆ _initHorizontalCoordVars()

int VAPoR::DataMgr::_initHorizontalCoordVars ( )
protected

◆ _initProj4StringDefault()

int VAPoR::DataMgr::_initProj4StringDefault ( )
protected

◆ _initTimeCoord()

int VAPoR::DataMgr::_initTimeCoord ( )
protected

◆ _initVerticalCoordVars()

int VAPoR::DataMgr::_initVerticalCoordVars ( )
protected

◆ _isCoordVar()

bool VAPoR::DataMgr::_isCoordVar ( string  varname) const
inlineprotected

Definition at line 883 of file DataMgr.h.

◆ _isCoordVarInUse()

bool VAPoR::DataMgr::_isCoordVarInUse ( string  varName) const
protected

◆ _isDataVar()

bool VAPoR::DataMgr::_isDataVar ( string  varname) const
inlineprotected

Definition at line 877 of file DataMgr.h.

◆ _level_correction()

int VAPoR::DataMgr::_level_correction ( string  varname,
int &  level 
) const
protected

◆ _lod_correction()

int VAPoR::DataMgr::_lod_correction ( string  varname,
int &  lod 
) const
protected

◆ _make_grid()

VAPoR::Grid * VAPoR::DataMgr::_make_grid ( size_t  ts,
int  level,
int  lod,
const VAPoR::DC::DataVar var,
const DimsType roi_dims,
const DimsType dims,
const std::vector< float * > &  blkvec,
const std::vector< DimsType > &  bsvec,
const std::vector< DimsType > &  bminvec,
const std::vector< DimsType > &  bmaxvec,
const vector< int * > &  conn_blkvec,
const vector< DimsType > &  conn_bsvec,
const vector< DimsType > &  conn_bminvec,
const vector< DimsType > &  conn_bmaxvec 
)
protected

◆ _make_grid_curvilinear()

VAPoR::CurvilinearGrid * VAPoR::DataMgr::_make_grid_curvilinear ( size_t  ts,
int  level,
int  lod,
const vector< DC::CoordVar > &  cvarsinfo,
const DimsType dims,
const std::vector< float * > &  blkvec,
const DimsType bs,
const DimsType bmin,
const DimsType bmax 
)
protected

◆ _make_grid_layered()

VAPoR::LayeredGrid * VAPoR::DataMgr::_make_grid_layered ( const DimsType dims,
const std::vector< float * > &  blkvec,
const DimsType bs,
const DimsType bmin,
const DimsType bmax 
) const
protected

◆ _make_grid_regular()

VAPoR::RegularGrid * VAPoR::DataMgr::_make_grid_regular ( const DimsType dims,
const std::vector< float * > &  blkvec,
DimsType bs,
DimsType bmin,
const DimsType bmax 
) const
protected

◆ _make_grid_stretched()

VAPoR::StretchedGrid * VAPoR::DataMgr::_make_grid_stretched ( const DimsType dims,
const std::vector< float * > &  blkvec,
const DimsType bs,
const DimsType bmin,
const DimsType bmax 
) const
protected

◆ _make_grid_unstructured2d()

UnstructuredGrid2D * VAPoR::DataMgr::_make_grid_unstructured2d ( size_t  ts,
int  level,
int  lod,
const DC::DataVar dvarinfo,
const vector< DC::CoordVar > &  cvarsinfo,
const  DimsType,
const vector< float * > &  blkvec,
const DimsType bs,
const DimsType bmin,
const DimsType bmax,
const vector< int * > &  conn_blkvec,
const DimsType conn_bs,
const DimsType conn_bmin,
const DimsType conn_bmax 
)
protected

◆ _openVariableRead()

int VAPoR::DataMgr::_openVariableRead ( size_t  ts,
string  varname,
int  level,
int  lod 
)
protected

◆ _parseOptions()

int VAPoR::DataMgr::_parseOptions ( vector< string > &  options)
protected

◆ _readRegion()

template<class T >
int VAPoR::DataMgr::_readRegion ( int  fd,
const DimsType min,
const DimsType max,
size_t  ndims,
T *  region 
)
protected

◆ _setupConnVecs()

int VAPoR::DataMgr::_setupConnVecs ( size_t  ts,
string  varname,
int  level,
int  lod,
vector< string > &  varnames,
vector< DimsType > &  dimsvec,
vector< DimsType > &  bsvec,
vector< DimsType > &  bminvec,
vector< DimsType > &  bmaxvec 
) const
protected

◆ _setupCoordVecs()

int VAPoR::DataMgr::_setupCoordVecs ( size_t  ts,
string  varname,
int  level,
int  lod,
const DimsType min,
const DimsType max,
vector< string > &  varnames,
DimsType roi_dims,
vector< DimsType > &  dimsvec,
vector< DimsType > &  bsvec,
vector< DimsType > &  bminvec,
vector< DimsType > &  bmaxvec,
bool  structured 
) const
protected

◆ _setupCoordVecsHelper()

void VAPoR::DataMgr::_setupCoordVecsHelper ( string  data_varname,
const DimsType data_dimlens,
const DimsType data_bmin,
const DimsType data_bmax,
string  coord_varname,
int  order,
DimsType coord_dimlens,
DimsType coord_bmin,
DimsType coord_bmax,
bool  structured,
long  ts 
) const
protected

◆ _ugrid_setup()

void VAPoR::DataMgr::_ugrid_setup ( const DC::DataVar var,
DimsType vertexDims,
DimsType faceDims,
DimsType edgeDims,
UnstructuredGrid::Location location,
size_t &  maxVertexPerFace,
size_t &  maxFacePerVertex,
long &  vertexOffset,
long &  faceOffset,
long  ts 
) const
protected

◆ _unlock_blocks()

void VAPoR::DataMgr::_unlock_blocks ( const void *  blks)
protected

◆ AddDerivedVar()

int VAPoR::DataMgr::AddDerivedVar ( DerivedDataVar derivedVar)

◆ Clear()

void VAPoR::DataMgr::Clear ( )

Clear the memory cache

This method clears the internal memory cache of all entries

◆ GetAtt() [1/3]

bool VAPoR::DataMgr::GetAtt ( string  varname,
string  attname,
string &  values 
) const
inline

Definition at line 174 of file DataMgr.h.

References VAssert.

◆ GetAtt() [2/3]

bool VAPoR::DataMgr::GetAtt ( string  varname,
string  attname,
vector< double > &  values 
) const
inline

Definition at line 158 of file DataMgr.h.

References VAssert.

◆ GetAtt() [3/3]

bool VAPoR::DataMgr::GetAtt ( string  varname,
string  attname,
vector< long > &  values 
) const
inline

Definition at line 166 of file DataMgr.h.

References VAssert.

◆ GetAttNames()

std::vector< string > VAPoR::DataMgr::GetAttNames ( string  varname) const
inline

Definition at line 182 of file DataMgr.h.

References VAssert.

◆ GetAttType()

DC::XType VAPoR::DataMgr::GetAttType ( string  varname,
string  attname 
) const
inline

Definition at line 190 of file DataMgr.h.

References VAssert.

◆ GetBaseVarInfo()

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

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 true the method was successful. If false the named variable is invalid (unknown)
See also
GetDataVarInfo(), GetCoordVarInfo()

◆ GetCoordVarInfo()

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

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
boolIf true the method was successful. If false the named variable is invalid (unknown)
See also
GetDataVarInfo()

◆ GetCoordVarNames()

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

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

This method returns a list of all coordinate variables defined in the data set.

Return values
listA vector containing a list of all the coordinate variable names
See also
GetDataVarNames()

◆ GetCRatios()

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

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

◆ GetDataRange() [1/2]

int VAPoR::DataMgr::GetDataRange ( size_t  ts,
string  varname,
int  level,
int  lod,
CoordType  min,
CoordType  max,
std::vector< double > &  range 
)

Compute min and max value of a variable within a specified ROI

This method finds the minimum and maximum value of a variable within the region of interest (ROI) specified by min and max. Note, the results returned by this method are equivalent to calling the Grid::GetRange() method on a grid returned by DataMgr::GetVariable using the same arguments provided here.

◆ GetDataRange() [2/2]

int VAPoR::DataMgr::GetDataRange ( size_t  ts,
string  varname,
int  level,
int  lod,
std::vector< double > &  range 
)

Compute the min and max value of a variable

This method finds the minimum and maximum value of a variable

Parameters
[out]rangeA two element vector containing the minimum and maximum value, respectively, for the variable varname at the specified time step, lod, etc.

◆ GetDataVarInfo()

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

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 true the method was successful. If false the named variable is invalid (unknown)
See also
GetCoordVarInfo()

◆ GetDataVarNames() [1/2]

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

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

This method returns a list of all data variables defined in the data set.

Return values
listA vector containing a list of all the data variable names
See also
GetCoordVarNames()
Test:
New in 3.0

◆ GetDataVarNames() [2/2]

virtual std::vector< string > VAPoR::DataMgr::GetDataVarNames ( int  ndim,
VarType  type = VarType::Any 
) const
virtual

◆ GetDimension()

bool VAPoR::DataMgr::GetDimension ( string  dimname,
DC::Dimension dimension,
long  ts 
) const
inline

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 198 of file DataMgr.h.

References VAssert.

◆ GetDimensionLength()

long VAPoR::DataMgr::GetDimensionLength ( string  name,
long  ts 
) const
inline

Returns the length of a dimension at a given timestep

Return values
lengthA negative int is returned on failure

Definition at line 208 of file DataMgr.h.

References VAPoR::DC::Dimension::GetLength(), and VAssert.

◆ GetDimensionNames()

std::vector< string > VAPoR::DataMgr::GetDimensionNames ( ) const
inline

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 150 of file DataMgr.h.

References VAssert.

◆ GetDimLens() [1/2]

std::vector< size_t > VAPoR::DataMgr::GetDimLens ( string  varname)
inline

Definition at line 523 of file DataMgr.h.

◆ GetDimLens() [2/2]

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

Return a variable's array dimension lengths

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

Definition at line 521 of file DataMgr.h.

◆ GetDimLensAtLevel() [1/2]

virtual int VAPoR::DataMgr::GetDimLensAtLevel ( string  varname,
int  level,
std::vector< size_t > &  dims_at_level,
long  ts 
) 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 510 of file DataMgr.h.

◆ GetDimLensAtLevel() [2/2]

virtual int VAPoR::DataMgr::GetDimLensAtLevel ( string  varname,
int  level,
std::vector< size_t > &  dims_at_level,
std::vector< size_t > &  bs_at_level,
long  ts 
) const
protectedvirtual

◆ GetMapProjection()

virtual string VAPoR::DataMgr::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 584 of file DataMgr.h.

◆ GetMapProjectionDefault()

virtual string VAPoR::DataMgr::GetMapProjectionDefault ( ) const
inlinevirtual

;

;

Definition at line 588 of file DataMgr.h.

◆ GetMesh() [1/2]

DC::Mesh VAPoR::DataMgr::GetMesh ( string  meshname) const
inline

Definition at line 230 of file DataMgr.h.

◆ GetMesh() [2/2]

bool VAPoR::DataMgr::GetMesh ( string  meshname,
DC::Mesh mesh 
) const

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.

◆ GetMeshNames()

std::vector< string > VAPoR::DataMgr::GetMeshNames ( ) const
inline

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 220 of file DataMgr.h.

References VAssert.

◆ GetNumDimensions()

size_t VAPoR::DataMgr::GetNumDimensions ( string  varname) const

;

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

size_t VAPoR::DataMgr::GetNumRefLevels ( string  varname) const

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.

◆ GetNumTimeSteps() [1/2]

int VAPoR::DataMgr::GetNumTimeSteps ( ) const

Return the maximum time dimension length for this data set

Returns the number of time steps (length of the time dimension) for any variable is defined.

◆ GetNumTimeSteps() [2/2]

int VAPoR::DataMgr::GetNumTimeSteps ( string  varname) const

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 a negative int 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.
See also
IsTimeVarying()

◆ GetTimeCoordinates() [1/2]

const std::vector< double > & VAPoR::DataMgr::GetTimeCoordinates ( ) const
inline

Definition at line 288 of file DataMgr.h.

◆ GetTimeCoordinates() [2/2]

void VAPoR::DataMgr::GetTimeCoordinates ( std::vector< double > &  timecoords) const
inline

Get time coordinates

Get a sorted list of all time coordinates defined for the data set. Multiple time coordinate variables may be defined. This method collects the time coordinates from all time coordinate variables and sorts them into a single, global time coordinate variable.

Note
Need to deal with different units (e.g. seconds and days).
Should methods that take a time step argument ts expect "local" or "global" time steps

Definition at line 286 of file DataMgr.h.

◆ GetTimeCoordVarName()

string VAPoR::DataMgr::GetTimeCoordVarName ( ) const

Get time coordinate var name

Return the name of the time coordinate variable. If no time coordinate variable is defined the empty string is returned.

◆ GetVarCoordVars() [1/2]

vector< string > VAPoR::DataMgr::GetVarCoordVars ( string  varname,
bool  spatial 
) const

◆ GetVarCoordVars() [2/2]

virtual bool VAPoR::DataMgr::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.

◆ GetVarGeometryDim()

size_t VAPoR::DataMgr::GetVarGeometryDim ( string  varname) const

◆ GetVariable() [1/3]

VAPoR::Grid * VAPoR::DataMgr::GetVariable ( size_t  ts,
string  varname,
int  level,
int  lod,
bool  lock = false 
)

Read and return variable data

Reads all data for the data or coordinate variable named by varname for the time step, refinement level, and leve-of-detail indicated by ts, level, and lod, respectively.

Parameters
[in]tsAn integer offset into the time coordinate variable returned by GetTimeCoordinates() indicting the time step of the variable to access.
[in]varnameThe name of the data or coordinate variable to access
[in]levelGrid refinement level. See DataMgr
[in]lodThe level-of-detail parameter, lod, selects the approximation level. See DataMgr.

◆ GetVariable() [2/3]

VAPoR::Grid * VAPoR::DataMgr::GetVariable ( size_t  ts,
string  varname,
int  level,
int  lod,
CoordType  min,
CoordType  max,
bool  lock = false 
)

Read and return a variable hyperslab

This method is identical to the GetVariable() method, however, a subregion is specified in the user coordinate system. min and max specify the minimum and maximum extents of an axis-aligned bounding box containing the region of interest. The VAPoR::Grid object returned contains the intersection between the specified hyperslab and the variable's spatial domain (which is not necessarily rectangular or axis-aligned). If the requested hyperslab lies entirely outside of the domain of the requested variable NULL is returned

Parameters
[in]minA one, two, or three element array specifying the minimum extents, in user coordinates, of an axis-aligned box defining the region-of-interest. The spatial dimensionality of the variable determines the number of elements in min.
[in]maxA one, two, or three element array specifying the maximum extents, in user coordinates, of an axis-aligned box defining the region-of-interest. The spatial dimensionality of the variable determines the number of elements in max.
Note
The Grid structure returned is allocated from the heap. it is the caller's responsiblity to delete the returned object when it is no longer in use.

◆ GetVariable() [3/3]

VAPoR::Grid * VAPoR::DataMgr::GetVariable ( size_t  ts,
string  varname,
int  level,
int  lod,
DimsType  min,
DimsType  max,
bool  lock = false 
)

◆ GetVariableExtents()

int VAPoR::DataMgr::GetVariableExtents ( size_t  ts,
string  varname,
int  level,
int  lod,
CoordType min,
CoordType max 
)

Compute the coordinate extents of a variable

This method finds the spatial domain extents of a variable

This method returns the min and max extents specified in user coordinates, of the smallest axis-aligned bounding box that is guaranteed to contain the variable(s) indicated by varname, and the given refinement level, level

◆ GetVarTopologyDim()

size_t VAPoR::DataMgr::GetVarTopologyDim ( string  varname) const

◆ HasMovingDomain()

bool VAPoR::DataMgr::HasMovingDomain ( ) const

◆ HasTimeVaryingCoordinates()

bool VAPoR::DataMgr::HasTimeVaryingCoordinates ( ) const

◆ Initialize()

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

Initialize the class

This method must be called to initialize the DataMgr class with a list of input data files.

Parameters
[in]filesA list of file paths
Return values
statusA negative int is returned on failure and an error message will be logged with MyBase::SetErrMsg()

◆ IsCompressed()

bool VAPoR::DataMgr::IsCompressed ( string  varname) const

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
See also
DefineCoordVar(), DefineDataVar(), DC::BaseVar::GetCompressed()

◆ IsTimeVarying()

bool VAPoR::DataMgr::IsTimeVarying ( string  varname) const

Return a boolean indicating whether a variable is time varying

This method returns true if the variable named by varname is defined and it has a time axis dimension. 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 time varying.

◆ IsVariableDerived()

bool VAPoR::DataMgr::IsVariableDerived ( string  varname) const

Return true if the named variable is the output of a pipeline

This method returns true if varname matches a variable name in the output list (PipeLine::GetOutputs()) of any pipeline added with NewPipeline()

See also
NewPipeline()

◆ IsVariableNative()

bool VAPoR::DataMgr::IsVariableNative ( string  varname) const

Return true if the named variable is availble from the derived classes data access methods.

A return value of true does not imply that the variable can be read (

See also
VariableExists()), only that it is part of the data set known to the derived class
NewPipeline()

◆ PurgeVariable()

void VAPoR::DataMgr::PurgeVariable ( string  varname)

Purge the cache of a variable

Parameters
[in]varnameis the variable name

◆ RemoveDerivedVar()

void VAPoR::DataMgr::RemoveDerivedVar ( string  varname)

◆ UnlockGrid()

void VAPoR::DataMgr::UnlockGrid ( const VAPoR::Grid rg)

Unlock a floating-point region of memory

Decrement the lock counter associatd with a region of memory, and if zero, unlock region of memory previously locked with GetVariable(). When the lock counter reaches zero the region is simply marked available for internal garbage collection during subsequent GetVariable() calls

Parameters
[in]rgA pointer to a Grid previosly returned by GetVariable()
Return values
statusReturns a non-negative value on success
See also
GetVariable()

◆ VariableExists()

virtual bool VAPoR::DataMgr::VariableExists ( size_t  ts,
string  varname,
int  level = 0,
int  lod = 0 
) const
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]levelRefinement level requested.
[in]lodCompression level of detail requested. refinement level contained in the DC.

Member Data Documentation

◆ _blk_mem_mgr

VAPoR::BlkMemMgr* VAPoR::DataMgr::_blk_mem_mgr
protected

Definition at line 751 of file DataMgr.h.

◆ _blkExtsCache

std::map<string, BlkExts> VAPoR::DataMgr::_blkExtsCache
protected

Definition at line 759 of file DataMgr.h.

◆ _bs

DimsType VAPoR::DataMgr::_bs
protected

Definition at line 735 of file DataMgr.h.

◆ _dataVarNamesCache

std::map<std::pair<VarType, size_t>, std::vector<string> > VAPoR::DataMgr::_dataVarNamesCache
mutableprotected

Definition at line 717 of file DataMgr.h.

◆ _dc

DC* VAPoR::DataMgr::_dc
protected

Definition at line 723 of file DataMgr.h.

◆ _doTransformHorizontal

bool VAPoR::DataMgr::_doTransformHorizontal
protected

Definition at line 728 of file DataMgr.h.

◆ _doTransformVertical

bool VAPoR::DataMgr::_doTransformVertical
protected

Definition at line 729 of file DataMgr.h.

◆ _dvm

DerivedVarMgr VAPoR::DataMgr::_dvm
protected

Definition at line 727 of file DataMgr.h.

◆ _format

string VAPoR::DataMgr::_format
protected

Definition at line 719 of file DataMgr.h.

◆ _gridHelper

VAPoR::GridHelper VAPoR::DataMgr::_gridHelper
protected

Definition at line 725 of file DataMgr.h.

◆ _lockedFloatBlks

std::map<const Grid *, vector<float *> > VAPoR::DataMgr::_lockedFloatBlks
protected

Definition at line 761 of file DataMgr.h.

◆ _lockedIntBlks

std::map<const Grid *, vector<int *> > VAPoR::DataMgr::_lockedIntBlks
protected

Definition at line 762 of file DataMgr.h.

◆ _mem_size

size_t VAPoR::DataMgr::_mem_size
protected

Definition at line 721 of file DataMgr.h.

◆ _nthreads

int VAPoR::DataMgr::_nthreads
protected

Definition at line 720 of file DataMgr.h.

◆ _openVarName

string VAPoR::DataMgr::_openVarName
protected

Definition at line 730 of file DataMgr.h.

◆ _PipeLines

std::vector<PipeLine *> VAPoR::DataMgr::_PipeLines
protected

Definition at line 753 of file DataMgr.h.

◆ _proj4String

string VAPoR::DataMgr::_proj4String
protected

Definition at line 733 of file DataMgr.h.

◆ _proj4StringDefault

string VAPoR::DataMgr::_proj4StringDefault
protected

Definition at line 734 of file DataMgr.h.

◆ _regionsList

std::list<region_t> VAPoR::DataMgr::_regionsList
protected

Definition at line 749 of file DataMgr.h.

◆ _timeCoordinates

std::vector<double> VAPoR::DataMgr::_timeCoordinates
protected

Definition at line 732 of file DataMgr.h.

◆ _udunits

VAPoR::UDUnits VAPoR::DataMgr::_udunits
protected

Definition at line 724 of file DataMgr.h.

◆ _varInfoCacheDouble

VarInfoCache<double> VAPoR::DataMgr::_varInfoCacheDouble
mutableprotected

Definition at line 756 of file DataMgr.h.

◆ _varInfoCacheSize_T

VarInfoCache<size_t> VAPoR::DataMgr::_varInfoCacheSize_T
mutableprotected

Definition at line 755 of file DataMgr.h.

◆ _varInfoCacheVoidPtr

VarInfoCache<void *> VAPoR::DataMgr::_varInfoCacheVoidPtr
mutableprotected

Definition at line 757 of file DataMgr.h.


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