|
TECA
The Toolkit for Extreme Climate Analysis
|
Codes for dealing with teca_metadata. More...
Functions | |
| TECA_EXPORT int | get_array_extent (const teca_metadata &array_attributes, const unsigned long mesh_extent[8], unsigned long array_extent[8]) |
| template<typename index_t > | |
| int | get_requested_indices (const teca_metadata &request, std::string &request_key, index_t indices[2]) |
| template<typename index_t > | |
| int | get_requested_index (const teca_metadata &request, std::string &request_key, index_t &index) |
Codes for dealing with teca_metadata.
| TECA_EXPORT int teca_metadata_util::get_array_extent | ( | const teca_metadata & | array_attributes, |
| const unsigned long | mesh_extent[8], | ||
| unsigned long | array_extent[8] | ||
| ) |
Given a collection of array attributes (following the conventions used by the teca_cf_reader) and a mesh extent, compute and return the valid extent of the array. This takes into account 1d and 2d arrays on a 3d mesh. Return zero if successful. The mesh_dims_active key is required, if not found 1 is returned and the array_extent is set to the mesh_extent.
| int teca_metadata_util::get_requested_index | ( | const teca_metadata & | request, |
| std::string & | request_key, | ||
| index_t & | index | ||
| ) |
Get the requested index from the request. Use this function when the algorithm can not handle requests for multiple indices. A check is performed to ensure that only one index was requested.
| [in] | request | the request |
| [out] | request_key | the name of the key holding the index @apram[out] index the requested index |
| int teca_metadata_util::get_requested_indices | ( | const teca_metadata & | request, |
| std::string & | request_key, | ||
| index_t | indices[2] | ||
| ) |
Get the requested index extent from the request.
| [in] | request | the request |
| [out] | request_key | the name of the key holding the index @apram[out] indices the requested index extent |