GCBM
|
Parameters for moss related computing. More...
#include <mossdecaymodule.h>
Public Member Functions | |
MossDecayModule (std::shared_ptr< StandGrowthCurveFactory > gcFactory) | |
virtual | ~MossDecayModule ()=default |
void | configure (const DynamicObject &config) override |
void | subscribe (NotificationCenter ¬ificationCenter) override |
flint::ModuleTypes | moduleType () override |
void | doLocalDomainInit () override |
void | doTimingInit () override |
void | doTimingStep () override |
Public Member Functions inherited from CBMModuleBase | |
virtual | ~CBMModuleBase ()=default |
void | onSystemInit () override |
void | onSystemShutdown () override |
void | onLocalDomainInit () override |
void | onLocalDomainShutdown () override |
void | onLocalDomainProcessingUnitInit () override |
void | onLocalDomainProcessingUnitShutdown () override |
void | onPreTimingSequence () override |
void | onTimingInit () override |
void | onTimingPrePostInit () override |
void | onTimingPostInit () override |
void | onTimingPostInit2 () override |
void | onTimingShutdown () override |
void | onTimingStep () override |
void | onTimingPreEndStep () override |
void | onTimingEndStep () override |
void | onTimingPostStep () override |
void | onOutputStep () override |
void | onPrePostDisturbanceEvent () override |
void | onPostDisturbanceEvent () override |
void | onPostDisturbanceEvent2 () override |
void | onError (std::string msg) override |
void | onDisturbanceEvent (DynamicVar e) override |
void | onPostNotification (short preMessageSignal) override |
virtual void | doSystemInit () |
virtual void | doSystemShutdown () |
virtual void | doLocalDomainShutdown () |
virtual void | doLocalDomainProcessingUnitInit () |
virtual void | doLocalDomainProcessingUnitShutdown () |
virtual void | doPreTimingSequence () |
virtual void | doTimingPrePostInit () |
virtual void | doTimingPostInit () |
virtual void | doTimingPostInit2 () |
virtual void | doTimingShutdown () |
virtual void | doTimingPreEndStep () |
virtual void | doTimingEndStep () |
virtual void | doTimingPostStep () |
virtual void | doOutputStep () |
virtual void | doError (std::string msg) |
virtual void | doDisturbanceEvent (DynamicVar) |
virtual void | doPrePostDisturbanceEvent () |
virtual void | doPostDisturbanceEvent () |
virtual void | doPostDisturbanceEvent2 () |
virtual void | doPostNotification (short preMessageSignal) |
Private Member Functions | |
double | F6 (double m, double n, double maxVolume) |
double | F7 (double baseDecayRate, double meanAnnualTemperature, double q10) |
void | updateMossAppliedDecayParameters (double standMaximumVolume, double meanAnnualTemperature) |
void | doMossFastPoolDecay () |
void | doMossSlowPoolDecay () |
Private Attributes | |
std::shared_ptr< StandGrowthCurveFactory > | _gcFactory |
flint::IVariable * | _mossParameters |
const flint::IPool * | _featherMossFast = nullptr |
const flint::IPool * | _sphagnumMossFast = nullptr |
const flint::IPool * | _featherMossSlow = nullptr |
const flint::IPool * | _sphagnumMossSlow = nullptr |
const flint::IPool * | _CO2 = nullptr |
bool | runMoss { false } |
double | kff |
double | ksf |
double | kfs |
double | kss |
double | q10 |
double | tref |
double | akff |
double | akfs |
double | aksf |
double | akss |
double | m |
double | n |
double | fastToSlowTurnoverRate |
double | fastToAirDecayRate |
double | meanAnnualTemperature |
Int64 | currentStandGCId |
Parameters for moss related computing.
MossDecayModule | ( | std::shared_ptr< StandGrowthCurveFactory > | gcFactory | ) |
|
virtualdefault |
|
override |
Configuration function
config | const DynamicObject& |
|
overridevirtual |
Initialise MossDecayModule._featherMossFast, MossDecayModule._sphagnumMossFast, MossDecayModule._featherMossSlow, MossDecayModule._sphagnumMossSlow, MossDecayModule._CO2 value of "FeatherMossFast", SphagnumMossFast", "FeatherMossSlow", "SphagnumMossSlow", "CO2" in _landUnitData
Initialise MossDecayModule._mossParameters as variable "moss_parameters" in _landUnitData,
MossDecayModule.fastToSlowTurnoverRate, MossDecayModule.fastToAirDecayRate, MossDecayModule.kff, MossDecayModule.ksf, MossDecayModule.kfs, MossDecayModule.kss, MossDecayModule.q10, MossDecayModule.tref, MossDecayModule.m, MossDecayModule.n values of "fastToSlowTurnoverRate", "fastToAirDecayRate", "kff", "ksf", "kfs", "kss", "q10", "tref", "m", "n" in MossDecayModule._mossParameters
Reimplemented from CBMModuleBase.
|
private |
Moss fast pool turnover and decay
Invoke createStockOperation() on _landUnitData
Add feather fast to slow and to air transfers between source MossDecayModule._featherMossFast and sink MossDecayModule._featherMossSlow with transfer value MossDecayModule._featherMossFast * MossDecayModule.akff * MossDecayModule.fastToSlowTurnoverRate, source MossDecayModule._featherMossFast and sink MossDecayModule._CO2 with transfer value MossDecayModule._featherMossFast * MossDecayModule.akff * MossDecayModule.fastToAirDecayRate
Add sphagnum fast to slow and to air transfers between source MossDecayModule._sphagnumMossFast and sink MossDecayModule._sphagnumMossSlow with transfer value MossDecayModule._sphagnumMossFast * MossDecayModule.aksf * MossDecayModule.fastToSlowTurnoverRate source MossDecayModule._sphagnumMossFast and sink MossDecayModule._CO2 with transfer value MossDecayModule._sphagnumMossFast * MossDecayModule.aksf * MossDecayModule.fastToAirDecayRate
Invoke submitOperation() on _landUnitData to submit the transfers
|
private |
Moss slow pool decay only Invoke createProportionalOperation() on _landUnitData, add a transfer of MossDecayModule.akfs from source MossDecayModule._featherMossSlow to sink MossDecayModule._CO2, transfer of MossDecayModule.akss from source MossDecayModule._sphagnumMossSlow to sink MossDecayModule._CO2
Invoke submitOperation() on _landUnitData to submit the transfers
|
overridevirtual |
If variable "enable_moss" exists in _landUnitData and it has a value, assign MossDecayModule.meanAnnualTemperature the value of variable "default_mean_annual_temperature" in _landUnitData if value of variable "mean_annual_temperature" is empty.
Invoke Helper.runMoss() with arguments as value of variables "growth_curve_id", "moss_leading_species" and "leading_species" in _landUnitData
Assign MossDisturbanceModule.runMoss to true if variable "peatland_class" in _landUnitData is empty, variable "growth_curve_id" in _landUnitData is not empty, and Helper.runMoss() returns true
Reimplemented from CBMModuleBase.
|
overridevirtual |
If MossDecayModule.runMoss is true, and the value of variable "growth_curve_id" in _landUnitData > 0, Get the annual maximumVolume of the stand as, invoke StandGrowthCurve.getAnnualStandMaximumVolume() on the result of StandGrowthCurveFactory.getStandGrowthCurve() on MossDecayModule._gcFactory with argument as the value of variable "growth_curve_id" in _landUnitData
Invoke MossDecayModule.updateMossAppliedDecayParameters() with arguments maximumVolume, MossDecayModule.meanAnnualTemperature, MossDecayModule.doMossFastPoolDecay(), MossDecayModule.doMossSlowPoolDecay()
Reimplemented from CBMModuleBase.
|
private |
Return the Sphagnum slow pool base decay rate, applied on pool MossDecayModule.kss, given as m * ln(maxVolume) + n
m | double |
n | double |
maxVolume | double |
|
private |
Applied decay rate to all moss pools :kff, kfs, ksf, kss, given as (baseDecayRate * (e ^ ((meanAnnualTemperature - 10) * (ln(q10) * 0.1))
baseDecayRate | double |
meanAnnualTemperature | double |
q10 | double |
|
override |
|
override |
Subscribe to the signals LocalDomainInit, TimingInit and TimingStep
notificationCenter | NotificationCenter& |
|
private |
Update moss pool base decay rate based on mean annual temperature and q10 value
Assign MossDecayModule.kss, sphagnum slow decay rate, result of MossDecayModule.F6() with arguments MossDecayModule.m, MossDecayModule.n and parameter standMaximumVolume
MossDecayModule.akff, applied feather moss fast pool applied decay rate, the result of MossDecayModule.F7() with arguments MossDecayModule.kff, parameter meanAnnualTemperature and MossDecayModule.q10
MossDecayModule.akfs, applied feather moss slow pool applied decay rate, the result of MossDecayModule.F7() with arguments MossDecayModule.kfs, parameter meanAnnualTemperature and MossDecayModule.q10
MossDecayModule.aksf, applied sphagnum fast pool applied decay rate, the result of MossDecayModule.F7() with arguments MossDecayModule.ksf, parameter meanAnnualTemperature and MossDecayModule.q10
MossDecayModule.akss, applied sphagnum slow pool applied decay rate, the result of MossDecayModule.F7() with arguments MossDecayModule.kss, parameter meanAnnualTemperature and MossDecayModule.q10
standMaximumVolume | double |
meanAnnualTemperature | double |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |