Puts data on disk using NetCDF CF2 conventions.
More...
#include <teca_cf_layout_manager.h>
|
| int | create (const std::string &file_name, const std::string &date_format, const teca_metadata &md_in, int mode_flags, int use_unlimited_dim) |
| | creates the NetCDF file. This is an MPI collective call. More...
|
| |
| int | define (const teca_metadata &md, unsigned long *whole_extent, const std::vector< std::string > &point_arrays, const std::vector< std::string > &info_arrays, int collective_buffer, int compression_level, bool move_vars_to_root) |
| |
| int | write (long index, const const_p_teca_array_collection &point_arrays, const const_p_teca_array_collection &info_arrays) |
| | writes the collection of arrays to the NetCDF file in the correct spot. More...
|
| |
| int | write (const unsigned long extent[6], const unsigned long temporal_extent[2], const const_p_teca_array_collection &point_arrays, const const_p_teca_array_collection &info_arrays) |
| |
|
int | close () |
| |
|
bool | opened () |
| |
|
bool | defined () |
| |
|
bool | completed () |
| |
|
int | flush () |
| |
|
int | to_stream (std::ostream &os) |
| |
|
|
static p_teca_cf_layout_manager | New (MPI_Comm comm, long file_id, long first_index, long n_indices) |
| |
|
|
MPI_Comm | comm |
| |
|
long | file_id |
| |
|
std::string | file_name |
| |
|
teca_netcdf_util::netcdf_handle | handle |
| |
|
long | first_index |
| |
|
long | n_indices |
| |
|
long | n_written |
| |
|
int | mode_flags |
| |
|
int | use_unlimited_dim |
| |
|
int | n_dims |
| |
|
size_t | dims [4] |
| |
|
int | mesh_axis [4] |
| |
|
unsigned long | whole_extent [6] |
| |
|
std::map< std::string, var_def_t > | var_def |
| |
|
std::string | t_variable |
| |
|
p_teca_variant_array | t |
| |
Puts data on disk using NetCDF CF2 conventions.
◆ create()
| int teca_cf_layout_manager::create |
( |
const std::string & |
file_name, |
|
|
const std::string & |
date_format, |
|
|
const teca_metadata & |
md_in, |
|
|
int |
mode_flags, |
|
|
int |
use_unlimited_dim |
|
) |
| |
creates the NetCDF file. This is an MPI collective call.
◆ define()
| int teca_cf_layout_manager::define |
( |
const teca_metadata & |
md, |
|
|
unsigned long * |
whole_extent, |
|
|
const std::vector< std::string > & |
point_arrays, |
|
|
const std::vector< std::string > & |
info_arrays, |
|
|
int |
collective_buffer, |
|
|
int |
compression_level, |
|
|
bool |
move_vars_to_root |
|
) |
| |
defines the NetCDF file layout. This is an MPI collective call. The metadata object must contain global view of coordinates, whole_extent, and for each array to be written there must be type code in the corresponding array attributes.
- Parameters
-
| [in] | md | a metadata object compatible with that provided by the teca_cf_reader |
| [in] | whole_extent | the extent of data that will be written to disk, including runtime specified subsetting. |
| [in] | point_arrays | a list of point centered array names to write |
| [in] | info_arrays | a list of point centered array names to write |
| [in] | collective_buffer | set to zero to disable collective buffering |
| [in] | compression_level | set greater than 1 to enable compression. this is incomatible with MPI parallel I/O and cannot be used in a parallel setting. |
| [in] | move_vars_to_root | move variable in groups to root of file (and do not create groups) |
- Returns
- zero if successful
◆ write() [1/2]
| int teca_cf_layout_manager::write |
( |
const unsigned long |
extent[6], |
|
|
const unsigned long |
temporal_extent[2], |
|
|
const const_p_teca_array_collection & |
point_arrays, |
|
|
const const_p_teca_array_collection & |
info_arrays |
|
) |
| |
Writes the collection of arrays defined over a spatio-temporal extent to the NetCDF file in the correct location in the file.
- Parameters
-
| [in] | extent | the spatial extent of the arrays |
| [in] | temporal_extent | the temporal extent of the arrays |
| [in] | point_arrays | a collection of point centered data arrays to write |
| [in] | info_arrays | a collection of non-geometrically oriented arrays to write |
- Returns
- zero if successful
◆ write() [2/2]
| int teca_cf_layout_manager::write |
( |
long |
index, |
|
|
const const_p_teca_array_collection & |
point_arrays, |
|
|
const const_p_teca_array_collection & |
info_arrays |
|
) |
| |
writes the collection of arrays to the NetCDF file in the correct spot.
The documentation for this class was generated from the following file: