1 #ifndef teca_derived_quantity_h
2 #define teca_derived_quantity_h
4 #include "teca_programmable_algorithm.h"
5 #include "teca_metadata.h"
6 #include "teca_dataset.h"
8 #include "teca_array_attributes.h"
13 #if defined(__CUDACC__)
14 #pragma nv_diag_suppress = partial_override
40 TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION()
41 TECA_SET_ALGORITHM_PROPERTIES()
49 TECA_ALGORITHM_VECTOR_PROPERTY(std::
string, dependent_variable)
56 TECA_ALGORITHM_VECTOR_PROPERTY(std::
string, derived_variable)
62 void append_derived_variable(const std::
string &name,
65 this->append_derived_variable(name);
66 this->append_derived_variable_attribute(atts);
73 const std::vector<teca_array_attributes> &atts)
75 this->set_derived_variables(names);
76 this->set_derived_variable_attributes(atts);
90 {
return this->operation_name; }
94 {
return this->operation_name; }
112 const std::vector<teca_metadata> &input_md)
override;
114 std::vector<teca_metadata> get_upstream_request(
115 unsigned int port,
const std::vector<teca_metadata> &input_md,
126 int set_name(
const std::string &name)
override;
129 std::string operation_name;
130 std::vector<std::string> dependent_variables;
131 std::vector<std::string> derived_variables;
132 std::vector<teca_array_attributes> derived_variable_attributes;
135 #if defined(__CUDACC__)
136 #pragma nv_diag_default = partial_override
a programmable algorithm specialized for simple array based computations
Definition: teca_derived_quantity.h:30
const std::string & get_operation_name() const
get the operation name
Definition: teca_derived_quantity.h:89
void set_derived_variables(const std::vector< std::string > &names, const std::vector< teca_array_attributes > &atts)
Definition: teca_derived_quantity.h:72
void set_operation_name(const std::string &op_name)
std::string & get_operation_name()
get the operation name
Definition: teca_derived_quantity.h:93
An algorithm implemented with user provided callbacks.
Definition: teca_programmable_algorithm.h:87
void set_request_callback(const request_callback_t &v)
Definition: teca_programmable_algorithm.h:153
const execute_callback_t & get_execute_callback() const
Definition: teca_programmable_algorithm.h:167
void set_report_callback(const report_callback_t &v)
Definition: teca_programmable_algorithm.h:140
const report_callback_t & get_report_callback() const
Definition: teca_programmable_algorithm.h:140
const request_callback_t & get_request_callback() const
Definition: teca_programmable_algorithm.h:153
void set_execute_callback(const execute_callback_t &v)
Definition: teca_programmable_algorithm.h:167
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.
A convenience container for conventional array attributes necessary and/or useful when producing NetC...
Definition: teca_array_attributes.h:32