1 #ifndef teca_cf_spatial_time_step_mapper_h
2 #define teca_cf_spatial_time_step_mapper_h
4 #include "teca_config.h"
5 #include "teca_metadata.h"
6 #include "teca_cf_layout_manager.h"
7 #include "teca_cf_time_step_mapper.h"
17 #include <unordered_map>
22 using p_teca_cf_spatial_time_step_mapper = std::shared_ptr<teca_cf_spatial_time_step_mapper>;
30 static p_teca_cf_spatial_time_step_mapper
New()
66 unsigned long first_step,
unsigned long last_step,
67 unsigned long number_of_temporal_partitions,
68 unsigned long temporal_partition_size,
unsigned long *extent,
69 unsigned long number_of_spatial_partitions,
70 int partition_x,
int partition_y,
int partition_z,
71 unsigned long min_block_size_x,
unsigned long min_block_size_y,
72 unsigned long min_block_size_z,
73 const teca_calendar_util::p_interval_iterator &it,
74 int index_executive_compatability,
const std::string &index_request_key);
77 std::vector<teca_metadata> &up_reqs)
override;
82 std::vector<p_teca_cf_layout_manager> &managers)
override;
86 void write_partitions();
101 using step_bracket_t = std::pair<long, long>;
105 int index_executive_compatability;
106 std::string index_request_key;
107 std::vector<step_bracket_t> file_steps;
108 spatial_extent_t whole_extent;
109 std::vector<temporal_extent_t> temporal_partitions;
110 std::deque<spatial_extent_t> spatial_partitions;
NetCDF CF2 files time step mapper.
Definition: teca_cf_spatial_time_step_mapper.h:26
p_teca_cf_layout_manager get_layout_manager(long time_step) override
given a time step returns the associated layout manager
static p_teca_cf_spatial_time_step_mapper New()
allocate and return a new object
Definition: teca_cf_spatial_time_step_mapper.h:30
int initialize(MPI_Comm comm, unsigned long first_step, unsigned long last_step, unsigned long number_of_temporal_partitions, unsigned long temporal_partition_size, unsigned long *extent, unsigned long number_of_spatial_partitions, int partition_x, int partition_y, int partition_z, unsigned long min_block_size_x, unsigned long min_block_size_y, unsigned long min_block_size_z, const teca_calendar_util::p_interval_iterator &it, int index_executive_compatability, const std::string &index_request_key)
int get_layout_manager(const unsigned long temporal_extent[2], std::vector< p_teca_cf_layout_manager > &managers) override
int to_stream(std::ostream &os) override
print a summary to the stream
int get_file_id(long time_step, long &file_id)
given a time step, get the corresponding file id
int get_upstream_requests(teca_metadata base_req, std::vector< teca_metadata > &up_reqs) override
construct requests for this rank
Defines the interface for mapping time steps to files.
Definition: teca_cf_time_step_mapper.h:23
std::array< unsigned long, 2 > temporal_extent_t
Definition: teca_coordinate_util.h:1094
std::array< unsigned long, 6 > spatial_extent_t
Definition: teca_coordinate_util.h:1089
p_teca_error_handler error_handler TECA_EXPORT
The global error handler instance.