VAPOR3 3.9.4
|
Functions | |
VDF_API bool | MaxXFormPresent (const DataMgr *dataMgr, size_t timestep, string varname, size_t &maxXForm) |
VDF_API bool | MaxLODPresent (const DataMgr *dataMgr, size_t timestep, string varname, size_t &maxLOD) |
VDF_API int | ConvertPCSToLonLat (const DataMgr *dataMgr, double coords[], int npoints=1) |
VDF_API int | ConvertPCSToLonLat (string projString, double coords[], int npoints=1) |
VDF_API int | ConvertLonLatToPCS (const DataMgr *dataMgr, double coords[], int npoints=1) |
VDF_API int | ConvertLonLatToPCS (string projString, double coords[], int npoints=1) |
template<typename T > | |
VDF_API int | GetGrids (DataMgr *dataMgr, size_t ts, const vector< string > &varnames, const T &minExtsReq, const T &maxExtsReq, bool useLowerAccuracy, int *refLevel, int *lod, std::vector< Grid * > &grids, bool lock=false) |
VDF_API int | GetGrids (DataMgr *dataMgr, size_t ts, string varname, const CoordType &minExtsReq, const CoordType &maxExtsReq, bool useLowerAccuracy, int *refLevel, int *lod, Grid **gridptr, bool lock=false) |
VDF_API int | GetGrids (DataMgr *dataMgr, size_t ts, string varname, const DimsType &minExtsReq, const DimsType &maxExtsReq, bool useLowerAccuracy, int *refLevel, int *lod, Grid **gridptr, bool lock=false) |
VDF_API int | GetGrids (DataMgr *dataMgr, size_t ts, const vector< string > &varnames, bool useLowerAccuracy, int *refLevel, int *lod, std::vector< Grid * > &grids, bool lock=false) |
VDF_API int | GetGrids (DataMgr *dataMgr, size_t ts, string varname, bool useLowerAccuracy, int *refLevel, int *lod, Grid **gridptr, bool lock=false) |
VDF_API void | UnlockGrids (DataMgr *dataMgr, const std::vector< Grid * > &grids) |
bool | GetAxes (const DataMgr *dataMgr, string varname, vector< int > &axes) |
VDF_API bool | GetExtents (DataMgr *dataMgr, size_t timestep, string varname, int refLevel, int lod, CoordType &minExts, CoordType &maxExts) |
VDF_API bool | GetExtents (DataMgr *dataMgr, size_t timestep, const vector< string > &varnames, int refLevel, int lod, CoordType &minExts, CoordType &maxExts, vector< int > &axes) |
VDF_API int | GetDefaultMetaInfoStride (DataMgr *dataMgr, std::string varname, int refinementLevel) |
Used by the histo for calculating some meta data. | |
VDF_API double | Get2DRendererDefaultZ (DataMgr *dataMgr, size_t ts, int refLevel, int lod) |
VDF_API bool | GetFirstExistingVariable (DataMgr *dataMgr, int level, int lod, int ndim, string &varname, size_t &ts) |
VDF_API bool | GetFirstExistingVariable (DataMgr *dataMgr, size_t ts, int level, int lod, int ndim, string &varname) |
VDF_API int VAPoR::DataMgrUtils::ConvertLonLatToPCS | ( | const DataMgr * | dataMgr, |
double | coords[], | ||
int | npoints = 1 |
||
) |
Convert lon/lat coordinates to Projected Coordinate System coordinates, in-place.
Perform in-place conversion of an array of interleaved pairs of coordinates from lon-lat to PCS coordinates. The input pairs are ordered longitude, then latitude. The output pairs are ordered X, then Y Return false if can't do it.
[in/out] | coords coordinates to be converted | |
[in] | npoints | Number of points to convert. |
VDF_API int VAPoR::DataMgrUtils::ConvertLonLatToPCS | ( | string | projString, |
double | coords[], | ||
int | npoints = 1 |
||
) |
VDF_API int VAPoR::DataMgrUtils::ConvertPCSToLonLat | ( | const DataMgr * | dataMgr, |
double | coords[], | ||
int | npoints = 1 |
||
) |
Convert Projected Coordinate System coordinates to lon/lat in-place.
Perform in-place conversion of an array of interleaved pairs of coordinates from PCS to lon-lat coordinates. The input pairs are ordered X, then Y. The output pairs are ordered Longitude, then Latitude Return false if can't do it.
[in/out] | coords coordinates to be converted | |
[in] | npoints | Number of points to convert. |
VDF_API int VAPoR::DataMgrUtils::ConvertPCSToLonLat | ( | string | projString, |
double | coords[], | ||
int | npoints = 1 |
||
) |
VDF_API double VAPoR::DataMgrUtils::Get2DRendererDefaultZ | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
int | refLevel, | ||
int | lod | ||
) |
Get default z value at the base of the domain. Useful for applying a height value to 2D renderers.
[in] | dataMgr | Current (valid) dataMgr |
default | height value for current dataset |
bool VAPoR::DataMgrUtils::GetAxes | ( | const DataMgr * | dataMgr, |
string | varname, | ||
vector< int > & | axes | ||
) |
Get the spatial coordinate axes for a variable
Returns the ordered (fastest to slowest varying) coordinate axis for a named variable.
[in] | varname | Name of variable |
[out] | axes | Ordered list of axis indecies. The range of possible axes values is [0..2], with 0 corresponding to the X coordinate axis, 1 corresponding to Y, and 2 to Z. |
VDF_API int VAPoR::DataMgrUtils::GetDefaultMetaInfoStride | ( | DataMgr * | dataMgr, |
std::string | varname, | ||
int | refinementLevel | ||
) |
Used by the histo for calculating some meta data.
VDF_API bool VAPoR::DataMgrUtils::GetExtents | ( | DataMgr * | dataMgr, |
size_t | timestep, | ||
const vector< string > & | varnames, | ||
int | refLevel, | ||
int | lod, | ||
CoordType & | minExts, | ||
CoordType & | maxExts, | ||
vector< int > & | axes | ||
) |
Get coordinate extents for one or more variables.
Get the minimum and maximum coordinate extents of a list of variables at a given time step. This function handles variables with mixed dimensionality, and 2D variables that are defined on different planes. The extents are returned in minExts
and maxExts
.
[in] | timestep | Time step of variable. Ignored for variables that are not time-varying. |
[in] | Name | of variable |
[out] | minExts | A vector whose size matches the dimensionality of the variable, and containing the minimum ordered coordinate extents of varname at time step timestep . |
[out] | maxExts | A vector whose size matches the dimensionality of the variable, and containing the maximum ordered coordinate extents of varname at time step timestep . |
[out] | axes | A vector indicating the axis of each coordinate returned in minExts and maxExts . See GetAxes() |
VDF_API bool VAPoR::DataMgrUtils::GetExtents | ( | DataMgr * | dataMgr, |
size_t | timestep, | ||
string | varname, | ||
int | refLevel, | ||
int | lod, | ||
CoordType & | minExts, | ||
CoordType & | maxExts | ||
) |
Get a variables coordinate extents
Get the minimum and maximum coordinate extents of a name variable at a given time step. The extents are returned in minExts
and maxExts
. The size of these vectors will match the dimensionality of the variable. The GetAxes() method can be used to determine which coordinate axes the returned extents correspond to.
If varname
is an empty string the function scans the list of available data variables looking for the highest dimension variable available.
[in] | timestep | Time step of variable. Ignored for variables that are not time-varying. |
[in] | Name | of variable |
[out] | minExts | A vector whose size matches the dimensionality of the variable, and containing the minimum ordered coordinate extents of varname at time step timestep . |
[out] | maxExts | A vector whose size matches the dimensionality of the variable, and containing the maximum ordered coordinate extents of varname at time step timestep . |
VDF_API bool VAPoR::DataMgrUtils::GetFirstExistingVariable | ( | DataMgr * | dataMgr, |
int | level, | ||
int | lod, | ||
int | ndim, | ||
string & | varname, | ||
size_t & | ts | ||
) |
Find the first variable that exists
This function searches a data collection looking over all time steps and variable names for the first available variable it can find with a given dimension ndim
, refinement level level
, and level of detail lod
. A variable is "available" if DataMgr::VariableExists() returns true
[in] | ndim | Number of spatial dimensions |
[out] | varname | Returns the name of the first variable found |
[out] | ts | Returns the time step of the first variable found |
status | Returns true if a variable is found, false otherwise |
VDF_API bool VAPoR::DataMgrUtils::GetFirstExistingVariable | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
int | level, | ||
int | lod, | ||
int | ndim, | ||
string & | varname | ||
) |
Find the first variable that exists at a given time step
This function searches a data collection looking over all variable names for the first available variable it can find with a given dimension ndim
, time step ts
, refinement level level
, and level of detail lod
. A variable is "available" if DataMgr::VariableExists() returns true
[in] | ndim | Number of spatial dimensions |
[out] | varname | Returns the name of the first variable found |
status | Returns true if a variable is found, false otherwise |
VDF_API int VAPoR::DataMgrUtils::GetGrids | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
const vector< string > & | varnames, | ||
bool | useLowerAccuracy, | ||
int * | refLevel, | ||
int * | lod, | ||
std::vector< Grid * > & | grids, | ||
bool | lock = false |
||
) |
VDF_API int VAPoR::DataMgrUtils::GetGrids | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
const vector< string > & | varnames, | ||
const T & | minExtsReq, | ||
const T & | maxExtsReq, | ||
bool | useLowerAccuracy, | ||
int * | refLevel, | ||
int * | lod, | ||
std::vector< Grid * > & | grids, | ||
bool | lock = false |
||
) |
Method that obtains one or more regular grids at specified timestep, extents, refinement, and lod. If the data is available, but not at the requested extents, refinement or lod, then the extents may be reduced, and the data accuracy may be reduced.
All variables must have same spatial dimensionality
[in] | ts | timestep being requested |
[in] | variable | name(s) being requested |
[in] | minExtsReq | Minimum requested extents |
[in] | maxExtsReq | Maximum requested extents |
[in/out] | *refLevel : requested refinement may be reduced if only a lower level is available | |
[in] | useLowerAccuracy | If true use lower accuracy data then requested if the requested accuracy is not available |
[in/out] | *lod : requested lod may be reduced if only a lower lod is available. | |
[out] | grid | is a vector of Grid* pointers, one for each variable |
[in] | lock | : if false, the default, UnlockGrids() will be called on each of the grids after they are all successfully allocated. Otherwise, the the grids will be locked in memory until released by an explicit call to UnlockGrids() |
VDF_API int VAPoR::DataMgrUtils::GetGrids | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
string | varname, | ||
bool | useLowerAccuracy, | ||
int * | refLevel, | ||
int * | lod, | ||
Grid ** | gridptr, | ||
bool | lock = false |
||
) |
VDF_API int VAPoR::DataMgrUtils::GetGrids | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
string | varname, | ||
const CoordType & | minExtsReq, | ||
const CoordType & | maxExtsReq, | ||
bool | useLowerAccuracy, | ||
int * | refLevel, | ||
int * | lod, | ||
Grid ** | gridptr, | ||
bool | lock = false |
||
) |
VDF_API int VAPoR::DataMgrUtils::GetGrids | ( | DataMgr * | dataMgr, |
size_t | ts, | ||
string | varname, | ||
const DimsType & | minExtsReq, | ||
const DimsType & | maxExtsReq, | ||
bool | useLowerAccuracy, | ||
int * | refLevel, | ||
int * | lod, | ||
Grid ** | gridptr, | ||
bool | lock = false |
||
) |
VDF_API bool VAPoR::DataMgrUtils::MaxLODPresent | ( | const DataMgr * | dataMgr, |
size_t | timestep, | ||
string | varname, | ||
size_t & | maxLOD | ||
) |
Return the maximum available LOD level for a variable.
This method checks for the existence of a variable at all available levels of detail (see DataMgr::GetCRatios()), and returns the highest available level. The minimum level is zero and the max is DataMgr::GetCRatios().size() - 1.
[in] | timestep | Time Step |
[in] | varname | variable name |
[out] | maxLOD | Maximum available level |
VDF_API bool VAPoR::DataMgrUtils::MaxXFormPresent | ( | const DataMgr * | dataMgr, |
size_t | timestep, | ||
string | varname, | ||
size_t & | maxXForm | ||
) |
Return the maximum available transform level for a variable.
This method checks for the existence of a variable at all available transform levels (see DataMgr::GetNumRefLevels()), and returns the highest available level. The minimum level is zero and the max is DataMgr::GetNumRefLevels() - 1.
[in] | timestep | Time Step |
[in] | varname | variable name |
[out] | maxXForm | Maximum available level |