Class ModelComponent¶
Defined in File ModelComponent.hpp
Inheritance Relationships¶
Derived Types¶
public Nextsim::CheckingModelComponent(Class CheckingModelComponent)public Nextsim::IDiagnosticOutput(Class IDiagnosticOutput)public Nextsim::IDynamics(Class IDynamics)public Nextsim::IFreezingPoint(Class IFreezingPoint)public Nextsim::Module1(Class Module1)public Nextsim::ModuleRequestAndSupply(Class ModuleRequestAndSupply)public Nextsim::ModuleSemiShared(Class ModuleSemiShared)public Nextsim::ModuleShared(Class ModuleShared)public Nextsim::ModuleSupplyAndWait(Class ModuleSupplyAndWait)
Class Documentation¶
-
class ModelComponent¶
A class encapsulating a component of the model. It also provide a method of communicating data between ModelComponents using enums, static arrays of pointers and the ModelArrayAccessor class.
Subclassed by Nextsim::CheckingModelComponent, Nextsim::IDiagnosticOutput, Nextsim::IDynamics, Nextsim::IFreezingPoint, Nextsim::Module1, Nextsim::ModuleRequestAndSupply, Nextsim::ModuleSemiShared, Nextsim::ModuleShared, Nextsim::ModuleSupplyAndWait
Public Functions
-
ModelComponent()¶
-
virtual ~ModelComponent() = default¶
-
virtual void setData(const ModelState::DataMap &state) = 0¶
Set the initial data of the component from the passed ModelState.
- Parameters:
state – The ModelState containing the data to be set.
-
inline virtual ModelState getStateDiagnostic() const¶
Returns all data and configuration from this component.
The state returned by this function contains all available data in this component and all components that it calls.
-
inline virtual ModelState getStateDiagnostic(const OutputLevel&) const¶
Returns a ModelState from this component at a specified level of detail.
See the zero argument version for more details. The output levels reuse those defined in the Logged class. The default level is NOTICE, and only levels such as INFO, DEBUG and TRACE should be used, and should provide extra diagnostic fields.
-
inline virtual ModelState getStatePrognostic() const¶
Returns the state of the ModelComponent.
Returns the state of the ModelComponent and any ModelComponents it depends on.
The state returned by this function contains all the data necessary to restart this component and all components that it calls.
Public Static Functions
-
static inline ModelArrayStore &getStore()¶
Returns the ModelArrayAccessor backing store for column physics fields.
Protected Functions
Protected Static Functions
-
static void setOceanMask(const ModelArray &mask)¶
Sets the model-wide land-ocean mask (for HField arrays).
- Parameters:
mask – The HField ModelArray containing the mask data. 0/false is land, >0 is sea.
-
static void noLandMask()¶
If there is no valid land mask, assume all points are ocean and initialize accordingly.
-
static ModelArray mask(const ModelArray &data, FloatType missingValue = MissingData::value())¶
Returns a copy of the provided ModelArray, masked according to the land-ocean mask.
- Parameters:
data – The data to be masked.
missingValue – The mask value to use (defaults to MissingData::value()).
-
static const ModelArray &oceanMask()¶
Returns the ocean mask.
-
static inline ModelArray &oceanMaskSingleton()¶
-
ModelComponent()¶