Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_ESGYMMODULE_H_
2 #define MOJA_MODULES_CBM_ESGYMMODULE_H_
6 #include "moja/modules/cbm/_modules.cbm_exports.h"
21 void configure(
const DynamicObject& config)
override;
22 void subscribe(NotificationCenter& notificationCenter)
override;
24 flint::ModuleTypes
moduleType()
override {
return flint::ModuleTypes::Model; };
26 void doLocalDomainInit()
override;
27 void doTimingInit()
override;
28 void doTimingStep()
override;
64 std::shared_ptr<SoftwoodRootBiomassEquation>
SWRootBio;
65 std::shared_ptr<HardwoodRootBiomassEquation>
HWRootBio;
89 void doTurnover(
double M)
const;
90 void updateBiomassPools();
91 bool shouldRun()
const;
134 float ExtractRasterValue(
const std::string name);
135 double ComputeComponentGrowth(
double predictor,
double b0,
double b1,
double b2);
136 double StandBiomassModifier(
double standBio,
double standBio_mu,
double standBio_sig,
double LamBs);
156 double B4,
double B5,
double b1,
double b2,
double eeq_n,
157 double eeq_mu,
double eeq_sig,
double dwf_n,
double dwf_mu,
161 throw std::invalid_argument(
"age should be greater than or equal to 0");
163 double dwf = (dwf_n - dwf_mu) / dwf_sig;
164 double eeq = (eeq_n - eeq_mu) / eeq_sig;
165 double Y_n = (B1 + b1 + B3 * dwf + B4 * eeq + B5 * dwf * eeq)
166 * (B2 + b2) * exp(-(B2 + b2)*age)* pow(1 - exp(-(B2 + b2)*age), 2.0);
167 Y_n = std::max(0.0, Y_n);
217 double B_dwf,
double B_dwf_mu,
double B_dwf_sig,
double dwf_a,
218 double B_rswd,
double B_rswd_mu,
double B_rswd_sig,
double rswd_a,
219 double B_tmean,
double B_tmean_mu,
double B_tmean_sig,
double tmean_a,
220 double B_vpd,
double B_vpd_mu,
double B_vpd_sig,
double vpd_a,
221 double B_eeq,
double B_eeq_mu,
double B_eeq_sig,
double eeq_a,
222 double B_ws,
double B_ws_mu,
double B_ws_sig,
double ws_a,
223 double B_ndep,
double B_ndep_mu,
double B_ndep_sig,
double ndep,
224 double B_ca,
double B_ca_mu,
double B_ca_sig,
double ca)
226 double result = (dwf_a - B_dwf_mu) / B_dwf_sig * B_dwf +
227 (rswd_a - B_rswd_mu) / B_rswd_sig * B_rswd +
228 (tmean_a - B_tmean_mu) / B_tmean_sig * B_tmean +
229 (vpd_a - B_vpd_mu) / B_vpd_sig * B_vpd +
230 (eeq_a - B_eeq_mu) / B_eeq_sig * B_eeq +
231 (ws_a - B_ws_mu) / B_ws_sig * B_ws +
232 (ndep - B_ndep_mu) / B_ndep_sig * B_ndep +
233 (ca - B_ca_mu) / B_ca_sig * B_ca;
DynamicObject growth_esgym_fixed_effects
Definition: esgymmodule.h:67
const flint::IPool * _hardwoodMerch
Definition: esgymmodule.h:37
double standHWFineRootsCarbon
Definition: esgymmodule.h:129
double swf
Definition: esgymmodule.h:110
double standHardwoodMerch
Definition: esgymmodule.h:125
const flint::IPool * _softwoodMerch
Definition: esgymmodule.h:31
flint::IVariable * _standSPUID
Definition: esgymmodule.h:62
const flint::IPool * _softwoodFineRoots
Definition: esgymmodule.h:35
double standHWCoarseRootsCarbon
Definition: esgymmodule.h:128
Definition: ageclasshelper.cpp:12
double hwf
Definition: esgymmodule.h:113
DynamicObject topStumpParameters
Definition: esgymmodule.h:85
double _coarseRootTurnProp
Definition: esgymmodule.h:103
ESGYMModule()
Definition: esgymmodule.h:17
flint::IVariable * _age
Definition: esgymmodule.h:54
flint::ModuleTypes moduleType() override
Definition: esgymmodule.h:24
double standSoftwoodFoliage
Definition: esgymmodule.h:122
Definition: cbmmodulebase.h:22
std::shared_ptr< SoftwoodRootBiomassEquation > SWRootBio
Definition: esgymmodule.h:64
double softwoodStemSnag
Definition: esgymmodule.h:130
Definition: esgymmodule.h:15
const flint::IPool * _aboveGroundVeryFastSoil
Definition: esgymmodule.h:43
DynamicObject environmentalDescriptiveStatistics
Definition: esgymmodule.h:83
DynamicObject growth_esgym_environmental_effects
Definition: esgymmodule.h:73
virtual ~ESGYMModule()
Definition: esgymmodule.h:19
DynamicObject mortality_esgym_fixed_effects
Definition: esgymmodule.h:70
double swo
Definition: esgymmodule.h:109
double _coarseRootSplit
Definition: esgymmodule.h:102
double _softwoodFoliageFallRate
Definition: esgymmodule.h:94
std::shared_ptr< HardwoodRootBiomassEquation > HWRootBio
Definition: esgymmodule.h:65
const flint::IPool * _softwoodOther
Definition: esgymmodule.h:32
double softwoodBranchSnag
Definition: esgymmodule.h:131
std::map< moja::Int64, DynamicObject > growth_esgym_species_specific_effects
Definition: esgymmodule.h:68
DynamicObject mortality_esgym_environmental_effects
Definition: esgymmodule.h:74
double hwfr
Definition: esgymmodule.h:117
double hwcr
Definition: esgymmodule.h:116
double standHardwoodOther
Definition: esgymmodule.h:126
const flint::IPool * _softwoodFoliage
Definition: esgymmodule.h:33
const flint::IPool * _hardwoodOther
Definition: esgymmodule.h:38
std::map< int, double > co2Concentrations
Definition: esgymmodule.h:87
double standSoftwoodMerch
Definition: esgymmodule.h:120
flint::IVariable * _isForest
Definition: esgymmodule.h:59
double swcr
Definition: esgymmodule.h:114
double standHardwoodFoliage
Definition: esgymmodule.h:127
const flint::IPool * _mediumSoil
Definition: esgymmodule.h:51
double _fineRootAGSplit
Definition: esgymmodule.h:104
const flint::IPool * _hardwoodFineRoots
Definition: esgymmodule.h:41
DynamicObject foliageAllocationParameters
Definition: esgymmodule.h:78
double hardwoodStemSnag
Definition: esgymmodule.h:132
double standSoftwoodOther
Definition: esgymmodule.h:121
double hardwoodBranchSnag
Definition: esgymmodule.h:133
DynamicObject mean_esgym_environmental_effects
Definition: esgymmodule.h:75
const flint::IPool * _softwoodCoarseRoots
Definition: esgymmodule.h:34
double swm
Definition: esgymmodule.h:108
double _branchSnagTurnoverRate
Definition: esgymmodule.h:101
double _hardwoodBranchTurnOverRate
Definition: esgymmodule.h:98
double _fineRootTurnProp
Definition: esgymmodule.h:105
const flint::IPool * _hardwoodBranchSnag
Definition: esgymmodule.h:50
double swfr
Definition: esgymmodule.h:115
flint::IVariable * _turnoverRates
Definition: esgymmodule.h:55
DynamicObject stddev_esgym_environmental_effects
Definition: esgymmodule.h:76
flint::IVariable * _cbm_species_id
Definition: esgymmodule.h:61
std::map< moja::Int64, DynamicObject > mortality_esgym_species_specific_effects
Definition: esgymmodule.h:71
DynamicObject branchAllocationParameters
Definition: esgymmodule.h:79
double hwo
Definition: esgymmodule.h:112
const flint::IPool * _belowGroundFastSoil
Definition: esgymmodule.h:46
double _softwoodBranchTurnOverRate
Definition: esgymmodule.h:97
double _stemAnnualTurnOverRate
Definition: esgymmodule.h:96
double hwm
Definition: esgymmodule.h:111
double _stemSnagTurnoverRate
Definition: esgymmodule.h:100
double standSWCoarseRootsCarbon
Definition: esgymmodule.h:123
double GrowthAndMortality(int age, double B1, double B2, double B3, double B4, double B5, double b1, double b2, double eeq_n, double eeq_mu, double eeq_sig, double dwf_n, double dwf_mu, double dwf_sig)
Definition: esgymmodule.h:155
const flint::IPool * _belowGroundVeryFastSoil
Definition: esgymmodule.h:45
flint::IVariable * _currentLandClass
Definition: esgymmodule.h:57
const flint::IPool * _atmosphere
Definition: esgymmodule.h:52
double EnvironmentalModifier(double B_dwf, double B_dwf_mu, double B_dwf_sig, double dwf_a, double B_rswd, double B_rswd_mu, double B_rswd_sig, double rswd_a, double B_tmean, double B_tmean_mu, double B_tmean_sig, double tmean_a, double B_vpd, double B_vpd_mu, double B_vpd_sig, double vpd_a, double B_eeq, double B_eeq_mu, double B_eeq_sig, double eeq_a, double B_ws, double B_ws_mu, double B_ws_sig, double ws_a, double B_ndep, double B_ndep_mu, double B_ndep_sig, double ndep, double B_ca, double B_ca_mu, double B_ca_sig, double ca)
Definition: esgymmodule.h:216
DynamicObject standBiomassModifierParameters
Definition: esgymmodule.h:81
const flint::IPool * _softwoodStemSnag
Definition: esgymmodule.h:47
double standSWFineRootsCarbon
Definition: esgymmodule.h:124
Definition: ageclasshelper.cpp:10
const flint::IPool * _hardwoodFoliage
Definition: esgymmodule.h:39
double _otherToBranchSnagSplit
Definition: esgymmodule.h:99
double _hardwoodFoliageFallRate
Definition: esgymmodule.h:95
const flint::IPool * _softwoodBranchSnag
Definition: esgymmodule.h:48
const flint::IPool * _aboveGroundFastSoil
Definition: esgymmodule.h:44
const flint::IPool * _hardwoodStemSnag
Definition: esgymmodule.h:49
const flint::IPool * _hardwoodCoarseRoots
Definition: esgymmodule.h:40
flint::IVariable * _regenDelay
Definition: esgymmodule.h:56