GCBM
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PeatlandSpinupNext Class Reference

#include <peatlandspinupnext.h>

Inheritance diagram for PeatlandSpinupNext:
Inheritance graph
Collaboration diagram for PeatlandSpinupNext:
Collaboration graph

Public Member Functions

 PeatlandSpinupNext ()
 
virtual ~PeatlandSpinupNext ()=default
 
void configure (const DynamicObject &config) override
 
void subscribe (NotificationCenter &notificationCenter) override
 
void doLocalDomainInit () override
 
void doPrePostDisturbanceEvent () 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 doTimingInit ()
 
virtual void doTimingPrePostInit ()
 
virtual void doTimingPostInit ()
 
virtual void doTimingPostInit2 ()
 
virtual void doTimingShutdown ()
 
virtual void doTimingStep ()
 
virtual void doTimingPreEndStep ()
 
virtual void doTimingEndStep ()
 
virtual void doTimingPostStep ()
 
virtual void doOutputStep ()
 
virtual void doError (std::string msg)
 
virtual void doDisturbanceEvent (DynamicVar)
 
virtual void doPostDisturbanceEvent ()
 
virtual void doPostDisturbanceEvent2 ()
 
virtual void doPostNotification (short preMessageSignal)
 

Private Member Functions

void getTreeTurnoverRate (Peatlands peatlandId)
 
void getAndUpdateParameter ()
 
void getNonOpenPeatlandRemovals (Peatlands peatlandId)
 
void populatePeatlandDeadPoolsV1 ()
 
void populatePeatlandDeadPoolsV2 ()
 
void populatePeatlandDeadPoolsV3 ()
 
void getCurrentDeadPoolValues ()
 
void resetSlowPools ()
 
double modifyQ10 (double baseQ10Para)
 

Private Attributes

const flint::IPool * _softwoodMerch
 
const flint::IPool * _softwoodOther
 
const flint::IPool * _softwoodFoliage
 
const flint::IPool * _softwoodCoarseRoots
 
const flint::IPool * _softwoodFineRoots
 
const flint::IPool * _softwoodStemSnag
 
const flint::IPool * _softwoodBranchSnag
 
const flint::IPool * _hardwoodMerch
 
const flint::IPool * _hardwoodOther
 
const flint::IPool * _hardwoodFoliage
 
const flint::IPool * _hardwoodCoarseRoots
 
const flint::IPool * _hardwoodFineRoots
 
const flint::IPool * _hardwoodStemSnag
 
const flint::IPool * _hardwoodBranchSnag
 
const flint::IPool * _softwoodStem
 
const flint::IPool * _hardwoodStem
 
const flint::IPool * _woodyFoliageLive
 
const flint::IPool * _woodyStemsBranchesLive
 
const flint::IPool * _woodyRootsLive
 
const flint::IPool * _sedgeFoliageLive
 
const flint::IPool * _sedgeRootsLive
 
const flint::IPool * _featherMossLive
 
const flint::IPool * _sphagnumMossLive
 
const flint::IPool * _woodyFoliageDead
 
const flint::IPool * _woodyFineDead
 
const flint::IPool * _woodyCoarseDead
 
const flint::IPool * _woodyRootsDead
 
const flint::IPool * _sedgeFoliageDead
 
const flint::IPool * _sedgeRootsDead
 
const flint::IPool * _feathermossDead
 
const flint::IPool * _acrotelm_o
 
const flint::IPool * _catotelm_a
 
const flint::IPool * _acrotelm_a
 
const flint::IPool * _catotelm_o
 
const flint::IPool * _atmosphere
 
const flint::IVariable * _turnoverRates
 
double _softwoodFoliageFallRate { 0 }
 
double _hardwoodFoliageFallRate { 0 }
 
double _stemAnnualTurnOverRate { 0 }
 
double _stemSnagTurnoverRate { 0 }
 
double _softwoodBranchTurnOverRate { 0 }
 
double _hardwoodBranchTurnOverRate { 0 }
 
double _coarseRootTurnProp { 0 }
 
double _fineRootTurnProp { 0 }
 
double _otherToBranchSnagSplit { 0 }
 
double _branchSnagTurnoverRate { 0 }
 
int smallTreeOn { 0 }
 
double smallTreeFoliageRemoval { 0 }
 
double smallTreeFineRootRemoval { 0 }
 
double smallTreeCoarseRootRemoval { 0 }
 
double smallTreeOtherRemovalToWFD { 0 }
 
double smallTreeBranchSnagRemoval { 0 }
 
double smallTreeStemSnagRemoval { 0 }
 
int largeTreeOn { 0 }
 
double largeTreeFoliageRemoval { 0 }
 
double largeTreeFineRootRemoval { 0 }
 
double largeTreeCoarseRootRemoval { 0 }
 
double largeTreeOtherRemovalToWFD { 0 }
 
double largeTreeBranchSnagRemoval { 0 }
 
double largeTreeStemSnagRemoval { 0 }
 
double meanAnnualTemperature { 0 }
 
double f_r { 1 }
 
double f_fr { 1 }
 
std::shared_ptr< PeatlandDecayParametersdecayParas
 
std::shared_ptr< PeatlandTurnoverParametersturnoverParas
 
std::shared_ptr< PeatlandGrowthParametersgrowthParas
 
std::shared_ptr< PeatlandFireParametersfireParas
 

Constructor & Destructor Documentation

◆ PeatlandSpinupNext()

◆ ~PeatlandSpinupNext()

virtual ~PeatlandSpinupNext ( )
virtualdefault

Member Function Documentation

◆ configure()

void configure ( const DynamicObject &  config)
override

Configuration functioneview source documentation)

Parameters
configDynamicObject&
Returns
void

◆ doLocalDomainInit()

void doLocalDomainInit ( )
overridevirtual

◆ doPrePostDisturbanceEvent()

void doPrePostDisturbanceEvent ( )
overridevirtual

If the value of the variable "load_peatpool_initials" in _landUnitData is true, in the case of loading initial peat pool value, return
If the value of "peatland_class" in _landUnitData is not empty, indicating the current peatland needs to be run
Set PeatlandSpinupNext.meanAnnualTemperature to value of variable "mean_annual_temperature" in _landUnitData if not empty, else to value of variable "default_mean_annual_temperature" in _landUnitData
Set the fire return interval PeatlandSpinupNext.f_r to value of variable "fire_return_interval" in _landUnitData if not empty, else to value of variable "default_fire_return_interval" in _landUnitData
Set PeatlandSpinupNext.f_fr to the inverse of PeatlandSpinupNext.f_r
Invoke PeatlandSpinupNext.getTreeTurnoverRate() to get the tree turnover rate, PeatlandSpinupNext.getAndUpdateParameter() to get related parameters, PeatlandSpinupNext.getNonOpenPeatlandRemovals() to speedup peatland spinup, PeatlandSpinupNext.getCurrentDeadPoolValues() to check values in the current peat pools, PeatlandSpinupNext.resetSlowPools() to reset some slpw pools
If the value of "peatland_spinup_factor" > 0 in _landUnitData, invoke populatePeatlandDeadPoolsV3() to transfer carbon between the pools

Returns
void

Reimplemented from CBMModuleBase.

◆ getAndUpdateParameter()

void getAndUpdateParameter ( )
private

Set the values of variables "peatland_decay_parameters", "peatland_turnover_parameters", "peatland_growth_parameters" to PeatlandSpinupNext.decayParas, PeatlandSpinupNext.turnoverParas and PeatlandSpinupNext.growthParas
If PeatlandSpinupNext.peatlandFireParams is not empty, set the values of variable "peatland_fire_parameters" in _landUnitData to PeatlandSpinupNext.fireParas

Returns
void

◆ getCurrentDeadPoolValues()

void getCurrentDeadPoolValues ( )
private

◆ getNonOpenPeatlandRemovals()

void getNonOpenPeatlandRemovals ( Peatlands  peatlandId)
private

Obtain removals (live biomass turnover) from small tree or big tree peatlands, these removals will be input to some peatland pools

The peatlandIds Peatlands::TREED_PEATLAND_BOG, Peatlands::TREED_PEATLAND_POORFEN, Peatlands::TREED_PEATLAND_RICHFEN or Peatlands::TREED_PEATLAND_SWAMP correspond to small tree peatlands, and the peatlandIds Peatlands::BIG_TREE_PEATLAND_BOG, Peatlands::BIG_TREE_PEATLAND_POORFEN, Peatlands::BIG_TREE_PEATLAND_RICHFEN or Peatlands::BIG_TREE_PEATLAND_SWAMP correspond to big tree peatlands.
The FoliageRemoval, BranchSnagRemoval, OtherRemovalToWFD, CoarseRootRemoval, FineRootRemoval and StemSnagRemoval are calculated

Returns
void

◆ getTreeTurnoverRate()

void getTreeTurnoverRate ( Peatlands  peatlandId)
private

Get turnover parameters for treed and forested peatland
If argument peatlandId is either Peatlands::OPEN_PEATLAND_BOG, Peatlands::OPEN_PEATLAND_POORFEN or
Peatlands::OPEN_PEATLAND_RICHFEN, return, as it is not a treed or forested peatland
Else, set the values of variables "sw_other_to_branch_snag_split", "sw_stem_turnover", "sw_foliage_turnover", "hw_foliage_turnover", "sw_branch_turnover", "hw_branch_turnover", "sw_coarse_root_turnover", hw_coarse_root_turnover", "sw_stem_snag_turnover", "sw_branch_snag_turnover" in _turnoverRates to PeatlandSpinupNext._otherToBranchSnagSplit, PeatlandSpinupNext._stemAnnualTurnOverRate, PeatlandSpinupNext._softwoodFoliageFallRate, PeatlandSpinupNext._hardwoodFoliageFallRate, PeatlandSpinupNext._softwoodBranchTurnOverRate, PeatlandSpinupNext._hardwoodBranchTurnOverRate, PeatlandSpinupNext._coarseRootTurnProp, PeatlandSpinupNext._fineRootTurnProp, PeatlandSpinupNext._stemSnagTurnoverRate and PeatlandSpinupNext._branchSnagTurnoverRate

Returns
void

◆ modifyQ10()

double modifyQ10 ( double  baseQ10Para)
private

◆ populatePeatlandDeadPoolsV1()

void populatePeatlandDeadPoolsV1 ( )
private

◆ populatePeatlandDeadPoolsV2()

void populatePeatlandDeadPoolsV2 ( )
private

◆ populatePeatlandDeadPoolsV3()

void populatePeatlandDeadPoolsV3 ( )
private

Implementation of the spinup next procedure

Invoke createStockOperation() on _landUnitData, carbon transfers added between the atmosphere and peatland dead pools by the stock amount. Add transfers between PeatlandSpinupNext._atmoshere and PeatlandSpinupNext._woodyFoliageDead, PeatlandSpinupNext._woodyFineDead, PeatlandSpinupNext._woodyRootsDead, PeatlandSpinupNext._sedgeFoliageDead, PeatlandSpinupNext._sedgeRootsDead, PeatlandSpinupNext._feathermossDead, PeatlandSpinupNext._woodyCoarseDead, PeatlandSpinupNext._acrotelm_o and PeatlandSpinupNext._catotelm_a. Invoke submitOperation() on _landUnitData and applyOperation() to apply the transfers

Returns
void

◆ resetSlowPools()

void resetSlowPools ( )
private

◆ subscribe()

void subscribe ( NotificationCenter &  notificationCenter)
override

Subscribe to signals LocalDomainInit and PrePostDisturbanceEvent

Parameters
notificationCenterNotificationCenter&
Returns
void

Member Data Documentation

◆ _acrotelm_a

const flint::IPool* _acrotelm_a
private

◆ _acrotelm_o

const flint::IPool* _acrotelm_o
private

◆ _atmosphere

const flint::IPool* _atmosphere
private

◆ _branchSnagTurnoverRate

double _branchSnagTurnoverRate { 0 }
private

◆ _catotelm_a

const flint::IPool* _catotelm_a
private

◆ _catotelm_o

const flint::IPool* _catotelm_o
private

◆ _coarseRootTurnProp

double _coarseRootTurnProp { 0 }
private

◆ _feathermossDead

const flint::IPool* _feathermossDead
private

◆ _featherMossLive

const flint::IPool* _featherMossLive
private

◆ _fineRootTurnProp

double _fineRootTurnProp { 0 }
private

◆ _hardwoodBranchSnag

const flint::IPool* _hardwoodBranchSnag
private

◆ _hardwoodBranchTurnOverRate

double _hardwoodBranchTurnOverRate { 0 }
private

◆ _hardwoodCoarseRoots

const flint::IPool* _hardwoodCoarseRoots
private

◆ _hardwoodFineRoots

const flint::IPool* _hardwoodFineRoots
private

◆ _hardwoodFoliage

const flint::IPool* _hardwoodFoliage
private

◆ _hardwoodFoliageFallRate

double _hardwoodFoliageFallRate { 0 }
private

◆ _hardwoodMerch

const flint::IPool* _hardwoodMerch
private

◆ _hardwoodOther

const flint::IPool* _hardwoodOther
private

◆ _hardwoodStem

const flint::IPool* _hardwoodStem
private

◆ _hardwoodStemSnag

const flint::IPool* _hardwoodStemSnag
private

◆ _otherToBranchSnagSplit

double _otherToBranchSnagSplit { 0 }
private

◆ _sedgeFoliageDead

const flint::IPool* _sedgeFoliageDead
private

◆ _sedgeFoliageLive

const flint::IPool* _sedgeFoliageLive
private

◆ _sedgeRootsDead

const flint::IPool* _sedgeRootsDead
private

◆ _sedgeRootsLive

const flint::IPool* _sedgeRootsLive
private

◆ _softwoodBranchSnag

const flint::IPool* _softwoodBranchSnag
private

◆ _softwoodBranchTurnOverRate

double _softwoodBranchTurnOverRate { 0 }
private

◆ _softwoodCoarseRoots

const flint::IPool* _softwoodCoarseRoots
private

◆ _softwoodFineRoots

const flint::IPool* _softwoodFineRoots
private

◆ _softwoodFoliage

const flint::IPool* _softwoodFoliage
private

◆ _softwoodFoliageFallRate

double _softwoodFoliageFallRate { 0 }
private

◆ _softwoodMerch

const flint::IPool* _softwoodMerch
private

◆ _softwoodOther

const flint::IPool* _softwoodOther
private

◆ _softwoodStem

const flint::IPool* _softwoodStem
private

◆ _softwoodStemSnag

const flint::IPool* _softwoodStemSnag
private

◆ _sphagnumMossLive

const flint::IPool* _sphagnumMossLive
private

◆ _stemAnnualTurnOverRate

double _stemAnnualTurnOverRate { 0 }
private

◆ _stemSnagTurnoverRate

double _stemSnagTurnoverRate { 0 }
private

◆ _turnoverRates

const flint::IVariable* _turnoverRates
private

◆ _woodyCoarseDead

const flint::IPool* _woodyCoarseDead
private

◆ _woodyFineDead

const flint::IPool* _woodyFineDead
private

◆ _woodyFoliageDead

const flint::IPool* _woodyFoliageDead
private

◆ _woodyFoliageLive

const flint::IPool* _woodyFoliageLive
private

◆ _woodyRootsDead

const flint::IPool* _woodyRootsDead
private

◆ _woodyRootsLive

const flint::IPool* _woodyRootsLive
private

◆ _woodyStemsBranchesLive

const flint::IPool* _woodyStemsBranchesLive
private

◆ decayParas

std::shared_ptr<PeatlandDecayParameters> decayParas
private

◆ f_fr

double f_fr { 1 }
private

◆ f_r

double f_r { 1 }
private

◆ fireParas

std::shared_ptr<PeatlandFireParameters> fireParas
private

◆ growthParas

std::shared_ptr<PeatlandGrowthParameters> growthParas
private

◆ largeTreeBranchSnagRemoval

double largeTreeBranchSnagRemoval { 0 }
private

◆ largeTreeCoarseRootRemoval

double largeTreeCoarseRootRemoval { 0 }
private

◆ largeTreeFineRootRemoval

double largeTreeFineRootRemoval { 0 }
private

◆ largeTreeFoliageRemoval

double largeTreeFoliageRemoval { 0 }
private

◆ largeTreeOn

int largeTreeOn { 0 }
private

◆ largeTreeOtherRemovalToWFD

double largeTreeOtherRemovalToWFD { 0 }
private

◆ largeTreeStemSnagRemoval

double largeTreeStemSnagRemoval { 0 }
private

◆ meanAnnualTemperature

double meanAnnualTemperature { 0 }
private

◆ smallTreeBranchSnagRemoval

double smallTreeBranchSnagRemoval { 0 }
private

◆ smallTreeCoarseRootRemoval

double smallTreeCoarseRootRemoval { 0 }
private

◆ smallTreeFineRootRemoval

double smallTreeFineRootRemoval { 0 }
private

◆ smallTreeFoliageRemoval

double smallTreeFoliageRemoval { 0 }
private

◆ smallTreeOn

int smallTreeOn { 0 }
private

◆ smallTreeOtherRemovalToWFD

double smallTreeOtherRemovalToWFD { 0 }
private

◆ smallTreeStemSnagRemoval

double smallTreeStemSnagRemoval { 0 }
private

◆ turnoverParas

std::shared_ptr<PeatlandTurnoverParameters> turnoverParas
private

The documentation for this class was generated from the following files: