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

#include <sawtoothmodule.h>

Inheritance diagram for SawtoothModule:
Inheritance graph
Collaboration diagram for SawtoothModule:
Collaboration graph

Public Member Functions

 SawtoothModule ()
 
virtual ~SawtoothModule ()=default
 
void configure (const DynamicObject &config) override
 
void subscribe (NotificationCenter &notificationCenter) override
 
void doLocalDomainInit () override
 
void doTimingInit () override
 
void doTimingStep () override
 
void doTimingShutdown () override
 
void doSystemShutdown () override
 
void onDisturbanceEvent (DynamicVar e) 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 doLocalDomainShutdown ()
 
virtual void doLocalDomainProcessingUnitInit ()
 
virtual void doLocalDomainProcessingUnitShutdown ()
 
virtual void doPreTimingSequence ()
 
virtual void doTimingPrePostInit ()
 
virtual void doTimingPostInit ()
 
virtual void doTimingPostInit2 ()
 
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

void GetSiteData (Site_data &site)
 
Environment_data GetEnvironmentData (int year)
 
void LoadEnvironmentData ()
 
void Step (long plot_id, int year, int disturbance_type_id)
 
bool shouldRun () const
 
Sawtooth_ModelMeta InitializeModelMeta (const DynamicObject &config)
 
void AllocateSpecies (int *species, size_t max_density, const Site_data &site_data)
 
void SawtoothModule::adjustPartialMatrix (DynamicVar e, const Sawtooth_CBMBiomassPools &disturbanceLosses)
 

Private Attributes

int environmentDataBaseYear
 
std::vector< Environment_dataenvironmentData
 
size_t Sawtooth_Max_Density
 
std::default_random_engine generator
 
Sawtooth_Error sawtooth_error
 
Sawtooth_Spatial_Variable spatialVar
 
Sawtooth_CBM_Variable cbmVariables
 
Sawtooth_StandLevelResult standLevelResult
 
Sawtooth_CBMResult cbmResult
 
std::shared_ptr< Sawtooth_CBMAnnualProcesses > annualProcess
 
bool WasDisturbed
 
flint::IVariable * PlotId
 
int RCP_Id
 
int GCM_Id
 
std::unordered_set< const moja::flint::IPool * > bioPools
 
SawtoothMatrixWrapper< Sawtooth_Matrix_Int, int > speciesList
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > tmean_ann_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > tmin_ann_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > tmean_gs_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > vpd_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > etp_gs_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > eeq_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > ws_gs_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > ca_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > ndep_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > ws_gs_z_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > ws_gs_n_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > etp_gs_z_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > etp_gs_n_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix_Int, int > disturbance_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > slope_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > twi_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > aspect_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > MeanAge_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > MeanHeight_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > StandDensity_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > TotalBiomassCarbon_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > TotalBiomassCarbonGrowth_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > MeanBiomassCarbon_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > RecruitmentRate_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > MortalityRate_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > MortalityCarbon_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > DisturbanceType_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > DisturbanceMortalityRate_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix, double > DisturbanceMortalityCarbon_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix_Int, int > StumpParmeterId_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix_Int, int > RootParameterId_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix_Int, int > TurnoverParameterId_mat
 
SawtoothMatrixWrapper< Sawtooth_Matrix_Int, int > RegionId_mat
 
const flint::IPool * _softwoodMerch
 
const flint::IPool * _softwoodOther
 
const flint::IPool * _softwoodFoliage
 
const flint::IPool * _softwoodCoarseRoots
 
const flint::IPool * _softwoodFineRoots
 
const flint::IPool * _hardwoodMerch
 
const flint::IPool * _hardwoodOther
 
const flint::IPool * _hardwoodFoliage
 
const flint::IPool * _hardwoodCoarseRoots
 
const flint::IPool * _hardwoodFineRoots
 
const flint::IPool * _aboveGroundVeryFastSoil
 
const flint::IPool * _aboveGroundFastSoil
 
const flint::IPool * _belowGroundVeryFastSoil
 
const flint::IPool * _belowGroundFastSoil
 
const flint::IPool * _softwoodStemSnag
 
const flint::IPool * _softwoodBranchSnag
 
const flint::IPool * _hardwoodStemSnag
 
const flint::IPool * _hardwoodBranchSnag
 
const flint::IPool * _mediumSoil
 
const flint::IPool * _atmosphere
 
flint::IVariable * _age
 
flint::IVariable * _turnoverRates
 
flint::IVariable * _regenDelay
 
flint::IVariable * _isForest
 
flint::IVariable * _standSPUID
 
double _softwoodFoliageFallRate
 
