19 #include "pism/util/io/NC4_Serial.hh"
24 #define MPI_INCLUDED 1
28 #include "pism/util/error_handling.hh"
29 #include "pism/util/pism_utilities.hh"
36 if (return_code != NC_NOERR) {
50 stat = nc_create(fname.c_str(), NC_CLOBBER | NC_NETCDF4, &
m_file_id);
55 MPI_Bcast(&stat, 1, MPI_INT, 0,
m_com);
66 const std::vector<std::string> &dims)
const {
81 if (stat == NC_EINVAL) {
88 MPI_Bcast(&stat, 1, MPI_INT, 0,
m_com);
void create_impl(const std::string &filename)
Create a NetCDF file.
void set_compression_level_impl(int level) const
void def_var_impl(const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const
Define a variable.
virtual void def_var_impl(const std::string &name, io::Type nctype, const std::vector< std::string > &dims) const
Define a variable.
int get_varid(const std::string &variable_name) const
#define PISM_ERROR_LOCATION
static void check(const ErrorLocation &where, int return_code)
Prints an error message; for debugging.