clStormLight Class Reference

Storm Light - Version 1.1. More...

#include <StormLight.h>

Inheritance diagram for clStormLight:

clBehaviorBase clWorkerBase

List of all members.

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 { adult, snag }
 Enum to translate our types to array index. More...

Protected Attributes

clGridBasemp_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.
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.
pdf m_iStochasticity
 What stochasticity to apply to light levels.
short int m_iGridLightCode
 Return code for the "Light" data member.


Detailed Description

Storm Light - Version 1.1.

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:

GLA = ((1 - T/M) * 100) + (a + b * N)
where:

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 that count" are those that have been heavily damaged in recent storms or those that have died from natural mortality. 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. Storm-damaged trees have a counter set for time since the storm, and natural mortality snags have an age. There is a maximum time, after which a tree is not counted in light calculations even if it is still damaged (or hanging around as a snag).

The trees are counted within a user-set radius of R from the center of the grid cell. The proportion is heavily damaged adults and snags divided by total adults and snags.

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.

Author:
Lora E. Murphy

Edit history:
-----------------
May 3, 2005 - Created (LEM)
October 12, 2005 - Changed equation to check for full canopy (LEM)
February 21, 2007 - Changed from a linear function of straight count to linear function of proportion
May 25, 2007 - Removed negative binomial PDF, because I was an idiot to include it in the first place (LEM)
May 25, 2007 - Added natural mortality to light (LEM)

Member Enumeration Documentation

enum clStormLight::types [protected]

Enum to translate our types to array index.

Enumerator:
adult 
snag 


Constructor & Destructor Documentation

clStormLight::clStormLight ( clSimManager p_oSimManager  ) 

Constructor.

Sets the namestring.

Parameters:
p_oSimManager Sim Manager object.

clStormLight::~clStormLight (  ) 

Destructor.

Frees memory.


Member Function Documentation

void clStormLight::GetData ( xercesc::DOMDocument *  p_oDoc  )  [virtual]

Does setup for this behavior.

This reads parameter file values and sets up the grid.

Parameters:
p_oDoc DOM tree of parsed input file.
Exceptions:
modelErr if the value for stochasticity is unrecognized, or if the minimum number of canopy trees is a negative number.

Implements clWorkerBase.

void clStormLight::Action (  )  [virtual]

Performs light calculations.

This goes through each cell in "Storm Light" and calculates its GLA value as described above.

Reimplemented from clBehaviorBase.


Member Data Documentation

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.

int** clStormLight::mp_iStmDmgCodes [protected]

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.

float clStormLight::m_fMaxRadius [protected]

The max radius, in m, to search for storm-damaged neighbors.

float clStormLight::m_fSlope [protected]

The slope of the light function.

float clStormLight::m_fIntercept [protected]

The intercept of the light function.

float clStormLight::m_fRandParameter [protected]

Standard deviation if normal or lognormal distribution is desired.

Or nothing, if we are using deterministic light levels.

The minimum number of trees within the search radius for the site to qualify as under full canopy.

int clStormLight::m_iMaxDmgTime [protected]

The max time since damage, in years, that a live tree can count toward light calculations.

The max time since damage, in years, that a snag can count toward light calculations.

int clStormLight::m_iNumTypes [protected]

Number of types - 2.

What stochasticity to apply to light levels.

short int clStormLight::m_iGridLightCode [protected]

Return code for the "Light" data member.


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

Generated on Tue Apr 19 13:56:17 2011 for SORTIE Core C++ Documentation by  doxygen 1.5.6