NetCDF CF2 files time step mapper.
More...
#include <teca_cf_spatial_time_step_mapper.h>
|
| 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_upstream_requests (teca_metadata base_req, std::vector< teca_metadata > &up_reqs) override |
| | construct requests for this rank More...
|
| |
| p_teca_cf_layout_manager | get_layout_manager (long time_step) override |
| | given a time step returns the associated layout manager More...
|
| |
| 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 More...
|
| |
|
void | write_partitions () |
| |
| virtual bool | initialized () |
| | returns true if the mapper has been successfully initialized More...
|
| |
| virtual int | finalize () |
| |
| template<typename op_t > |
| int | file_table_apply (const op_t &op) |
| |
|
| static p_teca_cf_spatial_time_step_mapper | New () |
| | allocate and return a new object More...
|
| |
|
|
int | index_executive_compatability |
| |
|
std::string | index_request_key |
| |
|
std::vector< step_bracket_t > | file_steps |
| |
|
spatial_extent_t | whole_extent |
| |
|
std::vector< temporal_extent_t > | temporal_partitions |
| |
|
std::deque< spatial_extent_t > | spatial_partitions |
| |
| MPI_Comm | comm |
| | communicator to partition into per-file communicators More...
|
| |
| std::string | index_initializer_key |
| | pipeline control key names More...
|
| |
|
std::string | index_request_key |
| |
| long | start_time_step |
| | user provided overrides More...
|
| |
|
long | end_time_step |
| |
| long | n_time_steps |
| | time_steps to request by rank More...
|
| |
|
std::vector< long > | block_size |
| |
|
std::vector< long > | block_start |
| |
| long | n_files |
| | output files More...
|
| |
|
std::vector< std::set< int > > | file_ranks |
| |
| std::vector< MPI_Comm > | file_comms |
| | per file communicators More...
|
| |
|
file_table_t | file_table |
| |
NetCDF CF2 files time step mapper.
◆ get_file_id()
| int teca_cf_spatial_time_step_mapper::get_file_id |
( |
long |
time_step, |
|
|
long & |
file_id |
|
) |
| |
|
protected |
given a time step, get the corresponding file id
◆ get_layout_manager() [1/2]
| int teca_cf_spatial_time_step_mapper::get_layout_manager |
( |
const unsigned long |
temporal_extent[2], |
|
|
std::vector< p_teca_cf_layout_manager > & |
managers |
|
) |
| |
|
overridevirtual |
given an inclusive range of time steps, get the corresponding layout managers that can be used to create, define and write the data to disk. When more than one manager is returned, each should be passed the data, giving it a chance to write the subset it is responsible for to disk.
- Parameters
-
| [in] | temporal_extent | the first and last step that will be written |
| [out] | manager | a vector of teca_cf_layout_manager instances that need to be called to write the data. |
- Returns
- zero if successful.
Reimplemented from teca_cf_time_step_mapper.
◆ get_layout_manager() [2/2]
| p_teca_cf_layout_manager teca_cf_spatial_time_step_mapper::get_layout_manager |
( |
long |
time_step | ) |
|
|
overridevirtual |
◆ get_upstream_requests()
◆ initialize()
| int teca_cf_spatial_time_step_mapper::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 |
|
) |
| |
initialize based on input metadata. this is a collective call creates communicator groups for each file and creates the file layout managers for the local rank. After this call one can access file managers to create, define and write local datasets to the NetCDF files in cf format.
- Parameters
-
| [in] | comm | the MPI communicator to parallelize execution across |
| [in] | first_step | the first step to process |
| [in] | last_step | the last step to process |
| [in] | number_of_temporal_partitons | the number of temporal partitions or zero to use the temporal_partiton_size parameter |
| [in] | temporal_partition_size | number of time steps per partition or zero to use the number_of_temporal partitons parameter. |
| [in] | extent | the spatial extent to partition [i0, i1, j0, j1, k0, k1] |
| [in] | number_of_spatial_partitons | the number of spatial partitons |
| [in] | partition_x | if zero skip splitting in the x-direction |
| [in] | partition_y | if zero skip splitting in the y-direction |
| [in] | partition_z | if zero skip splitting in the z-direction |
| [in] | min_block_size_x | sets the minimum block size in the x-direction |
| [in] | min_block_size_y | sets the minimum block size in the y-direction |
| [in] | min_block_size_z | sets the minimum block size in the z-direction |
| [in] | it | a teca_interval_iterator used to define the temporal layout of the files |
| [in] | index_executive_compatability | forces temporal_partion_size to 1 |
| [in] | index_request_key | the name of the key to use when making requests |
- Returns
- zero if successful
◆ New()
| static p_teca_cf_spatial_time_step_mapper teca_cf_spatial_time_step_mapper::New |
( |
| ) |
|
|
inlinestatic |
allocate and return a new object
◆ to_stream()
| int teca_cf_spatial_time_step_mapper::to_stream |
( |
std::ostream & |
os | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following file: