#include <peatlanddisturbance.h>
Inherits ModuleBase.
◆ PeatlandDisturbance()
◆ ~PeatlandDisturbance()
◆ configure()
void configure |
( |
const DynamicObject & |
config | ) |
|
|
override |
Configuration function
- Parameters
-
- Returns
- void
◆ fetchDMAssociations()
void fetchDMAssociations |
( |
| ) |
|
|
private |
Insert DMAssociations.
Clear contents of PeatlandDisturbance._dmAssociations
For each disturbance matrix association contained in variable "disturbance_matrix_associations" of _landUnitData,
insert into PeatlandDisturbance._dmAssociations the values of variables "disturbance_type", "spatial_unit_id",
and "disturbance_matrix_id" as a triplet using make_pair
◆ onDisturbanceEvent()
void onDisturbanceEvent |
( |
const flint::DisturbanceEventNotification::Ptr |
n | ) |
|
|
override |
Get the disturbance type for either historical or last disturbance event
Get the value of the pair disturbance type, value of "disturbance" in parameter n, and PeatlandDisturbance._spuId and set it to dmId
Create a shared pointer of type CBMDistEventTransfer with parameters *_landUnitData, "CO2", "CH4", dmId, 0.102, add this to PeatlandDisturbance.transfer
- Parameters
-
n | flint::DisturbanceEventNotification::Ptr |
- Returns
- void
◆ onLocalDomainInit()
void onLocalDomainInit |
( |
| ) |
|
|
override |
◆ onTimingInit()
◆ subscribe()
void subscribe |
( |
NotificationCenter & |
notificationCenter | ) |
|
|
override |
Subscribe to the signals LocalDomainInit, DisturbanceEvent and TimingInit
- Parameters
-
notificationCenter | NotificationCenter& |
- Returns
- void
◆ _dmAssociations
std::unordered_map<std::pair<std::string, int>, int> _dmAssociations |
|
private |
◆ _spu
◆ _spuId
The documentation for this class was generated from the following files: