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  teca_metadata get_output_metadata(
62  unsigned int port,
63  const std::vector<teca_metadata> &input_md) override;
64 
65  std::vector<teca_metadata> get_upstream_request(
66  unsigned int port,
67  const std::vector<teca_metadata> &input_md,
68  const teca_metadata &request) override;
69 
70  const_p_teca_dataset execute(
71  unsigned int port,
72  const std::vector<const_p_teca_dataset> &input_data,
73  const teca_metadata &request) override;
74 
75 private:
76  double max_daily_distance;
77  double min_wind_speed;
78  double min_wind_duration;
79  unsigned long step_interval;
80 };
81 
82 #endif
teca_metadata
A generic container for meta data in the form of name=value pairs.
Definition: teca_metadata.h:18
teca_shared_object.h
teca_tc_trajectory
GFDL tropical storms trajectory tracking algorithm.
Definition: teca_tc_trajectory.h:33
teca_algorithm
The interface to TECA pipeline architecture.
Definition: teca_algorithm.h:237