19 #ifndef _PISM_FILE_ACCESS_H_
20 #define _PISM_FILE_ACCESS_H_
26 #include "pism/util/Units.hh"
78 unsigned int nrecords(
const std::string &name,
const std::string &std_name,
83 unsigned int nattributes(
const std::string &var_name)
const;
105 const std::vector<std::string> &dims)
const;
112 const std::vector<unsigned int> &start,
113 const std::vector<unsigned int> &
count,
117 const std::vector<unsigned int> &start,
118 const std::vector<unsigned int> &
count,
119 const std::vector<unsigned int> &imap,
double *ip)
const;
122 const std::vector<unsigned int> &start,
123 const std::vector<unsigned int> &
count,
124 const double *op)
const;
128 unsigned int z_count,
130 const double *input)
const;
138 std::string
attribute_name(
const std::string &var_name,
unsigned int n)
const;
142 void write_attribute(
const std::string &var_name,
const std::string &att_name,
143 io::Type nctype,
const std::vector<double> &values)
const;
145 void write_attribute(
const std::string &var_name,
const std::string &att_name,
146 const std::string &value)
const;
149 const std::string &att_name)
const;
151 std::string
read_text_attribute(
const std::string &var_name,
const std::string &att_name)
const;
bool find_dimension(const std::string &name) const
Checks if a dimension exists.
unsigned int nvariables() 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 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
io::Backend backend() const
void define_dimension(const std::string &name, size_t length) const
std::string attribute_name(const std::string &var_name, unsigned int n) const
AxisType dimension_type(const std::string &name, units::System::Ptr unit_system) const
Get the "type" of a dimension.
void set_compression_level(int level) const
void open(const std::string &filename, io::Mode mode)
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.
unsigned int nrecords() const
Get the number of records. Uses the length of an unlimited dimension.
std::string variable_name(unsigned int id) const
std::string filename() 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 define_variable(const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const
Define a variable.
io::Type attribute_type(const std::string &var_name, const std::string &att_name) const
void remove_attribute(const std::string &variable_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.
std::vector< double > read_double_attribute(const std::string &var_name, const std::string &att_name) const
Get a double attribute.
unsigned int nattributes(const std::string &var_name) const
void append_history(const std::string &history) const
Append to the history global attribute.
unsigned int dimension_length(const std::string &name) const
Get the length of a dimension.
std::vector< double > read_dimension(const std::string &name) const
Get dimension data (a coordinate variable).
std::vector< std::string > dimensions(const std::string &variable_name) const
std::string read_text_attribute(const std::string &var_name, const std::string &att_name) const
Get a text attribute.
File & operator=(const File &)
File(MPI_Comm com, const std::string &filename, io::Backend backend, io::Mode mode, int iosysid=-1)
High-level PISM I/O class.
Describes the PISM grid and the distribution of data across processors.
std::shared_ptr< System > Ptr
io::Backend string_to_backend(const std::string &backend)
bool found_using_standard_name