File options_netcdf.hxx

Defines

__OPTIONS_NETCDF_H__
namespace bout

SNB model

namespace experimental
class OptionsNetCDF

Public Types

enum FileMode

Values:

replace

Overwrite file when writing.

append

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