#include <StormLight.h>
Inheritance diagram for clStormLight:
Public Types | |
enum | stochasticity { deterministic, lognormal, normal, negative_binomial } |
Enum covering possible light level randomizations. More... | |
Public Member Functions | |
clStormLight (clSimManager *p_oSimManager) | |
Constructor. | |
~clStormLight () | |
Destructor. | |
void | GetData (xercesc::DOMDocument *p_oDoc) |
Does setup for this behavior. | |
void | Action () |
Performs light calculations. | |
Protected Types | |
enum | types |
Enum to translate our types to array index. | |
Protected Attributes | |
clGridBase * | mp_oLightGrid |
Grid object which holds the light values. | |
int ** | mp_iStmDmgCodes |
Return codes for the "stm_dmg" int tree data member. | |
float | m_fMaxRadius |
The max radius, in m, to search for storm-damaged neighbors. | |
float | m_fSlope |
The slope of the light function. | |
float | m_fIntercept |
The intercept of the light function. | |
float | m_fRandParameter |
Standard deviation if normal or lognormal distribution is desired, or clumping parameter if lognormal. | |
float | m_fMinCanopyTrees |
The minimum number of trees within the search radius for the site to qualify as under full canopy. | |
int | m_iMaxDmgTime |
The max time since damage, in years, that a live tree can count toward light calculations. | |
int | m_iMaxSnagDmgTime |
The max time since damage, in years, that a snag can count toward light calculations. | |
int | m_iNumTypes |
Number of types - 2. | |
stochasticity | m_iStochasticity |
What stochasticity to apply to light levels. | |
short int | m_iGridLightCode |
Return code for the "Light" data member. |
This behavior calculates light level as a function of local storm damage. It uses a grid to store these light values (light values are not assigned to individual trees).
The light level is calculated as follows:
The first term in the equation corrects for the possibility of not being under a full canopy. If T >= M, then the term drops out and only the linear second half is used. If T < M, then the trees get at least the proportion of full sun equal to the proportion of trees missing from the full canopy. When counting up T, all adults and snags count, whether storm-damaged or not.
For the second term in the equation, trees count as heavily damaged if they are either snags with a storm counter (i.e. trees killed in storms) or live adults with a storm damage flag indicating heavy damage. Saplings and seedlings never count. Snags that were created by a process other than a storm are not counted (we can tell because they have no storm damage flag). Storm-damaged trees have a counter set for time since the storm. There is a maximum time, after which a tree is not counted in light calculations even if it is still damaged.
The trees are counted within a user-set radius of R from the center of the grid cell.
The light levels can be randomized, if desired. The user can choose to use this deterministically, in which case the values equal the GLA value as calculated in the function above. Alternately, this value can be used as the mean for a random draw on a probability distribution function. The user can specify the PDF to use.
This behavior creates a new grid called "Storm Light".
The namestring and parameter file call string for this behavior are both "Storm Light".
Copyright 2005 Charles D. Canham.
|
Enum covering possible light level randomizations.
|
|
Constructor. Sets the namestring.
|
|
Destructor. Frees memory. |
|
Performs light calculations. This goes through each cell in "Storm Light" and calculates its GLA value as described above. Reimplemented from clBehaviorBase. |
|
Does setup for this behavior. This reads parameter file values and sets up the grid.
Implements clWorkerBase. |
|
Standard deviation if normal or lognormal distribution is desired, or clumping parameter if lognormal. Or nothing, if we are using deterministic light levels. |
|
Return codes for the "stm_dmg" int tree data member. Array index one is sized m_iNumTypes; array index two is sized total number of species. |
|
Grid object which holds the light values. The name of this grid is "Storm Light". It has one float data member called "Light". It uses the default grid cell resolution unless otherwise instructed in the parameter file. A map of this grid in the parameter file will be ignored. |