GCBM
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PeatlandTurnoverModuleBase Class Reference

#include <peatlandturnovermodulebase.h>

Inheritance diagram for PeatlandTurnoverModuleBase:
Inheritance graph
Collaboration diagram for PeatlandTurnoverModuleBase:
Collaboration graph

Public Member Functions

 PeatlandTurnoverModuleBase ()
 
virtual ~PeatlandTurnoverModuleBase ()=default
 
void configure (const DynamicObject &config) override
 
void subscribe (NotificationCenter &notificationCenter) 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 doLocalDomainInit ()
 
virtual void doLocalDomainShutdown ()
 
virtual void doLocalDomainProcessingUnitInit ()
 
virtual void doLocalDomainProcessingUnitShutdown ()
 
virtual void doPreTimingSequence ()
 
virtual void doTimingInit ()
 
virtual void doTimingPrePostInit ()
 
virtual void doTimingPostInit ()
 
virtual void doTimingPostInit2 ()
 
virtual void doTimingShutdown ()
 
virtual void doTimingStep ()
 
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)
 

Protected Member Functions

void updatePeatlandLivePoolValue ()
 
void doLivePoolTurnover ()
 
double computeWaterTableDepth (double dc, int peatlandID)
 
double computeCarbonTransfers (double previousAwtd, double currentAwtd, double a, double b)
 

Protected Attributes

const flint::IPool * _atmosphere = nullptr
 
const flint::IPool * _woodyFoliageLive = nullptr
 
const flint::IPool * _woodyStemsBranchesLive = nullptr
 
const flint::IPool * _woodyRootsLive = nullptr
 
const flint::IPool * _sedgeFoliageLive = nullptr
 
const flint::IPool * _sedgeRootsLive = nullptr
 
const flint::IPool * _featherMossLive = nullptr
 
const flint::IPool * _sphagnumMossLive = nullptr
 
const flint::IPool * _woodyFineDead = nullptr
 
const flint::IPool * _woodyCoarseDead = nullptr
 
const flint::IPool * _woodyFoliageDead = nullptr
 
const flint::IPool * _woodyRootsDead = nullptr
 
const flint::IPool * _sedgeFoliageDead = nullptr
 
const flint::IPool * _sedgeRootsDead = nullptr
 
const flint::IPool * _feathermossDead = nullptr
 
const flint::IPool * _acrotelm_o = nullptr
 
const flint::IPool * _catotelm_a = nullptr
 
const flint::IPool * _acrotelm_a = nullptr
 
const flint::IPool * _catotelm_o = nullptr
 
flint::IVariable * _regenDelay = nullptr
 
flint::IVariable * _shrubAge = nullptr
 Peatland shrub age variable, which may be very old /summary> More...
 
std::shared_ptr< PeatlandTurnoverParametersturnoverParas = nullptr
 Turnover parameters associated to this peatland unit /summary> More...
 
std::shared_ptr< PeatlandGrowthParametersgrowthParas = nullptr
 Growth parameters associated to this peatland unit /summary> More...
 
DynamicObject baseWTDParameters
 
double woodyFoliageLive { 0 }
 
double woodyStemsBranchesLive { 0 }
 
double woodyRootsLive { 0 }
 
double sedgeFoliageLive { 0 }
 
double sedgeRootsLive { 0 }
 
double featherMossLive { 0 }
 
double sphagnumMossLive { 0 }
 
bool _runPeatland { false }
 
int _peatlandId { -1 }
 

Constructor & Destructor Documentation

◆ PeatlandTurnoverModuleBase()

◆ ~PeatlandTurnoverModuleBase()

virtual ~PeatlandTurnoverModuleBase ( )
virtualdefault

Member Function Documentation

◆ computeCarbonTransfers()

double computeCarbonTransfers ( double  previousAwtd,
double  currentAwtd,
double  a,
double  b 
)
protected

Return the carbon transfer amount

Computer pow(fabs(previousAwtd), b) and pow(fabs(currentAwtd), b) where fabs refers to the absolute value floating point value and pow refers to the power function.
Return value of 10.0 * fabs(a * (pow(fabs(previousAwtd), b) - pow(fabs(currentAwtd), b)))

Parameters
previousAwtddouble
currentAwtddouble
adouble
bdouble
Returns
double

◆ computeWaterTableDepth()

double computeWaterTableDepth ( double  dc,
int  peatlandID 
)
protected

Compute the water table depth

Return -0.045 * parameter dc + value of peatlandID (converted to a string) in PeatlandTurnoverModuleBase.baseWTDParameters

Parameters
dcdouble
peatlandIDint
Returns
double

◆ configure()

void configure ( const DynamicObject &  config)
override

Configuration function

Parameters
configconst DynamicObject&
Returns
void

