61 typedef std::shared_ptr<NCFile>
Ptr;
81 void def_dim(
const std::string &name,
size_t length)
const;
83 void inq_dimid(
const std::string &dimension_name,
bool &exists)
const;
85 void inq_dimlen(
const std::string &dimension_name,
unsigned int &result)
const;
91 const std::vector<std::string> &dims)
const;
93 void def_var_chunking(
const std::string &name, std::vector<size_t> &dimensions)
const;
95 void get_vara_double(
const std::string &variable_name,
const std::vector<unsigned int> &start,
96 const std::vector<unsigned int> &
count,
double *ip)
const;
98 void put_vara_double(
const std::string &variable_name,
const std::vector<unsigned int> &start,
99 const std::vector<unsigned int> &
count,
const double *op)
const;
101 void write_darray(
const std::string &variable_name,
const Grid &grid,
unsigned int z_count,
102 bool time_dependent,
unsigned int record,
const double *input);
104 void get_varm_double(
const std::string &variable_name,
const std::vector<unsigned int> &start,
105 const std::vector<unsigned int> &
count,
106 const std::vector<unsigned int> &imap,
double *ip)
const;
110 void inq_vardimid(
const std::string &variable_name, std::vector<std::string> &result)
const;
112 void inq_varnatts(
const std::string &variable_name,
int &result)
const;
114 void inq_varid(
const std::string &variable_name,
bool &result)
const;
116 void inq_varname(
unsigned int j, std::string &result)
const;
121 void get_att_double(
const std::string &variable_name,
const std::string &att_name,
122 std::vector<double> &result)
const;
124 void get_att_text(
const std::string &variable_name,
const std::string &att_name,
125 std::string &result)
const;
128 const std::vector<double> &data)
const;
130 void put_att_text(
const std::string &variable_name,
const std::string &att_name,
131 const std::string &value)
const;
133 void inq_attname(
const std::string &variable_name,
unsigned int n, std::string &result)
const;
135 void inq_atttype(
const std::string &variable_name,
const std::string &att_name,
139 void set_fill(
int fillmode,
int &old_modep)
const;
143 void del_att(
const std::string &variable_name,
const std::string &att_name)
const;
160 virtual void def_dim_impl(
const std::string &name,
size_t length)
const = 0;
162 virtual void inq_dimid_impl(
const std::string &dimension_name,
bool &exists)
const = 0;
164 virtual void inq_dimlen_impl(
const std::string &dimension_name,
unsigned int &result)
const = 0;
170 const std::vector<std::string> &dims)
const = 0;
173 std::vector<size_t> &dimensions)
const;
176 const std::vector<unsigned int> &start,
177 const std::vector<unsigned int> &
count,
double *ip)
const = 0;
180 const std::vector<unsigned int> &start,
181 const std::vector<unsigned int> &
count,
182 const double *op)
const = 0;
185 unsigned int z_count,
bool time_dependent,
unsigned int record,
186 const double *input);
189 const std::vector<unsigned int> &start,
190 const std::vector<unsigned int> &
count,
191 const std::vector<unsigned int> &imap,
double *ip)
const = 0;
196 std::vector<std::string> &result)
const = 0;
200 virtual void inq_varid_impl(
const std::string &variable_name,
bool &exists)
const = 0;
208 std::vector<double> &result)
const = 0;
211 std::string &result)
const = 0;
214 io::Type xtype,
const std::vector<double> &data)
const = 0;
217 const std::string &value)
const = 0;
220 std::string &result)
const = 0;
222 virtual void inq_atttype_impl(
const std::string &variable_name,
const std::string &att_name,
228 virtual void del_att_impl(
const std::string &variable_name,
const std::string &att_name)
const = 0;
Describes the PISM grid and the distribution of data across processors.
void inq_varname(unsigned int j, std::string &result) const
virtual void enddef_impl() const =0
void inq_atttype(const std::string &variable_name, const std::string &att_name, io::Type &result) const
virtual void put_vara_double_impl(const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, const double *op) const =0
virtual void inq_attname_impl(const std::string &variable_name, unsigned int n, std::string &result) const =0
void inq_attname(const std::string &variable_name, unsigned int n, std::string &result) const
virtual void create_impl(const std::string &filename)=0
virtual void inq_dimlen_impl(const std::string &dimension_name, unsigned int &result) const =0
void del_att(const std::string &variable_name, const std::string &att_name) const
void get_vara_double(const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, double *ip) const
virtual void close_impl()=0
virtual void put_att_text_impl(const std::string &variable_name, const std::string &att_name, const std::string &value) const =0
void inq_unlimdim(std::string &result) const
virtual void del_att_impl(const std::string &variable_name, const std::string &att_name) const =0
virtual void inq_atttype_impl(const std::string &variable_name, const std::string &att_name, io::Type &result) const =0
void create(const std::string &filename)
void get_att_text(const std::string &variable_name, const std::string &att_name, std::string &result) const
void put_att_double(const std::string &variable_name, const std::string &att_name, io::Type xtype, const std::vector< double > &data) const
virtual void open_impl(const std::string &filename, io::Mode mode)=0
void get_att_double(const std::string &variable_name, const std::string &att_name, std::vector< double > &result) const
void inq_dimlen(const std::string &dimension_name, unsigned int &result) const
void def_dim(const std::string &name, size_t length) const
void put_vara_double(const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, const double *op) const
virtual void get_varm_double_impl(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 =0
void set_compression_level(int level) const
virtual void get_vara_double_impl(const std::string &variable_name, const std::vector< unsigned int > &start, const std::vector< unsigned int > &count, double *ip) const =0
virtual ~NCFile()=default
virtual void inq_varname_impl(unsigned int j, std::string &result) const =0
virtual void set_compression_level_impl(int level) const =0
std::shared_ptr< NCFile > Ptr
void write_darray(const std::string &variable_name, const Grid &grid, unsigned int z_count, bool time_dependent, unsigned int record, const double *input)
virtual void def_dim_impl(const std::string &name, size_t length) const =0
void open(const std::string &filename, io::Mode mode)
virtual void inq_vardimid_impl(const std::string &variable_name, std::vector< std::string > &result) const =0
void set_fill(int fillmode, int &old_modep) const
virtual void inq_varnatts_impl(const std::string &variable_name, int &result) const =0
virtual void inq_dimid_impl(const std::string &dimension_name, bool &exists) const =0
void def_var_chunking(const std::string &name, std::vector< size_t > &dimensions) const
void get_varm_double(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
virtual void get_att_double_impl(const std::string &variable_name, const std::string &att_name, std::vector< double > &result) const =0
virtual void inq_unlimdim_impl(std::string &result) const =0
virtual void set_fill_impl(int fillmode, int &old_modep) const =0
virtual void write_darray_impl(const std::string &variable_name, const Grid &grid, unsigned int z_count, bool time_dependent, unsigned int record, const double *input)
void inq_dimid(const std::string &dimension_name, bool &exists) const
virtual void sync_impl() const =0
std::string filename() const
virtual void def_var_impl(const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const =0
void inq_nvars(int &result) const
virtual void redef_impl() const =0
virtual void def_var_chunking_impl(const std::string &name, std::vector< size_t > &dimensions) const
virtual void put_att_double_impl(const std::string &variable_name, const std::string &att_name, io::Type xtype, const std::vector< double > &data) const =0
virtual void get_att_text_impl(const std::string &variable_name, const std::string &att_name, std::string &result) const =0
virtual void inq_varid_impl(const std::string &variable_name, bool &exists) const =0
void put_att_text(const std::string &variable_name, const std::string &att_name, const std::string &value) const
void inq_vardimid(const std::string &variable_name, std::vector< std::string > &result) const
void inq_varnatts(const std::string &variable_name, int &result) const
void inq_varid(const std::string &variable_name, bool &result) const
virtual void inq_nvars_impl(int &result) const =0
void def_var(const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const
The PISM wrapper for a subset of the NetCDF C API.