1 #ifndef MOJA_MODULES_CBM_PLDECAY_H_
2 #define MOJA_MODULES_CBM_PLDECAY_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
22 void configure(
const DynamicObject& config)
override;
23 void subscribe(NotificationCenter& notificationCenter)
override;
25 void doLocalDomainInit()
override;
26 void doTimingInit()
override;
27 void doTimingStep()
override;
30 const flint::IPool* _woodyFoliageDead{
nullptr };
31 const flint::IPool* _woodyFineDead{
nullptr };
32 const flint::IPool* _woodyCoarseDead{
nullptr };
33 const flint::IPool* _woodyRootsDead{
nullptr };
34 const flint::IPool* _sedgeFoliageDead{
nullptr };
35 const flint::IPool* _sedgeRootsDead{
nullptr };
36 const flint::IPool* _feathermossDead{
nullptr };
37 const flint::IPool* _acrotelm_o{
nullptr };
38 const flint::IPool* _catotelm_a{
nullptr };
39 const flint::IPool* _acrotelm_a{
nullptr };
40 const flint::IPool* _catotelm_o{
nullptr };
41 const flint::IPool* _co2{
nullptr };
42 const flint::IPool* _ch4{
nullptr };
43 const flint::IPool* _tempCarbon{
nullptr };
45 flint::IVariable* _spinupMossOnly{
nullptr };
46 flint::IVariable* _appliedAnnualWTD{
nullptr };
48 double _meanAnnualTemperature{ 0 };
49 int _peatlandId{ -1 };
50 bool _runPeatland{
false };
55 std::shared_ptr<PeatlandDecayParameters> decayParas{
nullptr };
60 std::shared_ptr<PeatlandTurnoverParameters> turnoverParas{
nullptr };
65 std::shared_ptr<PeatlandWTDBaseFCH4Parameters> wtdFch4Paras{
nullptr };
69 void doDeadPoolTurnover(
double turnoverRate);
70 void doPeatlandDecay(
double turnoverRate,
double awtd);
71 void doPeatlandNewCH4ModelDecay(
double turnoverRate);
72 void allocateCh4CO2(
double awtd);
73 void updateParameters();
75 double getCurrentYearWaterTable();
76 double getToCO2Rate(
double rate,
double turnoverRate,
double awtd);
77 double getToCH4Rate(
double rate,
double turnoverRate,
double awtd);
78 double computeWaterTableDepth(
double dc,
int peatlandID);
84 #endif // MOJA_MODULES_CBM_PLDECAY_H_