1 #ifndef MOJA_MODULES_CBM_SMALLTREEROWTHMODULE_H_
2 #define MOJA_MODULES_CBM_SMALLTREEGROWTHMODULE_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
25 void configure(
const DynamicObject& config)
override;
26 void subscribe(NotificationCenter& notificationCenter)
override;
28 flint::ModuleTypes
moduleType()
override {
return flint::ModuleTypes::Model; };
30 void doLocalDomainInit()
override;
31 void doTimingInit()
override;
32 void doTimingStep()
override;
36 const flint::IPool* _atmosphere{
nullptr };
39 std::shared_ptr<SmallTreeGrowthCurve> _smallTreeGrowthSW =
nullptr;
40 const flint::IPool* _softwoodStem{
nullptr };
41 const flint::IPool* _softwoodOther{
nullptr };
42 const flint::IPool* _softwoodFoliage{
nullptr };
43 const flint::IPool* _softwoodCoarseRoots{
nullptr };
44 const flint::IPool* _softwoodFineRoots{
nullptr };
45 const flint::IPool* _softwoodStemSnag{
nullptr };
46 const flint::IPool* _softwoodBranchSnag{
nullptr };
49 std::shared_ptr<SmallTreeGrowthCurve> _smallTreeGrowthHW{
nullptr };
50 const flint::IPool* _hardwoodStem{
nullptr };
51 const flint::IPool* _hardwoodOther{
nullptr };
52 const flint::IPool* _hardwoodFoliage{
nullptr };
53 const flint::IPool* _hardwoodCoarseRoots{
nullptr };
54 const flint::IPool* _hardwoodFineRoots{
nullptr };
55 const flint::IPool* _hardwoodStemSnag{
nullptr };
56 const flint::IPool* _hardwoodBranchSnag{
nullptr };
58 const flint::IPool* _woodyFoliageDead{
nullptr };
59 const flint::IPool* _woodyFineDead{
nullptr };
60 const flint::IPool* _woodyRootsDead{
nullptr };
62 flint::IVariable* _turnoverRates{
nullptr };
63 flint::IVariable* _spuId{
nullptr };
64 flint::IVariable* _smalltreeAge{
nullptr };
65 flint::IVariable* _regenDelay{
nullptr };
66 flint::IVariable* _spinupMossOnly{
nullptr };
67 flint::IVariable* _isForest{
nullptr };
68 flint::IVariable* _isDecaying{
nullptr };
69 flint::IVariable* _outputRemoval{
nullptr };
70 flint::IVariable* _ecoBoundary{
nullptr };
71 flint::IVariable* _blackSpruceGCID{
nullptr };
72 flint::IVariable* _smallTreeGCParameters{
nullptr };
73 flint::IVariable* _appliedGrowthCurveID{
nullptr };
76 void doHalfGrowth()
const;
77 void doPeatlandTurnover()
const;
78 void updateBiomassPools();
79 void doMidSeasonGrowth()
const;
82 bool _shouldRun{
false };
83 int _peatlandId{ -1 };
98 double standSoftwoodStem{ 0 };
99 double standSoftwoodOther{ 0 };
100 double standSoftwoodFoliage{ 0 };
101 double standSWCoarseRootsCarbon{ 0 };
102 double standSWFineRootsCarbon{ 0 };
103 double standHardwoodStem{ 0 };
104 double standHardwoodOther{ 0 };
105 double standHardwoodFoliage{ 0 };
106 double standHWCoarseRootsCarbon{ 0 };
107 double standHWFineRootsCarbon{ 0 };
108 double standSoftwoodStemSnag{ 0 };
109 double standSoftwoodBranchSnag{ 0 };
110 double standHardwoodStemSnag{ 0 };
111 double standHardwoodBranchSnag{ 0 };
117 void getTurnoverRates(
int smalltreeGCID,
int spuID);
118 void updateParameters();
120 void printRemovals(
int standSmallTreeAge,
121 double smallTreeFoliageRemoval,
122 double smallTreeStemSnagRemoval,
123 double smallTreeBranchSnagRemoval,
124 double smallTreeOtherRemovalToWFD,
125 double smallTreeCoarseRootRemoval,
126 double smallTreeFineRootRemoval,
127 double smallTreeOtherToBranchSnag,
128 double smallTreeStemRemoval);