#include <PRStormBiLevelGrowth.h>
Public Member Functions | |
clPRStormBiLevelGrowth (clSimManager *p_oSimManager) | |
Constructor. | |
~clPRStormBiLevelGrowth () | |
Destructor. | |
float | CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) |
Calculates the amount of diameter growth increase for a particular tree using the appropriate growth equation. | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Does the setup for this behavior. | |
Protected Attributes | |
clGridBase * | mp_oStormLight |
"Storm Light" grid object | |
clGridBase * | mp_oStorm |
"Storm Damage" grid object | |
float * | mp_fLoLightSlope |
Slope of growth equation in low light - b - sized number of behavior species. | |
float * | mp_fLoLightIntercept |
Intercept of growth equation in low light - a - sized number of behavior species. | |
float * | mp_fHiLightA |
High light growth equaiton "a" - sized number of behavior species. | |
float * | mp_fHiLightB |
High light growth equaiton "b" - sized number of behavior species. | |
float * | mp_fHiLightThreshold |
Threshold between low light and high light growth, as a value between 0 and 100 - sized number of behavior species. | |
int * | mp_iIndexes |
To help access the other arrays. | |
float | m_fYearsPerTimestep |
Conversion factor to translate the results of the function to the appropriate units per timestep. | |
int | m_iLightCode |
Code for the "Light" data member of the "Storm Light" grid. | |
int | m_iStormtimeCode |
Code for the "stormtime" data member of the "Storm Damage" grid. |
This behavior increments growth using one of two equations, one for low light levels and one for high light levels.
The equation used for low light levels is:
The equation used for high light levels is:
Note that the high-light equation calculates height growth, while the low-light equation calculates diameter growth. If the high-light equation is used, the amount of height growth is transformed into an amount of diameter growth with the help of the clAllometry class. Because of this arrangement, this behavior refuses to act as a diam only incrementer.
This behavior gets its light levels from the "Storm Light" grid object produced by clStormLight. It gets the number of years since the last storm from the "Storm Damage" grid object produced by clStorm. Both of these grids, and thus the behaviors that create them, are required.
The name string is "prstormbilevelgrowthshell". In the parameter file, call "PR storm bilevel growth".
Copyright 2006 Charles D. Canham.
clPRStormBiLevelGrowth::clPRStormBiLevelGrowth | ( | clSimManager * | p_oSimManager | ) |
Constructor.
Sets the namestring.
clPRStormBiLevelGrowth::~clPRStormBiLevelGrowth | ( | ) |
Destructor.
Frees memory.
float clPRStormBiLevelGrowth::CalcDiameterGrowthValue | ( | clTree * | p_oTree, | |
clTreePopulation * | p_oPop, | |||
float | fHeightGrowth | |||
) | [virtual] |
Calculates the amount of diameter growth increase for a particular tree using the appropriate growth equation.
First this retrieves the light level in the tree's grid cell. If it is above the threshold, the high-light equation used. If it is below the threshold, the low-light equation is used.
In the case of tree life-history-stage transitions due to high-light height growth, this isn't going to be too smart. It will calculate a new height, then back-calculate a diameter, then return the difference between the existing and new diamter.
p_oTree | Tree for which to calculate growth. | |
p_oPop | Tree population object, just in case it's needed. | |
fHeightGrowth | Amount of height growth, in m (ignored). |
Reimplemented from clGrowthBase.
void clPRStormBiLevelGrowth::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does the setup for this behavior.
This reads in the parameters from the parameter file, and retrieves the "Storm Light" grid if present.
p_oDoc | Parsed parameter file. |
modelErr | if:
|
Reimplemented from clGrowthBase.
clGridBase* clPRStormBiLevelGrowth::mp_oStormLight [protected] |
"Storm Light" grid object
clGridBase* clPRStormBiLevelGrowth::mp_oStorm [protected] |
"Storm Damage" grid object
float* clPRStormBiLevelGrowth::mp_fLoLightSlope [protected] |
Slope of growth equation in low light - b - sized number of behavior species.
float* clPRStormBiLevelGrowth::mp_fLoLightIntercept [protected] |
Intercept of growth equation in low light - a - sized number of behavior species.
float* clPRStormBiLevelGrowth::mp_fHiLightA [protected] |
High light growth equaiton "a" - sized number of behavior species.
float* clPRStormBiLevelGrowth::mp_fHiLightB [protected] |
High light growth equaiton "b" - sized number of behavior species.
float* clPRStormBiLevelGrowth::mp_fHiLightThreshold [protected] |
Threshold between low light and high light growth, as a value between 0 and 100 - sized number of behavior species.
int* clPRStormBiLevelGrowth::mp_iIndexes [protected] |
To help access the other arrays.
float clPRStormBiLevelGrowth::m_fYearsPerTimestep [protected] |
Conversion factor to translate the results of the function to the appropriate units per timestep.
int clPRStormBiLevelGrowth::m_iLightCode [protected] |
Code for the "Light" data member of the "Storm Light" grid.
int clPRStormBiLevelGrowth::m_iStormtimeCode [protected] |
Code for the "stormtime" data member of the "Storm Damage" grid.