File netcdf_writer.hpp
File List > include > multigrid > netcdf_writer.hpp
Go to the documentation of this file
#pragma once
#include <memory>
#include <string>
namespace mgrid {
class Field2D;
class NcWriter {
public:
NcWriter(const std::string &path, int nx, int nz, double hx, double hz);
~NcWriter();
NcWriter(const NcWriter &) = delete;
NcWriter &operator=(const NcWriter &) = delete;
void add_variable(const std::string &name, const Field2D &field);
void add_attribute(const std::string &name, double value);
private:
struct Impl;
std::unique_ptr<Impl> impl_;
};
} // namespace mgrid