|
PISM, A Parallel Ice Sheet Model 2.2.2-d6b3a29ca committed by Constantine Khrulev on 2025-03-28
|
High-level PISM I/O class. More...
#include <File.hh>
Classes | |
| struct | Impl |
Public Member Functions | |
| File (MPI_Comm com, const std::string &filename, io::Backend backend, io::Mode mode) | |
| ~File () | |
| MPI_Comm | com () const |
| void | close () |
| void | redef () const |
| void | enddef () const |
| void | sync () const |
| std::string | name () const |
| unsigned int | nrecords () const |
| Get the number of records. Uses the length of an unlimited dimension. | |
| unsigned int | nrecords (const std::string &name, const std::string &std_name, units::System::Ptr unit_system) const |
| Get the number of records of a certain variable. Uses the length of an associated "time" dimension. | |
| unsigned int | nvariables () const |
| unsigned int | nattributes (const std::string &var_name) const |
| void | define_dimension (const std::string &name, size_t length) const |
| unsigned int | dimension_length (const std::string &name) const |
| Get the length of a dimension. | |
| std::vector< std::string > | dimensions (const std::string &variable_name) const |
| bool | dimension_exists (const std::string &name) const |
| Checks if a dimension exists. | |
| AxisType | dimension_type (const std::string &name, units::System::Ptr unit_system) const |
| Get the "type" of a dimension. | |
| std::string | variable_name (unsigned int id) const |
| void | define_variable (const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const |
| Define a variable. | |
| VariableLookupData | find_variable (const std::string &short_name, const std::string &std_name) const |
| Find a variable using its standard name and/or short name. | |
| bool | variable_exists (const std::string &short_name) const |
| Checks if a variable exists. | |
| void | read_variable (const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, double *ip) const |
| void | write_variable (const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, const double *op) const |
| void | set_variable_was_written (const std::string &name) const |
| bool | get_variable_was_written (const std::string &name) const |
| void | write_distributed_array (const std::string &variable_name, const Grid &grid, unsigned int z_count, bool time_dependent, const double *input) const |
| void | set_compression_level (int level) const |
| void | remove_attribute (const std::string &variable_name, const std::string &att_name) const |
| std::string | attribute_name (const std::string &var_name, unsigned int n) const |
| io::Type | attribute_type (const std::string &var_name, const std::string &att_name) const |
| void | write_attribute (const std::string &var_name, const std::string &att_name, io::Type nctype, const std::vector< double > &values) const |
| Write a multiple-valued double attribute. | |
| void | write_attribute (const std::string &var_name, const std::string &att_name, const std::string &value) const |
| Write a text attribute. | |
| std::vector< double > | read_double_attribute (const std::string &var_name, const std::string &att_name) const |
| Get a double attribute. | |
| std::string | read_text_attribute (const std::string &var_name, const std::string &att_name) const |
| Get a text attribute. | |
| void | append_history (const std::string &history) const |
| Append to the history global attribute. | |
Private Member Functions | |
| void | open (const std::string &filename, io::Mode mode) |
| File (const File &other) | |
| File & | operator= (const File &) |
Private Attributes | |
| Impl * | m_impl |
High-level PISM I/O class.
Hides the low-level NetCDF wrapper.