File options_netcdf.hxx


namespace bout

SNB model

namespace experimental
class OptionsNetCDF

Public Types

enum FileMode



Overwrite file when writing.


Append to file when writing.

Public Functions

OptionsNetCDF(std::string filename, FileMode mode = FileMode::replace)
Options read()

Read options from file.

void write(const Options &options)

Write options to file.

Private Members

std::string filename
FileMode file_mode
std::map<int, size_t> time_index

NetCDF doesn’t seem to keep track of the current index for each variable. This map keeps track of the current index being written for each time dimension