|
TECA
The Toolkit for Extreme Climate Analysis
|
A convenience container for conventional array attributes necessary and/or useful when producing NetCDF CF format files using the teca_cf_writer. More...
#include <teca_array_attributes.h>
Public Member Functions | |
| template<typename fv_t = float> | |
| teca_array_attributes (unsigned int tc, unsigned int cen, unsigned long n, const std::string &un, const std::string &ln, const std::string &descr, const int &have_fv=0, const fv_t &fv=fv_t(1e20f)) | |
| teca_array_attributes (const teca_array_attributes &)=default | |
| teca_array_attributes & | operator= (const teca_array_attributes &)=default |
| teca_array_attributes (const teca_metadata &md) | |
| Convert a from metadata object. More... | |
| teca_array_attributes & | operator= (const teca_metadata &md) |
| Convert from metadata object. More... | |
| operator teca_metadata () const | |
| Converts to a metadata object. More... | |
| int | to (teca_metadata &md) const |
| Adds current values to the metadata object. More... | |
| int | merge_to (teca_metadata &md) const |
| Adds the current values to the metadata object, only if they don't exist. More... | |
| int | from (const teca_metadata &md) |
| Intializes values from the metadata object. More... | |
| void | to_stream (std::ostream &os) const |
| Send to the stream in human readable form. More... | |
Static Public Member Functions | |
| static const char * | centering_to_string (int cen) |
| convert the centering code to a string More... | |
Public Attributes | |
| unsigned int | type_code |
| unsigned int | centering |
| unsigned long | size |
| std::string | units |
| std::string | long_name |
| std::string | description |
| int | have_fill_value |
| fill_value_t | fill_value |
A convenience container for conventional array attributes necessary and/or useful when producing NetCDF CF format files using the teca_cf_writer.
| Member | Description |
|---|---|
| type_code | storage type as defined by teca_variant_array::type_code() |
| centering | one of: no_centering, point_centering, cell_centering, |
| edge_centering, or face_centering | |
| size | number of elements in the array |
| units | string describing the units that the variable is in. |
| long name | a more descriptive name |
| description | text describing the data |
| have_fill_value | set non-zero to indicate that a fill_value has been |
| provided. | |
| fill_value | value used to identify missing or invalid data |
| anonymous enum |
The possible mesh centrings.
For coordinate system with orthogonal axes x,y,z relative to cell centering:
If A is one of x,y or z then A_face_centering data is located on the low A face i.e. shifted in the -A direction and arrays will be longer by 1 value in the A direction.
If A is one of x,y or z then A_edge_centering data is located on the low side edge parallel to A corrdinate axis. i.e. shifted in the -B and -C directions and arrays will be longer by 1 value in the B and C directions.
point_centering data is located on the low corner. i.e. shifted in the -A,-B, and -C directions and arrays will be longer by 1 value in the A, B and C directions.
Arrays that are not associated with geometric locations should be identified as no_centering.
The default centering is cell centering.
|
inline |
Convert a from metadata object.
|
static |
convert the centering code to a string
| int teca_array_attributes::from | ( | const teca_metadata & | md | ) |
Intializes values from the metadata object.
| int teca_array_attributes::merge_to | ( | teca_metadata & | md | ) | const |
Adds the current values to the metadata object, only if they don't exist.
| teca_array_attributes::operator teca_metadata | ( | ) | const |
Converts to a metadata object.
| teca_array_attributes& teca_array_attributes::operator= | ( | const teca_metadata & | md | ) |
Convert from metadata object.
| int teca_array_attributes::to | ( | teca_metadata & | md | ) | const |
Adds current values to the metadata object.
| void teca_array_attributes::to_stream | ( | std::ostream & | os | ) | const |
Send to the stream in human readable form.