netxsimdg
Loading...
Searching...
No Matches
Nextsim::DevGridIO Class Reference

A class to implemented the actual IO for DevGrid, isolating the NetCDF libraries from the rest of the code. More...

#include <DevGridIO.hpp>

Inheritance diagram for Nextsim::DevGridIO:
Inheritance graph
Collaboration diagram for Nextsim::DevGridIO:
Collaboration graph

Public Member Functions

 DevGridIO (DevGrid &grid)
 
ModelState getModelState (const std::string &filePath) const override
 Generates the ModelState based on the data in the given file.
 
void dumpModelState (const ModelState &state, const ModelMetadata &metadata, const std::string &filePath, bool isRestart) const override
 Dumps the given ModelState to the given file path.
 
- Public Member Functions inherited from Nextsim::IDevGridIO
 IDevGridIO (DevGrid &grid)
 

Additional Inherited Members

- Protected Attributes inherited from Nextsim::IDevGridIO
DevGridgrid
 

Detailed Description

A class to implemented the actual IO for DevGrid, isolating the NetCDF libraries from the rest of the code.

Definition at line 21 of file DevGridIO.hpp.

Constructor & Destructor Documentation

◆ DevGridIO()

Nextsim::DevGridIO::DevGridIO ( DevGrid & grid)
inline

Definition at line 23 of file DevGridIO.hpp.

Member Function Documentation

◆ dumpModelState()

void Nextsim::DevGridIO::dumpModelState ( const ModelState & state,
const ModelMetadata & metadata,
const std::string & filePath,
bool isRestart ) const
overridevirtual

Dumps the given ModelState to the given file path.

Parameters
stateThe ModelState data
filePathThe path to attempt to write the data to.
isRestartShould this file be written as a restart file or a diagnostic dump?

Implements Nextsim::IDevGridIO.

Definition at line 154 of file DevGridIO.cpp.

Here is the call graph for this function:

◆ getModelState()

ModelState Nextsim::DevGridIO::getModelState ( const std::string & filePath) const
overridevirtual

Generates the ModelState based on the data in the given file.

Parameters
filePathThe location of the NetCDF restart file to be read.

Implements Nextsim::IDevGridIO.

Definition at line 109 of file DevGridIO.cpp.


The documentation for this class was generated from the following files: