19 #ifndef PISM_NC_SERIAL_H
20 #define PISM_NC_SERIAL_H
22 #include "pism/util/io/NCFile.hh"
52 void def_dim_impl(
const std::string &name,
size_t length)
const;
54 void inq_dimid_impl(
const std::string &dimension_name,
bool &exists)
const;
56 void inq_dimlen_impl(
const std::string &dimension_name,
unsigned int &result)
const;
61 virtual void def_var_impl(
const std::string &name,
io::Type nctype,
const std::vector<std::string> &dims)
const;
64 const std::vector<unsigned int> &start,
65 const std::vector<unsigned int> &
count,
69 const std::vector<unsigned int> &start,
70 const std::vector<unsigned int> &
count,
71 const double *op)
const;
74 const std::vector<unsigned int> &start,
75 const std::vector<unsigned int> &
count,
76 const std::vector<unsigned int> &imap,
81 void inq_vardimid_impl(
const std::string &variable_name, std::vector<std::string> &result)
const;
85 void inq_varid_impl(
const std::string &variable_name,
bool &exists)
const;
92 void get_att_double_impl(
const std::string &variable_name,
const std::string &att_name, std::vector<double> &result)
const;
94 void get_att_text_impl(
const std::string &variable_name,
const std::string &att_name, std::string &result)
const;
96 void put_att_double_impl(
const std::string &variable_name,
const std::string &att_name,
io::Type xtype,
const std::vector<double> &data)
const;
98 void put_att_text_impl(
const std::string &variable_name,
const std::string &att_name,
const std::string &value)
const;
100 void inq_attname_impl(
const std::string &variable_name,
unsigned int n, std::string &result)
const;
107 void del_att_impl(
const std::string &variable_name,
const std::string &att_name)
const;
111 int get_varid(
const std::string &variable_name)
const;
116 const std::vector<unsigned int> &start,
117 const std::vector<unsigned int> &
count,
118 const std::vector<unsigned int> &imap,
double *ip,
119 bool transposed)
const;
std::string filename() const
The PISM wrapper for a subset of the NetCDF C API.
void get_att_text_impl(const std::string &variable_name, const std::string &att_name, std::string &result) const
Gets a text attribute.
virtual void create_impl(const std::string &filename)
Create a NetCDF file.
void def_dim_impl(const std::string &name, size_t length) const
Define a dimension.
void inq_varname_impl(unsigned int j, std::string &result) const
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
void set_fill_impl(int fillmode, int &old_modep) const
Sets the fill mode.
std::string get_format() const
void enddef_impl() const
Exit define mode.
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
void inq_vardimid_impl(const std::string &variable_name, std::vector< std::string > &result) const
Get dimensions a variable depends on.
void put_att_text_impl(const std::string &variable_name, const std::string &att_name, const std::string &value) const
Writes a text attribute.
void get_att_double_impl(const std::string &variable_name, const std::string &att_name, std::vector< double > &result) const
Gets a double attribute.
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
void put_att_double_impl(const std::string &variable_name, const std::string &att_name, io::Type xtype, const std::vector< double > &data) const
Writes a double attribute.
void open_impl(const std::string &filename, io::Mode mode)
void inq_varnatts_impl(const std::string &variable_name, int &result) const
Get the number of attributes of a variable.
void inq_varid_impl(const std::string &variable_name, bool &exists) const
Finds a variable and sets the "exists" flag.
void inq_attname_impl(const std::string &variable_name, unsigned int n, std::string &result) const
Gets the name of a numbered attribute.
virtual void def_var_impl(const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const
Define a variable.
virtual void set_compression_level_impl(int level) const
void close_impl()
Close a NetCDF file.
void del_att_impl(const std::string &variable_name, const std::string &att_name) const
void inq_nvars_impl(int &result) const
Get the number of variables.
void get_var_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, bool transposed) const
Get variable data.
void inq_dimlen_impl(const std::string &dimension_name, unsigned int &result) const
Get a dimension length.
void redef_impl() const
Enter define mode.
void inq_dimid_impl(const std::string &dimension_name, bool &exists) const
int get_varid(const std::string &variable_name) const
void inq_unlimdim_impl(std::string &result) const
Get an unlimited dimension.
void inq_atttype_impl(const std::string &variable_name, const std::string &att_name, io::Type &result) const
Gets the type of an attribute.