◆ doLivePoolTurnover()

void doLivePoolTurnover ( )
protected

Live to Dead pool turnover transfers

Invoke createStockOperation() on _landUnitData
since this is a turnover module that transfers carbon from a living carbon pool to a dead carbon pool, add transfers between the PeatlandTurnoverModuleBase._atmosphere and PeatlandTurnoverModuleBase._woodyFoliageDead, PeatlandTurnoverModuleBase._woodyFineDead pools, PeatlandTurnoverModuleBase._woodyRootsLive to PeatlandTurnoverModuleBase._woodyRootsDead pool, PeatlandTurnoverModuleBase._sedgeFoliageLive to PeatlandTurnoverModuleBase._sedgeFoliageDead pool, PeatlandTurnoverModuleBase._sedgeRootsLive to PeatlandTurnoverModuleBase._sedgeRootsDead pool, PeatlandTurnoverModuleBase._featherMossLive to PeatlandTurnoverModuleBase._feathermossDead pool and PeatlandTurnoverModuleBase._sphagnumMossLive to PeatlandTurnoverModuleBase._acrotelm_o pool
Invoke submitOperation() on _landUnitData to submit the transfers, applyOperations() to apply the transfers

Returns
void

◆ subscribe()

void subscribe ( NotificationCenter &  notificationCenter)
override

Subscribe to the signals LocalDomainInit, TimingInit and TimingStep

Parameters
notificationCenterNotificationCenter&
Returns
void

◆ updatePeatlandLivePoolValue()

void updatePeatlandLivePoolValue ( )
protected

Member Data Documentation

◆ _acrotelm_a

const flint::IPool* _acrotelm_a = nullptr
protected

◆ _acrotelm_o

const flint::IPool* _acrotelm_o = nullptr
protected

◆ _atmosphere

const flint::IPool* _atmosphere = nullptr
protected

◆ _catotelm_a

const flint::IPool* _catotelm_a = nullptr
protected

◆ _catotelm_o

const flint::IPool* _catotelm_o = nullptr
protected

◆ _feathermossDead

const flint::IPool* _feathermossDead = nullptr
protected

◆ _featherMossLive

const flint::IPool* _featherMossLive = nullptr
protected

◆ _peatlandId

int _peatlandId { -1 }
protected

◆ _regenDelay

flint::IVariable* _regenDelay = nullptr
protected

◆ _runPeatland

bool _runPeatland { false }
protected

◆ _sedgeFoliageDead

const flint::IPool* _sedgeFoliageDead = nullptr
protected

◆ _sedgeFoliageLive

const flint::IPool* _sedgeFoliageLive = nullptr
protected

◆ _sedgeRootsDead

const flint::IPool* _sedgeRootsDead = nullptr
protected

◆ _sedgeRootsLive

const flint::IPool* _sedgeRootsLive = nullptr
protected

◆ _shrubAge

flint::IVariable* _shrubAge = nullptr
protected

Peatland shrub age variable, which may be very old /summary>

◆ _sphagnumMossLive

const flint::IPool* _sphagnumMossLive = nullptr
protected

◆ _woodyCoarseDead

const flint::IPool* _woodyCoarseDead = nullptr
protected

◆ _woodyFineDead

const flint::IPool* _woodyFineDead = nullptr
protected

◆ _woodyFoliageDead

const flint::IPool* _woodyFoliageDead = nullptr
protected

◆ _woodyFoliageLive

const flint::IPool* _woodyFoliageLive = nullptr
protected

◆ _woodyRootsDead

const flint::IPool* _woodyRootsDead = nullptr
protected

◆ _woodyRootsLive

const flint::IPool* _woodyRootsLive = nullptr
protected

◆ _woodyStemsBranchesLive

const flint::IPool* _woodyStemsBranchesLive = nullptr
protected

◆ baseWTDParameters

DynamicObject baseWTDParameters
protected

◆ featherMossLive

double featherMossLive { 0 }
protected

◆ growthParas

std::shared_ptr<PeatlandGrowthParameters> growthParas = nullptr
protected

Growth parameters associated to this peatland unit /summary>

◆ sedgeFoliageLive

double sedgeFoliageLive { 0 }
protected

◆ sedgeRootsLive

double sedgeRootsLive { 0 }
protected

◆ sphagnumMossLive

double sphagnumMossLive { 0 }
protected

◆ turnoverParas

std::shared_ptr<PeatlandTurnoverParameters> turnoverParas = nullptr
protected

Turnover parameters associated to this peatland unit /summary>

◆ woodyFoliageLive

double woodyFoliageLive { 0 }
protected

◆ woodyRootsLive

double woodyRootsLive { 0 }
protected

◆ woodyStemsBranchesLive

double woodyStemsBranchesLive { 0 }
protected

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