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

Derived variable abstract class. More...

#include <DerivedVar.h>

Inheritance diagram for VAPoR::DerivedVar:
Wasp::MyBase VAPoR::DerivedCoordVar VAPoR::DerivedDataVar VAPoR::DerivedCFVertCoordVar VAPoR::DerivedCoordVar_CF1D VAPoR::DerivedCoordVar_CF2D VAPoR::DerivedCoordVar_PCSFromLatLon VAPoR::DerivedCoordVar_Staggered VAPoR::DerivedCoordVar_Time VAPoR::DerivedCoordVar_TimeInSeconds VAPoR::DerivedCoordVar_UnStaggered VAPoR::DerivedCoordVar_WRFTime VAPoR::DerivedParticleDensity

Public Member Functions

 DerivedVar (string varName)
 
virtual ~DerivedVar ()
 
virtual int Initialize ()=0
 
string GetName () const
 
virtual bool GetBaseVarInfo (DC::BaseVar &var) const =0
 
virtual bool GetAtt (string attname, std::vector< double > &values) const
 
virtual bool GetAtt (string attname, std::vector< long > &values) const
 
virtual bool GetAtt (string attname, string &values) const
 
virtual std::vector< string > GetAttNames () const
 
virtual DC::XType GetAttType (string attname) const
 
virtual std::vector< string > GetInputs () const =0
 
virtual int GetDimLensAtLevel (int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level) const =0
 
virtual int GetDimLensAtLevel (int level, std::vector< size_t > &dims_at_level, std::vector< size_t > &bs_at_level, long ts) const
 
virtual size_t GetNumRefLevels () const
 
virtual std::vector< size_t > GetCRatios () const
 
virtual int OpenVariableRead (size_t ts, int level=0, int lod=0)=0
 
virtual int CloseVariable (int fd)=0
 
virtual int ReadRegion (int fd, const std::vector< size_t > &min, const std::vector< size_t > &max, float *region)=0
 
virtual int ReadRegion (int fd, const std::vector< size_t > &min, const std::vector< size_t > &max, double *region)
 
virtual bool VariableExists (size_t ts, int reflevel, int lod) const =0
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

int _getVar (DC *dc, size_t ts, string varname, int level, int lod, const std::vector< size_t > &min, const std::vector< size_t > &max, float *region) const
 
int _getVarDestagger (DC *dc, size_t ts, string varname, int level, int lod, const std::vector< size_t > &min, const std::vector< size_t > &max, float *region, int stagDim) const
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Protected Attributes

string _derivedVarName
 
DC::FileTable _fileTable
 

Additional Inherited Members

- 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
 

Detailed Description

Derived variable abstract class.

This abstract base class defines an API for the internal creation of derived data and coordinate variables. Derived variables may be used to support the results of a data operator (e.g. computing wind speed from velocity component variables), creating of a dimensioned coordinate variable from a dimensionless one (e.g. supporting the CF conventions formula_terms attribute), resampling a variable to a different mesh ( resampling a staggered variable to an unstaggered mesh), or conversion of units (e.g. converting formatted time strings to time in seconds).

Author
John Clyne
Date
January, 2017

Definition at line 34 of file DerivedVar.h.

Constructor & Destructor Documentation

◆ DerivedVar()

VAPoR::DerivedVar::DerivedVar ( string  varName)
inline

Definition at line 36 of file DerivedVar.h.

◆ ~DerivedVar()

virtual VAPoR::DerivedVar::~DerivedVar ( )
inlinevirtual

Definition at line 38 of file DerivedVar.h.

Member Function Documentation

◆ _getVar()

int VAPoR::DerivedVar::_getVar ( DC dc,
size_t  ts,
string  varname,
int  level,
int  lod,
const std::vector< size_t > &  min,
const std::vector< size_t > &  max,
float *  region 
) const
protected

◆ _getVarDestagger()

int VAPoR::DerivedVar::_getVarDestagger ( DC dc,
size_t  ts,
string  varname,
int  level,
int  lod,
const std::vector< size_t > &  min,
const std::vector< size_t > &  max,
float *  region,
int  stagDim 
) const
protected

◆ CloseVariable()

virtual int VAPoR::DerivedVar::CloseVariable ( int  fd)
pure virtual

◆ GetAtt() [1/3]

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

Definition at line 46 of file DerivedVar.h.

◆ GetAtt() [2/3]

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

Definition at line 52 of file DerivedVar.h.

◆ GetAtt() [3/3]

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

Definition at line 58 of file DerivedVar.h.

◆ GetAttNames()

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

Definition at line 64 of file DerivedVar.h.

◆ GetAttType()

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

Definition at line 66 of file DerivedVar.h.

◆ GetBaseVarInfo()

virtual bool VAPoR::DerivedVar::GetBaseVarInfo ( DC::BaseVar var) const
pure virtual

◆ GetCRatios()

virtual std::vector< size_t > VAPoR::DerivedVar::GetCRatios ( ) const
inlinevirtual

◆ GetDimLensAtLevel() [1/2]

virtual int VAPoR::DerivedVar::GetDimLensAtLevel ( int  level,
std::vector< size_t > &  dims_at_level,
std::vector< size_t > &  bs_at_level 
) const
pure virtual

◆ GetDimLensAtLevel() [2/2]

virtual int VAPoR::DerivedVar::GetDimLensAtLevel ( int  level,
std::vector< size_t > &  dims_at_level,
std::vector< size_t > &  bs_at_level,
long  ts 
) const
inlinevirtual

Reimplemented in VAPoR::DerivedCoordVar_CF1D.

Definition at line 72 of file DerivedVar.h.

References GetDimLensAtLevel().

Referenced by GetDimLensAtLevel().

◆ GetInputs()

virtual std::vector< string > VAPoR::DerivedVar::GetInputs ( ) const
pure virtual

◆ GetName()

string VAPoR::DerivedVar::GetName ( ) const
inline

Definition at line 42 of file DerivedVar.h.

◆ GetNumRefLevels()

virtual size_t VAPoR::DerivedVar::GetNumRefLevels ( ) const
inlinevirtual

◆ Initialize()

virtual int VAPoR::DerivedVar::Initialize ( )
pure virtual

◆ OpenVariableRead()

virtual int VAPoR::DerivedVar::OpenVariableRead ( size_t  ts,
int  level = 0,
int  lod = 0 
)
pure virtual

◆ ReadRegion() [1/2]

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

◆ ReadRegion() [2/2]

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

◆ VariableExists()

virtual bool VAPoR::DerivedVar::VariableExists ( size_t  ts,
int  reflevel,
int  lod 
) const
pure virtual

Member Data Documentation

◆ _derivedVarName

string VAPoR::DerivedVar::_derivedVarName
protected

Definition at line 88 of file DerivedVar.h.

◆ _fileTable

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

Definition at line 89 of file DerivedVar.h.


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