39 const static std::string structureName;
48 const ModelState& state,
const ModelMetadata& metadata,
const std::string& filePath,
bool isRestart =
false)
const override
53 const std::string&
structureType()
const override {
return structureName; };
60 const static std::string xDimName;
61 const static std::string yDimName;
62 const static std::string nIceLayersName;
A class to hold a grid of ElementData instances in a fixed sized square grid.
int nIceLayers() const override
The number of ice layers in this data structure.
void dumpModelState(const ModelState &state, const ModelMetadata &metadata, const std::string &filePath, bool isRestart=false) const override
Dumps the data to a file path.
void setIO(IDevGridIO *p)
Sets the pointer to the class that will perform the IO. Should be an instance of DevGridIO.
const std::string & structureType() const override
Returns the structure name that this class will process.
ModelState getModelState(const std::string &filePath) override
Dumps the data to a file path.
virtual ~DevGrid()
Destructor. The lifetime of pio should be the lifetime of the instance.
A class to implemented the actual IO for DevGrid, isolating the NetCDF libraries from the rest of the...
A class that deals with all the netCDF related parts of DevGrid.
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.
Interface class for the model structure.