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_fwd.h"
7 #include "teca_shared_object.h"
36 TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION()
37 TECA_SET_ALGORITHM_PROPERTIES()
41 TECA_ALGORITHM_VECTOR_PROPERTY(std::string, dependent_variable)
44 TECA_ALGORITHM_PROPERTY(std::string, derived_variable)
48 void set_operation_name(
const std::string &v);
50 const std::string &get_operation_name()
const
51 {
return this->operation_name; }
53 std::string &get_operation_name()
54 {
return this->operation_name; }
58 using teca_programmable_algorithm::set_execute_callback;
59 using teca_programmable_algorithm::get_execute_callback;
69 const std::vector<teca_metadata> &input_md)
override;
71 std::vector<teca_metadata> get_upstream_request(
72 unsigned int port,
const std::vector<teca_metadata> &input_md,
76 using teca_programmable_algorithm::set_report_callback;
77 using teca_programmable_algorithm::get_report_callback;
79 using teca_programmable_algorithm::set_request_callback;
80 using teca_programmable_algorithm::get_request_callback;
84 std::string get_derived_variable(
const teca_metadata &request);
89 std::vector<std::string> &dep_vars);
92 int set_name(
const std::string &name)
override;
95 std::string operation_name;
96 std::vector<std::string> dependent_variables;
97 std::string derived_variable;