GCBM
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MossTurnoverModule Class Reference

#include <mossturnovermodule.h>

Inheritance diagram for MossTurnoverModule:
Inheritance graph
Collaboration diagram for MossTurnoverModule:
Collaboration graph

Public Member Functions

 MossTurnoverModule ()
 
virtual ~MossTurnoverModule ()=default
 
void configure (const DynamicObject &config) override
 
void subscribe (NotificationCenter &notificationCenter) override
 
flint::ModuleTypes moduleType () override
 
void doLocalDomainInit () override
 
void doTimingInit () override
 
void doTimingStep () override
 
- Public Member Functions inherited from CBMModuleBase
virtual ~CBMModuleBase ()=default
 
void onSystemInit () override
 
void onSystemShutdown () override
 
void onLocalDomainInit () override
 
void onLocalDomainShutdown () override
 
void onLocalDomainProcessingUnitInit () override
 
void onLocalDomainProcessingUnitShutdown () override
 
void onPreTimingSequence () override
 
void onTimingInit () override
 
void onTimingPrePostInit () override
 
void onTimingPostInit () override
 
void onTimingPostInit2 () override
 
void onTimingShutdown () override
 
void onTimingStep () override
 
void onTimingPreEndStep () override
 
void onTimingEndStep () override
 
void onTimingPostStep () override
 
void onOutputStep () override
 
void onPrePostDisturbanceEvent () override
 
void onPostDisturbanceEvent () override
 
void onPostDisturbanceEvent2 () override
 
void onError (std::string msg) override
 
void onDisturbanceEvent (DynamicVar e) override
 
void onPostNotification (short preMessageSignal) override
 
virtual void doSystemInit ()
 
virtual void doSystemShutdown ()
 
virtual void doLocalDomainShutdown ()
 
virtual void doLocalDomainProcessingUnitInit ()
 
virtual void doLocalDomainProcessingUnitShutdown ()
 
virtual void doPreTimingSequence ()
 
virtual void doTimingPrePostInit ()
 
virtual void doTimingPostInit ()
 
virtual void doTimingPostInit2 ()
 
virtual void doTimingShutdown ()
 
virtual void doTimingPreEndStep ()
 
virtual void doTimingEndStep ()
 
virtual void doTimingPostStep ()
 
virtual void doOutputStep ()
 
virtual void doError (std::string msg)
 
virtual void doDisturbanceEvent (DynamicVar)
 
virtual void doPrePostDisturbanceEvent ()
 
virtual void doPostDisturbanceEvent ()
 
virtual void doPostDisturbanceEvent2 ()
 
virtual void doPostNotification (short preMessageSignal)
 

Private Member Functions

void doLiveMossTurnover ()
 

Private Attributes

flint::IVariable * _mossParameters = nullptr
 
const flint::IPool * _featherMossLive = nullptr
 
const flint::IPool * _sphagnumMossLive = nullptr
 
const flint::IPool * _featherMossFast = nullptr
 
const flint::IPool * _sphagnumMossFast = nullptr
 
flint::IVariable * _regenDelay = nullptr
 
bool runMoss { false }
 
double fmlTurnoverRate { 0 }
 Feather moss turnover rate
More...
 
double smlTurnoverRate { 0 }
 Sphagnum moss turnover rate
More...
 

Constructor & Destructor Documentation

◆ MossTurnoverModule()

Constructor

◆ ~MossTurnoverModule()

virtual ~MossTurnoverModule ( )
virtualdefault

Member Function Documentation

◆ configure()

void configure ( const DynamicObject &  config)
override

Configuration function

Parameters
configconst DynamicObject&
Returns
void

◆ doLiveMossTurnover()

void doLiveMossTurnover ( )
private

Perform moss turnover between the moss live and fast pools

Invoke createStockOperation() on _landUnitData
Add a FeatherMossLive to FeatherMossFast transfer between source MossTurnoverModule._featherMossLive and sink MossTurnoverModule._featherMossFast with transfer value of MossTurnoverModule._featherMossLive * MossTurnoverModule.fmlTurnoverRate, a SphagnumMossLive to SphagnumMossFast transfer between source MossTurnoverModule._sphagnumMossLive and sink MossTurnoverModule._sphagnumMossFast with transfer value of MossTurnoverModule._sphagnumMossLive * MossTurnoverModule.smlTurnoverRate
Invoke submitOperation() on _landUnitData to submit the transfers

Returns
void

◆ doLocalDomainInit()

void doLocalDomainInit ( )
overridevirtual

Initialise MossTurnoverModule._featherMossFast, MossTurnoverModule._sphagnumMossFast, MossTurnoverModule._featherMossSlow, MossTurnoverModule._sphagnumMossSlow, value of "FeatherMossFast", SphagnumMossFast", "FeatherMossSlow", "SphagnumMossSlow" in _landUnitData \n Initialise MossTurnoverModule._mossParameters, MossTurnoverModule._regenDelay as variable "moss_parameters", "regen_delay" in _landUnitData, \n MossTurnoverModule.fmlTurnoverRate, MossTurnoverModule.smlTurnoverRate values of "fmlTurnoverRate", "smlTurnoverRate"in MossTurnoverModule._mossParameters

Returns
void

Reimplemented from CBMModuleBase.

◆ doTimingInit()

void doTimingInit ( )
overridevirtual

If variable "enable_moss" exists in _landUnitData and it has a value, invoke Helper.runMoss() with arguments as value of variables "growth_curve_id", "moss_leading_species" and "leading_species" in _landUnitData
Assign MossTurnoverModule.runMoss to true if variable "peatland_class" in _landUnitData is empty, variable "growth_curve_id" in _landUnitData is not empty, and Helper.runMoss() returns true

Returns
void

Reimplemented from CBMModuleBase.

◆ doTimingStep()

void doTimingStep ( )
overridevirtual

If value of MossTurnoverModule._regenDelay > 0, return
If MossTurnoverModule.runMoss is true, invoke MossTurnoverModule.doLiveMossTurnover()

Returns
void

Reimplemented from CBMModuleBase.

◆ moduleType()

flint::ModuleTypes moduleType ( )
override

◆ subscribe()

void subscribe ( NotificationCenter &  notificationCenter)
override

Subscribe to the signals LocalDomainInit, TimingInit and TimingStep

Parameters
notificationCenterNotificationCenter&
Returns
void

Member Data Documentation

◆ _featherMossFast

const flint::IPool* _featherMossFast = nullptr
private

◆ _featherMossLive

const flint::IPool* _featherMossLive = nullptr
private

◆ _mossParameters

flint::IVariable* _mossParameters = nullptr
private

◆ _regenDelay

flint::IVariable* _regenDelay = nullptr
private

◆ _sphagnumMossFast

const flint::IPool* _sphagnumMossFast = nullptr
private

◆ _sphagnumMossLive

const flint::IPool* _sphagnumMossLive = nullptr
private

◆ fmlTurnoverRate

double fmlTurnoverRate { 0 }
private

Feather moss turnover rate


◆ runMoss

bool runMoss { false }
private

◆ smlTurnoverRate

double smlTurnoverRate { 0 }
private

Sphagnum moss turnover rate



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