netxsimdg
|
#include <ParaGridIO.hpp>
Public Member Functions | |
ParaGridIO (ParametricGrid &grid) | |
ModelState | getModelState (const std::string &filePath) override |
void | dumpModelState (const ModelState &state, const ModelMetadata &meta, const std::string &filePath) override |
Writes the ModelState to a given file location from the provided model data and metadata. | |
ModelState | readForcingTime (const std::set< std::string > &forcings, const TimePoint &time, const std::string &filePath) override |
Reads forcings from a ParameticGrid flavoured file. | |
void | writeDiagnosticTime (const ModelState &state, const ModelMetadata &meta, const std::string &filePath) override |
Writes diagnostic data to a file. | |
Public Member Functions inherited from Nextsim::ParametricGrid::IParaGridIO | |
IParaGridIO (ParametricGrid &grid) | |
Static Public Member Functions | |
static void | close (const std::string &filePath) |
static ModelState | readForcingTimeStatic (const std::set< std::string > &forcings, const TimePoint &time, const std::string &filePath) |
A class to perform input and output for the ParametricGrid class. unlike the other GridIO classes, this will hold non-restart files open to accumulate data until closed using the close function.
Definition at line 24 of file ParaGridIO.hpp.
|
inline |
Definition at line 26 of file ParaGridIO.hpp.
|
static |
Closes an open diagnostic file. Does nothing when provided with a restart file name.
filePath | The path to the file to be closed. |
Definition at line 365 of file ParaGridIO.cpp.
|
overridevirtual |
Writes the ModelState to a given file location from the provided model data and metadata.
@params state The model state and configuration object. @params metadata The model metadata (principally the initial file creation model time). @params filePath The path for the restart file.
Implements Nextsim::ParametricGrid::IParaGridIO.
Definition at line 182 of file ParaGridIO.cpp.
|
overridevirtual |
Retrieves the ModelState from a restart file of the parametric_grid type.
filePath | The file path containing the file to be read. |
Implements Nextsim::ParametricGrid::IParaGridIO.
Definition at line 70 of file ParaGridIO.cpp.
|
inlineoverridevirtual |
Reads forcings from a ParameticGrid flavoured file.
forcings | The names of the forcings required. |
time | The time for which to get the forcings. |
filePath | Path to the file to read. |
Implements Nextsim::ParametricGrid::IParaGridIO.
Definition at line 59 of file ParaGridIO.hpp.
|
static |
Definition at line 131 of file ParaGridIO.cpp.
|
overridevirtual |
Writes diagnostic data to a file.
state | The state to write to the file. |
time | The time of the passed data. |
filePath | Path of the file to write to. |
Implements Nextsim::ParametricGrid::IParaGridIO.
Definition at line 237 of file ParaGridIO.cpp.