|
TECA
|
#include <teca_cf_writer.h>
Classes | |
| class | internals_t |
Public Member Functions | |
| std::shared_ptr< teca_cf_writer > | shared_from_this () |
| std::shared_ptr< teca_cf_writer const > | shared_from_this () const |
| teca_cf_writer (const teca_cf_writer &src)=delete | |
| teca_cf_writer (teca_cf_writer &&src)=delete | |
| teca_cf_writer & | operator= (const teca_cf_writer &src)=delete |
| teca_cf_writer & | operator= (teca_cf_writer &&src)=delete |
| const char * | get_class_name () const override |
| void | set_file_name (const std::string &v) |
| const std::string & | get_file_name () const |
| void | set_date_format (const std::string &v) |
| const std::string & | get_date_format () const |
| void | set_first_step (const long &v) |
| const long & | get_first_step () const |
| void | set_last_step (const long &v) |
| const long & | get_last_step () const |
| void | set_steps_per_file (const unsigned int &v) |
| const unsigned int & | get_steps_per_file () const |
| void | set_mode_flags (const int &v) |
| const int & | get_mode_flags () const |
| void | set_use_unlimited_dim (const int &v) |
| const int & | get_use_unlimited_dim () const |
| void | set_compression_level (const int &v) |
| const int & | get_compression_level () const |
| void | set_flush_files (const int &v) |
| const int & | get_flush_files () const |
| size_t | get_number_of_point_arrays () |
| void | append_point_array (const std::string &v) |
| void | set_point_array (size_t i, const std::string &v) |
| void | set_point_arrays (const std::vector< std::string > &v) |
| void | set_point_arrays (const std::initializer_list< std::string > &&l) |
| void | set_point_arrays (const const_p_teca_variant_array &v) |
| const std::string & | get_point_array (size_t i) const |
| void | get_point_arrays (std::vector< std::string > &v) const |
| void | get_point_arrays (const p_teca_variant_array &v) const |
| void | clear_point_arrays () |
| size_t | get_number_of_information_arrays () |
| void | append_information_array (const std::string &v) |
| void | set_information_array (size_t i, const std::string &v) |
| void | set_information_arrays (const std::vector< std::string > &v) |
| void | set_information_arrays (const std::initializer_list< std::string > &&l) |
| void | set_information_arrays (const const_p_teca_variant_array &v) |
| const std::string & | get_information_array (size_t i) const |
| void | get_information_arrays (std::vector< std::string > &v) const |
| void | get_information_arrays (const p_teca_variant_array &v) const |
| void | clear_information_arrays () |
Public Member Functions inherited from teca_threaded_algorithm | |
| std::shared_ptr< teca_threaded_algorithm > | shared_from_this () |
| std::shared_ptr< teca_threaded_algorithm const > | shared_from_this () const |
| teca_threaded_algorithm (const teca_threaded_algorithm &src)=delete | |
| teca_threaded_algorithm (teca_threaded_algorithm &&src)=delete | |
| teca_threaded_algorithm & | operator= (const teca_threaded_algorithm &src)=delete |
| teca_threaded_algorithm & | operator= (teca_threaded_algorithm &&src)=delete |
| void | set_thread_pool_size (int n_threads) |
| unsigned int | get_thread_pool_size () const noexcept |
| void | set_verbose (const int &v) |
| const int & | get_verbose () const |
| void | set_bind_threads (const int &v) |
| const int & | get_bind_threads () const |
| void | set_stream_size (const int &v) |
| const int & | get_stream_size () const |
| void | set_poll_interval (const long long &v) |
| const long long & | get_poll_interval () const |
| void | set_data_request_queue (const p_teca_data_request_queue &queue) |
Public Member Functions inherited from teca_algorithm | |
| teca_algorithm (const teca_algorithm &src)=delete | |
| teca_algorithm (teca_algorithm &&src)=delete | |
| teca_algorithm & | operator= (const teca_algorithm &src)=delete |
| teca_algorithm & | operator= (teca_algorithm &&src)=delete |
| void | set_communicator (MPI_Comm comm) |
| MPI_Comm | get_communicator () |
| virtual teca_algorithm_output_port | get_output_port (unsigned int port=0) |
| void | set_input_connection (const teca_algorithm_output_port &port) |
| virtual void | set_input_connection (unsigned int id, const teca_algorithm_output_port &port) |
| virtual void | remove_input_connection (unsigned int id) |
| void | clear_input_connections () |
| const_p_teca_dataset | get_output_data (unsigned int port=0) |
| void | pop_cache (unsigned int port=0, int top=0) |
| void | set_cache_size (unsigned int n) |
| virtual int | update () |
| virtual int | update (unsigned int port) |
| virtual teca_metadata | update_metadata (unsigned int port=0) |
| void | set_executive (p_teca_algorithm_executive exe) |
| p_teca_algorithm_executive | get_executive () |
| virtual void | to_stream (std::ostream &s) const |
| virtual void | from_stream (std::istream &s) |
Static Public Member Functions | |
| static p_teca_cf_writer | New () |
Static Public Member Functions inherited from teca_threaded_algorithm | |
| static p_teca_threaded_algorithm | New () |
Additional Inherited Members | |
Protected Member Functions inherited from teca_threaded_algorithm | |
| const_p_teca_dataset | execute (unsigned int port, const std::vector< const_p_teca_dataset > &input_data, const teca_metadata &request) override |
| const_p_teca_dataset | request_data (teca_algorithm_output_port &port, const teca_metadata &request) override |
Protected Member Functions inherited from teca_algorithm | |
| void | set_number_of_input_connections (unsigned int n) |
| void | set_number_of_output_ports (unsigned int n) |
| virtual void | set_modified () |
| void | set_modified (unsigned int port) |
| virtual teca_metadata | get_cache_key (unsigned int port, const teca_metadata &request) const |
| virtual teca_metadata | get_output_metadata (teca_algorithm_output_port ¤t) |
| virtual int | validate_cache (teca_algorithm_output_port ¤t) |
| virtual void | clear_modified (teca_algorithm_output_port current) |
| const_p_teca_dataset | get_output_data (unsigned int port, const teca_metadata &request) |
| int | cache_output_data (unsigned int port, const teca_metadata &request, const_p_teca_dataset &data) |
| void | clear_cache (unsigned int port) |
| unsigned int | get_number_of_input_connections () |
| teca_algorithm_output_port & | get_input_connection (unsigned int i) |
| void | clear_modified (unsigned int port) |
| int | get_modified (unsigned int port) const |
Writes data to NetCDF CF2 format. This algorithm is conceptually an execution engine capable of driving the above pipeline with our without threads and stream results in the order that they are genreated placing them in the correct location in the output dataset. The output dataset is a collection of files each with a user specified number of time steps per file. The total number of time steps in the dataset is determined by the combination of the number of time steps in the input dataset and user defined subsetting if any. The writer uses MPI collective I/O to produce the files. In parallel time steps are mapped to ranks such that each rank has approximately the same number of time steps. Incoming steps are mapped to files. A given MPI rank may be writing to multiple files. The use of MPI collecitves implies care must be taken in its use to avoid deadlocks.
Due to the use of MPI collectives I/O certain information must be known during the report phase of pipeline execution, before the execute phase of pipeline execution begins. The information that is needed is:
number of time steps - specified by the pipeline control index_initializer key found in metadata produced by the source (eg CF reader)
extent - 6 64 bit integers defining the 3 spatial dimensions of each time step found in metadata produced by the source (eg CF reader)
point arrays - list of strings naming the point centered arrays that will be written. set by the user prior to execution by writer properties.
information arrays - list of strings naming the non-geometric arrays that will written. set by the user prior to execution by writer properties. See also size attribute below.
type_code - the teca_variant_array_code naming the type of erach array. this will be in the array attributes metadata generated by the producer of the array (eg any algorithm that adds an array should provide this metadata).
size - a 64 bit integer declaring the size of each information array. this will be in the array attributes metadata generated by the producer of the array (eg any algorithm that adds an array should provide this metadata).