double _hardwoodFoliageFallRate
 
double _stemAnnualTurnOverRate
 
double _softwoodBranchTurnOverRate
 
double _hardwoodBranchTurnOverRate
 
double _otherToBranchSnagSplit
 
double _stemSnagTurnoverRate
 
double _branchSnagTurnoverRate
 
double _coarseRootSplit
 
double _coarseRootTurnProp
 
double _fineRootAGSplit
 
double _fineRootTurnProp
 

Constructor & Destructor Documentation

◆ SawtoothModule()

◆ ~SawtoothModule()

virtual ~SawtoothModule ( )
virtualdefault

Member Function Documentation

◆ AllocateSpecies()

void AllocateSpecies ( int *  species,
size_t  max_density,
const Site_data site_data 
)
private

◆ configure()

void configure ( const DynamicObject &  config)
override

◆ doLocalDomainInit()

void doLocalDomainInit ( )
overridevirtual

Reimplemented from CBMModuleBase.

◆ doSystemShutdown()

void doSystemShutdown ( )
overridevirtual

Reimplemented from CBMModuleBase.

◆ doTimingInit()

void doTimingInit ( )
overridevirtual

Reimplemented from CBMModuleBase.

◆ doTimingShutdown()

void doTimingShutdown ( )
overridevirtual

Reimplemented from CBMModuleBase.

◆ doTimingStep()

void doTimingStep ( )
overridevirtual

Reimplemented from CBMModuleBase.

◆ GetEnvironmentData()

Environment_data GetEnvironmentData ( int  year)
private

◆ GetSiteData()

void GetSiteData ( Site_data site)
private

◆ InitializeModelMeta()

Sawtooth_ModelMeta InitializeModelMeta ( const DynamicObject &  config)
private

◆ LoadEnvironmentData()

void LoadEnvironmentData ( )
private

◆ onDisturbanceEvent()

void onDisturbanceEvent ( DynamicVar  e)
override

◆ SawtoothModule::adjustPartialMatrix()

void SawtoothModule::adjustPartialMatrix ( DynamicVar  e,
const Sawtooth_CBMBiomassPools &  disturbanceLosses 
)
private

◆ shouldRun()

bool shouldRun ( ) const
private

◆ Step()

void Step ( long  plot_id,
int  year,
int  disturbance_type_id 
)
private

◆ subscribe()

void subscribe ( NotificationCenter &  notificationCenter)
override

Member Data Documentation

◆ _aboveGroundFastSoil

const flint::IPool* _aboveGroundFastSoil
private

◆ _aboveGroundVeryFastSoil

const flint::IPool* _aboveGroundVeryFastSoil
private

◆ _age

flint::IVariable* _age
private

◆ _atmosphere

const flint::IPool* _atmosphere
private

◆ _belowGroundFastSoil

const flint::IPool* _belowGroundFastSoil
private

◆ _belowGroundVeryFastSoil

const flint::IPool* _belowGroundVeryFastSoil
private

◆ _branchSnagTurnoverRate

double _branchSnagTurnoverRate
private

◆ _coarseRootSplit

double _coarseRootSplit
private

◆ _coarseRootTurnProp

double _coarseRootTurnProp
private

◆ _fineRootAGSplit

double _fineRootAGSplit
private

◆ _fineRootTurnProp

double _fineRootTurnProp
private

◆ _hardwoodBranchSnag

const flint::IPool* _hardwoodBranchSnag
private

◆ _hardwoodBranchTurnOverRate

double _hardwoodBranchTurnOverRate
private

◆ _hardwoodCoarseRoots

const flint::IPool* _hardwoodCoarseRoots
private

◆ _hardwoodFineRoots

const flint::IPool* _hardwoodFineRoots
private

◆ _hardwoodFoliage

const flint::IPool* _hardwoodFoliage
private

◆ _hardwoodFoliageFallRate

double _hardwoodFoliageFallRate
private

◆ _hardwoodMerch

const flint::IPool* _hardwoodMerch
private

◆ _hardwoodOther

const flint::IPool* _hardwoodOther
private

◆ _hardwoodStemSnag

const flint::IPool* _hardwoodStemSnag
private

◆ _isForest

flint::IVariable* _isForest
private

◆ _mediumSoil

const flint::IPool* _mediumSoil
private

◆ _otherToBranchSnagSplit

double _otherToBranchSnagSplit
private

◆ _regenDelay

flint::IVariable* _regenDelay
private

◆ _softwoodBranchSnag

const flint::IPool* _softwoodBranchSnag
private

◆ _softwoodBranchTurnOverRate

double _softwoodBranchTurnOverRate
private

◆ _softwoodCoarseRoots

const flint::IPool* _softwoodCoarseRoots
private

◆ _softwoodFineRoots

const flint::IPool* _softwoodFineRoots
private

◆ _softwoodFoliage

const flint::IPool* _softwoodFoliage
private

◆ _softwoodFoliageFallRate

double _softwoodFoliageFallRate
private

◆ _softwoodMerch

const flint::IPool* _softwoodMerch
private

◆ _softwoodOther

const flint::IPool* _softwoodOther
private

◆ _softwoodStemSnag

const flint::IPool* _softwoodStemSnag
private

◆ _standSPUID

flint::IVariable* _standSPUID
private

◆ _stemAnnualTurnOverRate

double _stemAnnualTurnOverRate
private

◆ _stemSnagTurnoverRate

double _stemSnagTurnoverRate
private

◆ _turnoverRates

flint::IVariable* _turnoverRates
private

◆ annualProcess

std::shared_ptr<Sawtooth_CBMAnnualProcesses> annualProcess
private

◆ aspect_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> aspect_mat
private

◆ bioPools

std::unordered_set<const moja::flint::IPool*> bioPools
private

◆ ca_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> ca_mat
private

◆ cbmResult

Sawtooth_CBMResult cbmResult
private

◆ cbmVariables

Sawtooth_CBM_Variable cbmVariables
private

◆ disturbance_mat

SawtoothMatrixWrapper<Sawtooth_Matrix_Int, int> disturbance_mat
private

◆ DisturbanceMortalityCarbon_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> DisturbanceMortalityCarbon_mat
private

◆ DisturbanceMortalityRate_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> DisturbanceMortalityRate_mat
private

◆ DisturbanceType_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> DisturbanceType_mat
private

◆ eeq_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> eeq_mat
private

◆ environmentData

std::vector<Environment_data> environmentData
private

◆ environmentDataBaseYear

int environmentDataBaseYear
private

◆ etp_gs_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> etp_gs_mat
private

◆ etp_gs_n_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> etp_gs_n_mat
private

◆ etp_gs_z_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> etp_gs_z_mat
private

◆ GCM_Id

int GCM_Id
private

◆ generator

std::default_random_engine generator
private

◆ MeanAge_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> MeanAge_mat
private

◆ MeanBiomassCarbon_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> MeanBiomassCarbon_mat
private

◆ MeanHeight_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> MeanHeight_mat
private

◆ MortalityCarbon_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> MortalityCarbon_mat
private

◆ MortalityRate_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> MortalityRate_mat
private

◆ ndep_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> ndep_mat
private

◆ PlotId

flint::IVariable* PlotId
private

◆ RCP_Id

int RCP_Id
private

◆ RecruitmentRate_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> RecruitmentRate_mat
private

◆ RegionId_mat

SawtoothMatrixWrapper<Sawtooth_Matrix_Int, int> RegionId_mat
private

◆ RootParameterId_mat

SawtoothMatrixWrapper<Sawtooth_Matrix_Int, int> RootParameterId_mat
private

◆ sawtooth_error

Sawtooth_Error sawtooth_error
private

◆ Sawtooth_Max_Density

size_t Sawtooth_Max_Density
private

◆ slope_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> slope_mat
private

◆ spatialVar

Sawtooth_Spatial_Variable spatialVar
private

◆ speciesList

SawtoothMatrixWrapper<Sawtooth_Matrix_Int, int> speciesList
private

◆ StandDensity_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> StandDensity_mat
private

◆ standLevelResult

Sawtooth_StandLevelResult standLevelResult
private

◆ StumpParmeterId_mat

SawtoothMatrixWrapper<Sawtooth_Matrix_Int, int> StumpParmeterId_mat
private

◆ tmean_ann_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> tmean_ann_mat
private

◆ tmean_gs_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> tmean_gs_mat
private

◆ tmin_ann_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> tmin_ann_mat
private

◆ TotalBiomassCarbon_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> TotalBiomassCarbon_mat
private

◆ TotalBiomassCarbonGrowth_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> TotalBiomassCarbonGrowth_mat
private

◆ TurnoverParameterId_mat

SawtoothMatrixWrapper<Sawtooth_Matrix_Int, int> TurnoverParameterId_mat
private

◆ twi_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> twi_mat
private

◆ vpd_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> vpd_mat
private

◆ WasDisturbed

bool WasDisturbed
private

◆ ws_gs_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> ws_gs_mat
private

◆ ws_gs_n_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> ws_gs_n_mat
private

◆ ws_gs_z_mat

SawtoothMatrixWrapper<Sawtooth_Matrix, double> ws_gs_z_mat
private

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