netxsimdg
Loading...
Searching...
No Matches
Nextsim::IDevGridIO Class Referenceabstract

A class that deals with all the netCDF related parts of DevGrid. More...

#include <IDevGridIO.hpp>

Inheritance diagram for Nextsim::IDevGridIO:
Inheritance graph
Collaboration diagram for Nextsim::IDevGridIO:
Collaboration graph

Public Member Functions

 IDevGridIO (DevGrid &grid)
 
virtual ModelState getModelState (const std::string &filePath) const =0
 Generates the ModelState based on the data in the given file.
 
virtual void dumpModelState (const ModelState &state, const ModelMetadata &metadata, const std::string &filePath, bool isRestart) const =0
 Dumps the given ModelState to the given file path.
 

Protected Attributes

DevGridgrid
 

Detailed Description

A class that deals with all the netCDF related parts of DevGrid.

DevGrid is a module, and currently merely mentioning it in the code requires the cpp file to be linked. Since this would pull in the NetCDF libraries, the DevGrid::IDevGridIO interface was created to separate out all the code that actually uses the NetCDF libraries. See DevGridIO for the implementing class.

Definition at line 26 of file IDevGridIO.hpp.

Constructor & Destructor Documentation

◆ IDevGridIO()

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

Definition at line 28 of file IDevGridIO.hpp.

Member Function Documentation

◆ dumpModelState()

virtual void Nextsim::IDevGridIO::dumpModelState ( const ModelState & state,
const ModelMetadata & metadata,
const std::string & filePath,
bool isRestart ) const
pure virtual

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?

Implemented in Nextsim::DevGridIO.

Here is the caller graph for this function:

◆ getModelState()

virtual ModelState Nextsim::IDevGridIO::getModelState ( const std::string & filePath) const
pure virtual

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

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

Implemented in Nextsim::DevGridIO.

Here is the caller graph for this function:

Member Data Documentation

◆ grid

DevGrid* Nextsim::IDevGridIO::grid
protected

Definition at line 53 of file IDevGridIO.hpp.


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