#include <AbsoluteGrowth.h>
Inheritance diagram for clAbsoluteGrowth:
Public Member Functions | |
clAbsoluteGrowth (clSimManager *p_oSimManager) | |
Constructor. | |
~clAbsoluteGrowth () | |
Destructor. | |
float | CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) |
This applies diameter growth as described in the equation above. | |
void | SetNameData (char *cNameString) |
Captures the namestring passed to this behavior. | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Does the setup for this behavior. | |
void | RegisterTreeDataMembers () |
Registers the two float data members and captures the return codes. | |
Protected Member Functions | |
void | CalculateSuppressionThresholds (xercesc::DOMDocument *p_oDoc, clTreePopulation *p_oPop) |
Calculates the suppression threshold for each species. | |
float | CalculateSuppressionFactor (clTree *p_oTree, const float &fGli) |
Calculates a tree's suppression factor. | |
Protected Attributes | |
float * | mp_fLengthLastSuppFactor |
Length last suppression factor - array size is number of species. | |
float * | mp_fLengthCurrReleaseFactor |
Length current release factor - array size is number of species. | |
float * | mp_fGliThreshold |
GLI threshold below which a tree is suppressed - array size is number of species. | |
float | m_fMortRateAtSuppression |
Mortality rate of suppressed trees. | |
float | m_fNumberYearsPerTimestep |
Number of years per timestep - from sim manager. | |
int | m_iYrsExceedThresholdBeforeSup |
Years exceeding threshold before a tree becomes suppressed. | |
int | m_iMaxYears |
Maximum number of years we'll track a tree's suppression and release data. | |
clAbsoluteGrowth::stcCodes * | mp_ylrCodes |
Holds the return codes for the new float tree data members for a particular tree type.Return codes for "ylr" tree data member. | |
clAbsoluteGrowth::stcCodes * | mp_ylsCodes |
Holds the return codes for the new float tree data members for a particular tree type.Return codes for "ylr" tree data member.Return codes for "yls" tree data member. | |
short int | m_iNumBehaviorTypes |
Number of types managed by this behavior. | |
Classes | |
struct | stcCodes |
Holds the return codes for the new float tree data members for a particular tree type. More... |
This is a growth shell object which applies the Michaelis-Menton function to find absolute growth with suppression and release dynamics.
The growth equation is Y = SF * (A * gli) / ((A/S) + gli), where Y is the log10 of new radial growth in mm/yr, SF is the suppression factor, A is asymptotic diameter growth, GLI is global light index, and S is the slope of growth response. Growth can be limited to a radial increment or an area increment, or unlimited. An object of this class can support either diameter-only updating or diameter updating with automatic height adjustment.
Suppression is calculated as SF = e(g*YLR - d*YLS), where g is the value in mp_fLengthCurrReleaseFactor, d is the value in mp_fLengthLastSuppFactor, YLR is the years of the last (or current) release period, and YLS is the years of the last (or current) suppression period.
An object of this class can be created in several ways. Use the strings "absradial", "absba", and "absunlim" to create behaviors that calculate a diameter increase with automatic height adjustment. These strings represent absolute growth limited by constant radial increment, absolute growth limited by constant basal area increment, and unlimited absolute growth, respectively. Add the string " diam only" (example - "absba diam only") to tell this behavior that only the tree's diameter, and not its height, should be updated.
The namestring for this class is "absolutegrowthshell". It is probable that there will be more than one object of this class created.
This object will add two int data members to the applicable trees, "ycr" and "yls" (for years of current release and years of last suppression).
Copyright 2003 Charles D. Canham.
clAbsoluteGrowth::clAbsoluteGrowth | ( | clSimManager * | p_oSimManager | ) |
Constructor.
Sets the namestring.
p_oSimManager | Sim manager for the run. |
float clAbsoluteGrowth::CalcDiameterGrowthValue | ( | clTree * | p_oTree, | |
clTreePopulation * | p_oPop, | |||
float | fHeightGrowth | |||
) | [virtual] |
This applies diameter growth as described in the equation above.
p_oTree | Pointer to the tree to which to apply growth. | |
p_oPop | Pointer to the tree population object. | |
fHeightGrowth | Amount of height growth, in m (ignored). |
Reimplemented from clGrowthBase.
float clAbsoluteGrowth::CalculateSuppressionFactor | ( | clTree * | p_oTree, | |
const float & | fGli | |||
) | [protected] |
Calculates a tree's suppression factor.
The suppression factor is a number greater than 0 that is multiplied times growth to modify it. A factor of 1 returned indicates no suppression. This will also manage the yls and ycr variables to keep track of length of time of suppression and release.
If the years exceeding threshold before suppression variable is greater than the number of years per timestep then the suppression factor is always 1.
p_oTree | The tree for which suppression is being calculated | |
fGli | The tree's gli value |
void clAbsoluteGrowth::CalculateSuppressionThresholds | ( | xercesc::DOMDocument * | p_oDoc, | |
clTreePopulation * | p_oPop | |||
) | [protected] |
Calculates the suppression threshold for each species.
This will have to read mortality parameters to do this.
p_oDoc | Parsed DOM tree of parameter file. | |
p_oPop | Tree population object. |
void clAbsoluteGrowth::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does the setup for this behavior.
It reads in suppression/release data and checks values, and validates that all species/type combos use light (each must have "Light" registered).
p_oDoc | Parsed parameter file object. |
modelErr | if any species/type combo to which this behavior is applied does not have a light behavior. |
Reimplemented from clGrowthBase.
void clAbsoluteGrowth::SetNameData | ( | char * | cNameString | ) | [virtual] |
Captures the namestring passed to this behavior.
This is overridden from clBehaviorBase so we can capture the namestring passed. Since this class can create multiple kinds of behaviors that function differently, this will capture what kind of behavior this is supposed to be.
cNameString | Behavior's namestring. |
Reimplemented from clBehaviorBase.
float* clAbsoluteGrowth::mp_fLengthCurrReleaseFactor [protected] |
Length current release factor - array size is number of species.
This is the old parameter G.
float* clAbsoluteGrowth::mp_fLengthLastSuppFactor [protected] |
Length last suppression factor - array size is number of species.
This is the old parameter D.
struct clAbsoluteGrowth::stcCodes * clAbsoluteGrowth::mp_ylrCodes [protected] |
Holds the return codes for the new float tree data members for a particular tree type.Return codes for "ylr" tree data member.
Array size is number of types.
struct clAbsoluteGrowth::stcCodes
* clAbsoluteGrowth::mp_ylsCodes [protected] |
Holds the return codes for the new float tree data members for a particular tree type.Return codes for "ylr" tree data member.Return codes for "yls" tree data member.
Array size is number of types. Array size is number of types.