PISM, A Parallel Ice Sheet Model
stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
|
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, int iosysid=-1) | |
~File () | |
io::Backend | backend () const |
MPI_Comm | com () const |
void | close () |
void | redef () const |
void | enddef () const |
void | sync () const |
std::string | filename () const |
unsigned int | nrecords () const |
Get the number of records. Uses the length of an unlimited dimension. More... | |
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. More... | |
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. More... | |
std::vector< std::string > | dimensions (const std::string &variable_name) const |
bool | find_dimension (const std::string &name) const |
Checks if a dimension exists. More... | |
AxisType | dimension_type (const std::string &name, units::System::Ptr unit_system) const |
Get the "type" of a dimension. More... | |
std::vector< double > | read_dimension (const std::string &name) const |
Get dimension data (a coordinate variable). More... | |
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. More... | |
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. More... | |
bool | find_variable (const std::string &short_name) const |
Checks if a variable exists. More... | |
void | read_variable (const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, double *ip) const |
void | read_variable_transposed (const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, const std::vector< unsigned int > &imap, 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 | 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. More... | |
void | write_attribute (const std::string &var_name, const std::string &att_name, const std::string &value) const |
Write a text attribute. More... | |
std::vector< double > | read_double_attribute (const std::string &var_name, const std::string &att_name) const |
Get a double attribute. More... | |
std::string | read_text_attribute (const std::string &var_name, const std::string &att_name) const |
Get a text attribute. More... | |
void | append_history (const std::string &history) const |
Append to the history global attribute. More... | |
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.