TECA
The Toolkit for Extreme Climate Analysis
teca_temporal_index_select.h
1 #ifndef teca_temporal_index_select_h
2 #define teca_temporal_index_select_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_temporal_index_select)
12 
13 /// An algorithm that selects specific time indices
15 {
16 public:
17  TECA_ALGORITHM_STATIC_NEW(teca_temporal_index_select)
18  TECA_ALGORITHM_DELETE_COPY_ASSIGN(teca_temporal_index_select)
19  TECA_ALGORITHM_CLASS_NAME(teca_temporal_index_select)
21 
22  // report/initialize to/from Boost program options
23  // objects.
24  TECA_GET_ALGORITHM_PROPERTIES_DESCRIPTION()
25  TECA_SET_ALGORITHM_PROPERTIES()
26 
27  /** @name indices
28  * Set the time axis inidices to select
29  */
30  ///@{
31  TECA_ALGORITHM_VECTOR_PROPERTY(long long, indice)
32  ///@}
33 
34 protected:
36 
37 private:
38  using teca_algorithm::get_output_metadata;
39 
40  teca_metadata get_output_metadata(
41  unsigned int port,
42  const std::vector<teca_metadata> &input_md) override;
43 
44  std::vector<teca_metadata> get_upstream_request(
45  unsigned int port,
46  const std::vector<teca_metadata> &input_md,
47  const teca_metadata &request) override;
48 
49  const_p_teca_dataset execute(
50  unsigned int port,
51  const std::vector<const_p_teca_dataset> &input_data,
52  const teca_metadata &request) override;
53 
54 private:
55  std::vector<long long> indices;
56 };
57 
58 #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
An algorithm that selects specific time indices.
Definition: teca_temporal_index_select.h:15
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.