#include <peatlanddecaymodule.h>
◆ PeatlandDecayModule()
◆ ~PeatlandDecayModule()
◆ allocateCh4CO2()
void allocateCh4CO2 |
( |
double |
awtd | ) |
|
|
private |
Get the CO2 an CH4 portions and perform transfers from temporary carbon pool
Create a variable ch4Portion with initial value 0.0, if parameter awtd is greater than PeatlandWTDBaseFCH4Parameters.OptCH4WTD() on PeatlandDecayModule.wtdFch4Paras, set ch4Portion to FCH4max * pow(F10r, ((OptCH4WTD - awtd) / 10.0)), else to FCH4max * pow(F10d, ((OptCH4WTD - awtd) / 10.0)), where FCH4max is the result of PeatlandWTDBaseFCH4Parameters.FCH4_max(), F10d is the result of PeatlandWTDBaseFCH4Parameters.F10d(), F10r is the result of PeatlandWTDBaseFCH4Parameters.F10r(), OptCH4WTD is the result of PeatlandWTDBaseFCH4Parameters.OptCH4WTD() on PeatlandDecayModule.wtdFch4Paras
A variable co2Portion is assgined the difference of PeatlandDecayModule._tempCarbon and variable ch4Portion
If variables ch4Portion, co2Portion and PeatlandDecayModule._tempCarbon are greater than 0.0, create a proportionalOperation() on _landUnitData and add a transfer of ch4Portion from source PeatlandDecayModule._tempCarbon to sink PeatlandDecayModule._ch4, \ and a transfer of co2Portion from source PeatlandDecayModule._tempCarbon to sink PeatlandDecayModule._co2 Submit the proportionalOperation() on _landUnitData and applyOperations() to apply the transfers.
- Parameters
-
- Returns
- void
◆ computeWaterTableDepth()
double computeWaterTableDepth |
( |
double |
dc, |
|
|
int |
peatlandID |
|
) |
| |
|
private |
Get the water table depth corresponding to the peatlandID
Return -0.045 * dc + base water table depth in PeatlandDecayModule.baseWTDParameters for parameter peatlandID
- Parameters
-
- Returns
- double
◆ configure()
void configure |
( |
const DynamicObject & |
config | ) |
|
|
override |
Configuration function
- Parameters
-
config | const DynamicObject& |
- Returns
- void
◆ doDeadPoolTurnover()
void doDeadPoolTurnover |
( |
double |
deadPoolTurnoverRate | ) |
|
|
private |
Invoke createProportionalOperation() on _landUnitData
Add all the transfers from source to sink pools
Invoke submitOperation() on _landUnitData to submit the transfers, and applyOperations() to apply the transfers.
- Parameters
-
deadPoolTurnoverRate | double |
- Returns
- void
◆ doLocalDomainInit()
void doLocalDomainInit |
( |
| ) |
|
|
overridevirtual |
Initialise PeatlandDecayModule._woodyFoliageDead, PeatlandDecayModule._woodyFineDead, PeatlandDecayModule._woodyCoarseDead, PeatlandDecayModule._woodyRootsDead, PeatlandDecayModule._sedgeFoliageDead, PeatlandDecayModule._sedgeRootsDead, PeatlandDecayModule._feathermossDead, PeatlandDecayModule._acrotelm_o, PeatlandDecayModule._catotelm_a, PeatlandDecayModule._acrotelm_a, PeatlandDecayModule._catotelm_o, PeatlandDecayModule._co2, PeatlandDecayModule._ch4, PeatlandDecayModule._tempCarbon with the pools "WoodyFoliageDead", "WoodyFineDead", "WoodyCoarseDead", "WoodyRootsDead", "SedgeFoliageDead", "SedgeRootsDead", "FeathermossDead", "Acrotelm_o", "Catotelm_a", "Acrotelm_a", "Catotelm_o", "CO2", "CH4", "TempCarbon" in _landUnitData
Initialise PeatlandDecayModule._spinupMossOnly, PeatlandDecayModule.baseWTDParameters, PeatlandDecayModule._appliedAnnualWTD value of variables "spinup_moss_only", "base_wtd_parameters", "applied_annual_wtd" in _landUnitData
- Returns
- void
Reimplemented from CBMModuleBase.
◆ doPeatlandDecay()
void doPeatlandDecay |
( |
double |
deadPoolTurnoverRate, |
|
|
double |
awtd |
|
) |
| |
|
private |
Invoke createProportionalOperation() on _landUnitData
Add all the transfers from source to sink pools
Invoke submitOperation() on _landUnitData to submit the transfers, and applyOperations() to apply the transfers.
- Parameters
-
deadPoolTurnoverRate | double |
awtd | double |
- Returns
- void
◆ doPeatlandNewCH4ModelDecay()
void doPeatlandNewCH4ModelDecay |
( |
double |
deadPoolTurnoverRate | ) |
|
|
private |
Invoke createProportionalOperation() on _landUnitData
Add all the transfers from source to sink pools
Invoke submitOperation() on _landUnitData to submit the transfers, and applyOperations() to apply the transfers.
- Parameters
-
deadPoolTurnoverRate | double |
- Returns
- void
◆ doTimingInit()
◆ doTimingStep()
◆ getCurrentYearWaterTable()
double getCurrentYearWaterTable |
( |
| ) |
|
|
private |
Get the current water table depth
Assign a variable annualDroughtCode, value of variable "annual_drought_class" in _landUnitData else, value of variable "default_annual_drought_class" in _landUnitData
Assign a variable newCurrentYearWtd, compute the water table depth to be used in current step, the result of PeatlandDecayModule.computeWaterTableDepth() with arguments as annualDroughtCode, PeatlandDecayModule._peatlandId
If there is a valid modified annual WTD for forward run only, if value of PeatlandDecayModule._appliedAnnualWTD < 0, assign it to newCurrentYearWtd
Return newCurrentYearWtd
- Returns
- double
◆ getToCH4Rate()
double getToCH4Rate |
( |
double |
rate, |
|
|
double |
deadPoolTurnoverRate, |
|
|
double |
awtd |
|
) |
| |
|
private |
◆ getToCO2Rate()
double getToCO2Rate |
( |
double |
rate, |
|
|
double |
deadPoolTurnoverRate, |
|
|
double |
awtd |
|
) |
| |
|
private |
◆ subscribe()
void subscribe |
( |
NotificationCenter & |
notificationCenter | ) |
|
|
override |
Subscribe to the signals LocalDomainInit, TimingInit and TimingStep
- Parameters
-
notificationCenter | NotificationCenter& |
- Returns
- void
◆ updateParameters()
void updateParameters |
( |
| ) |
|
|
private |
◆ _acrotelm_a
const flint::IPool* _acrotelm_a { nullptr } |
|
private |
◆ _acrotelm_o
const flint::IPool* _acrotelm_o { nullptr } |
|
private |
◆ _appliedAnnualWTD
flint::IVariable* _appliedAnnualWTD { nullptr } |
|
private |
◆ _catotelm_a
const flint::IPool* _catotelm_a { nullptr } |
|
private |
◆ _catotelm_o
const flint::IPool* _catotelm_o { nullptr } |
|
private |
◆ _ch4
const flint::IPool* _ch4 { nullptr } |
|
private |
◆ _co2
const flint::IPool* _co2 { nullptr } |
|
private |
◆ _feathermossDead
const flint::IPool* _feathermossDead { nullptr } |
|
private |
◆ _meanAnnualTemperature
double _meanAnnualTemperature { 0 } |
|
private |
◆ _peatlandId
◆ _runPeatland
bool _runPeatland { false } |
|
private |
◆ _sedgeFoliageDead
const flint::IPool* _sedgeFoliageDead { nullptr } |
|
private |
◆ _sedgeRootsDead
const flint::IPool* _sedgeRootsDead { nullptr } |
|
private |
◆ _spinupMossOnly
flint::IVariable* _spinupMossOnly { nullptr } |
|
private |
◆ _tempCarbon
const flint::IPool* _tempCarbon { nullptr } |
|
private |
◆ _woodyCoarseDead
const flint::IPool* _woodyCoarseDead { nullptr } |
|
private |
◆ _woodyFineDead
const flint::IPool* _woodyFineDead { nullptr } |
|
private |
◆ _woodyFoliageDead
const flint::IPool* _woodyFoliageDead { nullptr } |
|
private |
◆ _woodyRootsDead
const flint::IPool* _woodyRootsDead { nullptr } |
|
private |
◆ baseWTDParameters
DynamicObject baseWTDParameters |
|
private |
◆ decayParas
Decay parameters associated with this peatland unit
◆ turnoverParas
Turnover parameters associated with this peatland unit
◆ wtdFch4Paras
Wtd-base and fch4 parameters
The documentation for this class was generated from the following files: