4 #include "pism/icebin/VecBundleWriter.hh"
6 #include "pism/util/ConfigInterface.hh"
7 #include "pism/util/Context.hh"
8 #include "pism/util/Grid.hh"
9 #include "pism/util/array/Array.hh"
10 #include "pism/util/io/File.hh"
11 #include "pism/util/io/IO_Flags.hh"
12 #include "pism/util/io/io_helpers.hh"
13 #include "pism/util/Time.hh"
21 std::vector<pism::array::Array const *> &_vecs)
22 : m_grid(_grid), fname(_fname), vecs(_vecs) {
31 m_grid->ctx()->time()->calendar(),
m_grid->ctx()->time()->units_string(),
32 m_grid->ctx()->unit_system());
34 for (
const auto *vec :
vecs) {
47 for (
const auto *vec :
vecs) {
High-level PISM I/O class.
void write(double time_s)
std::shared_ptr< const pism::Grid > m_grid
VecBundleWriter(std::shared_ptr< pism::Grid > grid, std::string const &_fname, std::vector< pism::array::Array const * > &_vecs)
std::vector< pism::array::Array const * > vecs
void append_time(const File &file, const Config &config, double time_seconds)
Prepare a file for output.
@ PISM_READWRITE_MOVE
create a file for writing, move foo.nc to foo.nc~ if present
@ PISM_READWRITE
open an existing file for reading and writing
void define_time(const File &file, const Context &ctx)
Prepare a file for output.
io::Backend string_to_backend(const std::string &backend)