TECA
teca_integrated_vapor_transport.h
1 #ifndef teca_integrated_vapor_transport_h
2 #define teca_integrated_vapor_transport_h
3 
4 #include "teca_shared_object.h"
5 #include "teca_vertical_reduction.h"
6 #include "teca_metadata.h"
7 
8 #include <string>
9 #include <vector>
10 
11 TECA_SHARED_OBJECT_FORWARD_DECL(teca_integrated_vapor_transport)
12 
13 
27 {
28 public:
29  TECA_ALGORITHM_STATIC_NEW(teca_integrated_vapor_transport)
30  TECA_ALGORITHM_DELETE_COPY_ASSIGN(teca_integrated_vapor_transport)
31  TECA_ALGORITHM_CLASS_NAME(teca_integrated_vapor_transport)
33 
34  // report/initialize to/from Boost program options
35  // objects.
36  TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION()
37  TECA_SET_ALGORITHM_PROPERTIES()
38 
39  // set the name of the varaiable that contains the longitudinal
40  // component of the wind vector ("ua")
41  TECA_ALGORITHM_PROPERTY(std::string, wind_u_variable)
42 
43  // set the name of the varaiable that contains the latitudinal
44  // component of the wind vector ("va")
45  TECA_ALGORITHM_PROPERTY(std::string, wind_v_variable)
46 
47  // set the name of the variable that contains the specific
48  // humidity ("hus")
49  TECA_ALGORITHM_PROPERTY(std::string,
50  specific_humidity_variable)
51 
52  // set the name of the varaiable that contains the longitudinal
53  // component of the ivt vector ("ivt_u")
54  TECA_ALGORITHM_PROPERTY(std::string, ivt_u_variable)
55 
56  // set the name of the varaiable that contains the latitudinal
57  // component of the ivt vector ("ivt_v")
58  TECA_ALGORITHM_PROPERTY(std::string, ivt_v_variable)
59 
60  // set the _fillValue attribute for the output data.
61  // default 1.0e20
62  TECA_ALGORITHM_PROPERTY(double, fill_value)
63 
64 protected:
66 
67 private:
68  teca_metadata get_output_metadata(
69  unsigned int port,
70  const std::vector<teca_metadata> &input_md) override;
71 
72  std::vector<teca_metadata> get_upstream_request(
73  unsigned int port,
74  const std::vector<teca_metadata> &input_md,
75  const teca_metadata &request) override;
76 
77  const_p_teca_dataset execute(
78  unsigned int port,
79  const std::vector<const_p_teca_dataset> &input_data,
80  const teca_metadata &request) override;
81 
82 private:
83  std::string wind_u_variable;
84  std::string wind_v_variable;
85  std::string specific_humidity_variable;
86  std::string ivt_u_variable;
87  std::string ivt_v_variable;
88  double fill_value;
89 };
90 
91 #endif
teca_metadata
Definition: teca_metadata.h:17
teca_integrated_vapor_transport
an algorithm that computes integrated vapor transport (IVT)
Definition: teca_integrated_vapor_transport.h:27
teca_vertical_reduction
base class for vertical reducitons
Definition: teca_vertical_reduction.h:21