TECA
The Toolkit for Extreme Climate Analysis
teca_metadata_util Namespace Reference

Codes for dealing with teca_metadata. More...

Functions

int get_array_extent (const teca_metadata &array_attributes, const unsigned long mesh_extent[6], unsigned long array_extent[6])
 

Detailed Description

Codes for dealing with teca_metadata.

Function Documentation

◆ get_array_extent()

int teca_metadata_util::get_array_extent ( const teca_metadata array_attributes,
const unsigned long  mesh_extent[6],
unsigned long  array_extent[6] 
)

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.