TECA
The Toolkit for Extreme Climate Analysis
teca_tc_trajectory.h
1 #ifndef teca_tc_trajectory_h
2 #define teca_tc_trajectory_h
3 
4 #include "teca_shared_object.h"
5 #include "teca_algorithm.h"
6 #include "teca_metadata.h"
7 
8 #include <string>
9 #include <vector>
10 
11 TECA_SHARED_OBJECT_FORWARD_DECL(teca_tc_trajectory)
12 
13 /// GFDL tropical storms trajectory tracking algorithm
14 /** for more information see
15  * "Seasonal forecasting of tropical storms using coupled GCM integrations"
16  *
17  * computes trajectories from table of detections. trajectories
18  * are stored in a table.
19  *
20  * the trajectory computation makes use of the following paramteters:
21  *
22  * max_daily_distance (1600 km)
23  * event must be within this distance on the
24  * following day to be considered as part of the trajectory.
25  *
26  * min_wind_speed (17 m/s)
27  * 850 mb wind sped must be above this value.
28  *
29  * min_wind_duration (2 days)
30  * criteria must be satisfied for this many days to be
31  * a candidate
32  */
34 {
35 public:
36  TECA_ALGORITHM_STATIC_NEW(teca_tc_trajectory)
37  TECA_ALGORITHM_DELETE_COPY_ASSIGN(teca_tc_trajectory)
38  TECA_ALGORITHM_CLASS_NAME(teca_tc_trajectory)
40 
41  // report/initialize to/from Boost program options
42  // objects.
43  TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION()
44  TECA_SET_ALGORITHM_PROPERTIES()
45 
46  // set the arrays that contain the vector components
47  // to compute norm from
48  TECA_ALGORITHM_PROPERTY(double, max_daily_distance)
49  TECA_ALGORITHM_PROPERTY(double, min_wind_speed)
50  TECA_ALGORITHM_PROPERTY(double, min_wind_duration)
51 
52  // number of time steps between candidate data
53  // this is used to detect missing candidate data
54  // and abort those tracks. default 1
55  TECA_ALGORITHM_PROPERTY(unsigned long, step_interval)
56 
57 protected:
59 
60 private:
61  using teca_algorithm::get_output_metadata;
62 
63  teca_metadata get_output_metadata(
64  unsigned int port,
65  const std::vector<teca_metadata> &input_md) override;
66 
67  std::vector<teca_metadata> get_upstream_request(
68  unsigned int port,
69  const std::vector<teca_metadata> &input_md,
70  const teca_metadata &request) override;
71 
72  const_p_teca_dataset execute(
73  unsigned int port,
74  const std::vector<const_p_teca_dataset> &input_data,
75  const teca_metadata &request) override;
76 
77 private:
78  double max_daily_distance;
79  double min_wind_speed;
80  double min_wind_duration;
81  unsigned long step_interval;
82 };
83 
84 #endif
The interface to TECA pipeline architecture.
Definition: teca_algorithm.h:244
A generic container for meta data in the form of name=value pairs.
Definition: teca_metadata.h:22
GFDL tropical storms trajectory tracking algorithm.
Definition: teca_tc_trajectory.h:34
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.