TECA
The Toolkit for Extreme Climate Analysis
teca_cf_block_time_step_mapper Class Reference

Maps time steps to files in fixed sized blocks. More...

#include <teca_cf_block_time_step_mapper.h>

Inheritance diagram for teca_cf_block_time_step_mapper:
Collaboration diagram for teca_cf_block_time_step_mapper:

Public Member Functions

int initialize (MPI_Comm comm, long first_step, long last_step, long steps_per_file, const teca_metadata &md)
 
p_teca_cf_layout_manager get_layout_manager (long time_step) override
 
int to_stream (std::ostream &os) override
 print a summary to the stream More...
 
- Public Member Functions inherited from teca_cf_time_step_mapper
virtual bool initialized ()
 
virtual int finalize ()
 
virtual int get_upstream_requests (teca_metadata base_req, std::vector< teca_metadata > &up_reqs)
 
template<typename op_t >
int file_table_apply (const op_t &op)
 

Static Public Member Functions

static p_teca_cf_block_time_step_mapper New ()
 allocate and return a new object More...
 

Protected Member Functions

 teca_cf_block_time_step_mapper (const teca_cf_block_time_step_mapper &)=delete
 
 teca_cf_block_time_step_mapper (const teca_cf_block_time_step_mapper &&)=delete
 
void operator= (const teca_cf_block_time_step_mapper &)=delete
 
void operator= (const teca_cf_block_time_step_mapper &&)=delete
 
int get_file_id (long time_step, long &file_id)
 
- Protected Member Functions inherited from teca_cf_time_step_mapper
 teca_cf_time_step_mapper (const teca_cf_time_step_mapper &)=delete
 
 teca_cf_time_step_mapper (const teca_cf_time_step_mapper &&)=delete
 
void operator= (const teca_cf_time_step_mapper &)=delete
 
void operator= (const teca_cf_time_step_mapper &&)=delete
 
int alloc_file_comms ()
 
int free_file_comms ()
 

Protected Attributes

long n_time_steps_per_file
 
- Protected Attributes inherited from teca_cf_time_step_mapper
MPI_Comm comm
 
std::string index_initializer_key
 
std::string index_request_key
 
long start_time_step
 
long end_time_step
 
long n_time_steps
 
std::vector< long > block_size
 
std::vector< long > block_start
 
long n_files
 
std::vector< std::set< int > > file_ranks
 
std::vector< MPI_Comm > file_comms
 
file_table_t file_table
 

Additional Inherited Members

- Protected Types inherited from teca_cf_time_step_mapper
using file_table_t = std::unordered_map< long, p_teca_cf_layout_manager >
 

Detailed Description

Maps time steps to files in fixed sized blocks.

Member Function Documentation

◆ get_layout_manager()

p_teca_cf_layout_manager teca_cf_block_time_step_mapper::get_layout_manager ( long  time_step)
overridevirtual

given a time step, get the corresponding layout manager that can be used to create, define and write data to disk.

Implements teca_cf_time_step_mapper.

◆ initialize()

int teca_cf_block_time_step_mapper::initialize ( MPI_Comm  comm,
long  first_step,
long  last_step,
long  steps_per_file,
const teca_metadata md 
)

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 on can access file managers to create, define and write local datasets to the NetCDF files in cf format.

◆ New()

static p_teca_cf_block_time_step_mapper teca_cf_block_time_step_mapper::New ( )
inlinestatic

allocate and return a new object

◆ to_stream()

int teca_cf_block_time_step_mapper::to_stream ( std::ostream &  os)
overridevirtual

print a summary to the stream

Implements teca_cf_time_step_mapper.


The documentation for this class was generated from the following file: