#include <SnagDecomp.h>
Inheritance diagram for clSnagDecomp:
Public Member Functions | |
clSnagDecomp (clSimManager *p_oSimManager) | |
Constructor. | |
~clSnagDecomp () | |
Destructor. | |
void | Action () |
Runs snags through the fall models and decay class transition matrix. | |
void | GetData (xercesc::DOMDocument *p_oDoc) |
Does setup for this behavior. | |
void | RegisterTreeDataMembers () |
Registers the "SnagDecayClass" int data member. | |
Protected Attributes | |
float | mp_fSnagTransProb [6][6] |
Species-specific matrices of transition probabilities. | |
float | m_fTreefallAlpha |
Parameters used in treefall and snag fall models. | |
char * | m_cQuery |
String to pass to clTreePopulation::Find() in order to get the trees for which to run snag dynamics. | |
clGridBase * | mp_oBasalAreaGrid |
Grid to hold live and cut basal area in local cells. | |
short int * | mp_iSnagDCCode |
Holds data member codes for "SnagDecayClass" int data member. | |
int | m_iNumSpecies |
Keep a copy of this for the destructor. |
This class simulates the dynamics of standing dead trees as they pass through a series of decay classes and eventually fall.
Trees that die from natural causes in the timestep are run through a tree fall model to determine whether they become a snag, or fall and are removed from tree population. Snags created in previous timesteps are run through a separate fall model to determine whether they remain standing or are removed. Snags remaining standing are run through a decay class transition matrix (decay class is a parameter of the snag fall model).
This behavior adds an integer data member called "SnagDecayClass" to snags representing their decay class. There are five decay classes, numbered 1-5. Parameter values can be set to utilize fewer classes if desired.
Parameters correspond to the tree fall and snag fall models in Vanderwel et al. 2006 (Can. J. For. Res. 36: 2769-2779), and to a transition matrix representing the probability of undergoing a transition from a given decay class to another (or the same one) during the timestep. All transition matrix values must be non-negative and the sum of each column should add up to 1.
All parameters are based on a five-year timestep; the behavior will adjust fall probabilities for other timestep lengths if necessary.
This class's namestring and parameter call string are both "snag decay class dynamics".
This behavior can only be applied to snags. It should run after mortality and dead tree remover behaviors are applied in each timestep.
Copyright 2005 Charles D. Canham.
clSnagDecomp::clSnagDecomp | ( | clSimManager * | p_oSimManager | ) |
clSnagDecomp::~clSnagDecomp | ( | ) |
Destructor.
Deletes arrays.
void clSnagDecomp::Action | ( | ) | [virtual] |
Runs snags through the fall models and decay class transition matrix.
A query is sent to the tree population to get all snags to which this behavior is applied. For each that is still standing, the new decay class is calculated and the value is placed in the "SnagDecayClass" int tree data member. Snags that fall are removed by calling clTreePopulation::KillTree()
Reimplemented from clBehaviorBase.
void clSnagDecomp::GetData | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does setup for this behavior.
Steps:
p_oDoc | DOM tree of parsed input file. |
modelErr | if:
|
Implements clWorkerBase.
void clSnagDecomp::RegisterTreeDataMembers | ( | ) | [virtual] |
Registers the "SnagDecayClass" int data member.
The return codes are captured in the mp_iSnagDCCodes array.
modelErr | if this behavior is being applied to any tree type except snags. |
Reimplemented from clBehaviorBase.
float clSnagDecomp::mp_fSnagTransProb[6][6] [protected] |
Species-specific matrices of transition probabilities.
Array size is 6 x 6.
char* clSnagDecomp::m_cQuery [protected] |
String to pass to clTreePopulation::Find() in order to get the trees for which to run snag dynamics.
This will instigate a species search for all the species to which this behavior applies.
short int* clSnagDecomp::mp_iSnagDCCode [protected] |
Holds data member codes for "SnagDecayClass" int data member.
Array index is # species