GCBM
peatlandturnovermodulebase.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_PLTURNOVER_BASE_H_
2 #define MOJA_MODULES_CBM_PLTURNOVER_BASE_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
8 
9 namespace moja {
10  namespace modules {
11  namespace cbm {
12 
13  class CBM_API PeatlandTurnoverModuleBase : public CBMModuleBase {
14  public:
16  virtual ~PeatlandTurnoverModuleBase() = default;
17 
18  void configure(const DynamicObject& config) override;
19  void subscribe(NotificationCenter& notificationCenter) override;
20 
21  protected:
22  const flint::IPool* _atmosphere = nullptr;
23  const flint::IPool* _woodyFoliageLive = nullptr;;
24  const flint::IPool* _woodyStemsBranchesLive = nullptr;;
25  const flint::IPool* _woodyRootsLive = nullptr;;
26  const flint::IPool* _sedgeFoliageLive = nullptr;;
27  const flint::IPool* _sedgeRootsLive = nullptr;;
28  const flint::IPool* _featherMossLive = nullptr;;
29  const flint::IPool* _sphagnumMossLive = nullptr;;
30  const flint::IPool* _woodyFineDead = nullptr;;
31  const flint::IPool* _woodyCoarseDead = nullptr;;
32  const flint::IPool* _woodyFoliageDead = 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 
42  flint::IVariable* _regenDelay = nullptr;
43 
44  //peatland shrub age variable, which may be very old
48  flint::IVariable* _shrubAge = nullptr;;
49 
50  // the turnover parameters associated to this peatland unit
54  std::shared_ptr<PeatlandTurnoverParameters> turnoverParas = nullptr;;
55 
56  // the growth parameters associated to this peatland unit
60  std::shared_ptr<PeatlandGrowthParameters> growthParas = nullptr;;
61 
62  DynamicObject baseWTDParameters;
63 
64  //current peatland pool value
65  double woodyFoliageLive{ 0 };
66  double woodyStemsBranchesLive{ 0 };
67  double woodyRootsLive{ 0 };
68  double sedgeFoliageLive{ 0 };
69  double sedgeRootsLive{ 0 };
70  double featherMossLive{ 0 };
71  double sphagnumMossLive{ 0 };
72 
73  bool _runPeatland{ false };
74  int _peatlandId{ -1 };
75 
76  void updatePeatlandLivePoolValue();
77  void doLivePoolTurnover();
78 
79  double computeWaterTableDepth(double dc, int peatlandID);
80  double computeCarbonTransfers(double previousAwtd, double currentAwtd, double a, double b);
81  };
82  }
83  }
84 } // namespace moja::modules::cbm
85 
86 #endif // MOJA_MODULES_CBM_PLTURNOVER_H_
moja::modules::cbm
Definition: ageclasshelper.cpp:12
peatlandgrowthparameters.h
moja::modules::cbm::CBMModuleBase
Definition: cbmmodulebase.h:22
moja::modules::cbm::PeatlandTurnoverModuleBase
Definition: peatlandturnovermodulebase.h:13
peatlandturnoverparameters.h
moja
Definition: ageclasshelper.cpp:10
moja::modules::cbm::PeatlandTurnoverModuleBase::PeatlandTurnoverModuleBase
PeatlandTurnoverModuleBase()
Definition: peatlandturnovermodulebase.h:15
cbmmodulebase.h