clBasalAreaLight Class Reference

Basal Area Light - Version 1.0. More...

#include <BasalAreaLight.h>

Inheritance diagram for clBasalAreaLight:

clLightBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clBasalAreaLight (clSimManager *p_oSimManager)
 Constructor.
 ~clBasalAreaLight ()
 Destructor.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Does setup for this behavior.
void TimestepCleanup ()
 Sets the grid updated flag back to false.
float CalcLightValue (clTree *p_oTree, clTreePopulation *p_oPop)
 Gets the light value for a particular tree.
float GetMeanGLI (const float &fConiferBA, const float &fAngiospermBA)
 Calculates the mean GLI for a given pair of basal areas.

Protected Types

enum  iTreeType { angiosperm, conifer }
 Species type status. More...

Protected Member Functions

void UpdateGridValues (clTreePopulation *p_oPop)
 Performs the grid updating each timestep.

Protected Attributes

clGridBasemp_oLightGrid
 Grid object which holds the light values.
enum clBasalAreaLight::iTreeTypemp_iSpeciesTypes
 Species type status.
float * mp_fStatus
 The status of each species, as angiosperm or conifer.
float m_fA
 The "a" parameter for the mean light function.
float m_fConiferB
 The conifer "b" parameter for the mean light function.
float m_fAngiospermB
 The angiosperm "b" parameter for the mean light function.
float m_fConiferC
 The conifer "c" parameter for the mean light function.
float m_fAngiospermC
 The angiosperm "c" parameter for the mean light function.
float m_fSigma
 The sigma parameter of the lognormal PDF function.
float m_fMinDbh
 The minimum DBH for trees to count towards density in a cell.
float m_fRadius
 The search radius for trees.
float m_fChangeThreshold
 The amount by which total basal area in a cell has to change in order to trigger a new light calculation.
short int m_iGridLightCode
 Return code for the "Light" data member of the "Basal Area Light" grid.
short int m_iGridConBACode
 Return code for the "Con BA" data member of the "Basal Area Light" grid.
short int m_iGridAngBACode
 Return code for the "Ang BA" data member of the "Basal Area Light" grid.
bool m_bGridUpdated
 Whether or not the "Basal Area Light" grid has been updated this timestep.


Detailed Description

Basal Area Light - Version 1.0.

This behavior calculates light level as a function of local tree basal area. Basal area is split between conifers and angiosperms. The two basal area totals are used to calculate a mean light level, which is used to choose a random value from a lognormal probability distribution. In order to ensure some level of continuity through time, a grid cell's light level is not recalculated unless the local tree basal area has changed by more than a threshold set by the user.

A grid, "Basal Area Light", is used to store light values. Trees get the light levels of their grid cell.

The mean light level for a grid cell is calculated as follows:

GLIm = a / (1 + (BAa/ca) ba + (1 + (BAc/cc) bc)
where:

For purposes of basal area calculation, each species is assigned to "conifer" or "angiosperm" status. Seedlings and snags are never counted in basal area. Other trees only count if they have a DBH above a user-set minimum.

After the mean light level is calculated, it is turned into a "location parameter" (mu) for the lognormal PDF as follows:

μ = ln(mean) - (σ 2)/ 2

The mu value is used as the zeta value in a lognormal random draw.

Note that this behavior is dependent on the size of grid cells for its behavior.

This behavior creates a new grid called "Basal Area Light". There's more on that grid below.

The namestring for this behavior is "basalarealightshell"; the parameter file call string is "Basal Area Light".

Copyright 2006 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
March 2, 2006 - Created (LEM)

Member Enumeration Documentation

enum clBasalAreaLight::iTreeType [protected]

Species type status.

Enumerator:
angiosperm  Angiosperm.
conifer  Conifer.


Constructor & Destructor Documentation

clBasalAreaLight::clBasalAreaLight ( clSimManager p_oSimManager  ) 

Constructor.

Sets the namestring.

Parameters:
p_oSimManager Sim Manager object.

clBasalAreaLight::~clBasalAreaLight (  ) 

Destructor.

Frees memory.


Member Function Documentation

void clBasalAreaLight::DoShellSetup ( 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 either c = 0
  • If the density change threshold < 0
  • If the minimum DBH < 0
  • If the neighbor search radius < 0

Reimplemented from clLightBase.

void clBasalAreaLight::TimestepCleanup (  )  [inline, virtual]

Sets the grid updated flag back to false.

Reimplemented from clWorkerBase.

float clBasalAreaLight::CalcLightValue ( clTree p_oTree,
clTreePopulation p_oPop 
) [virtual]

Gets the light value for a particular tree.

First, it checks to see if the grid has been updated this timestep. If not, then UpdateGridValues() is called. Then the value in the tree's grid cell of the "Basal Area Light" grid is returned.

Returns:
GLI value, as recorded in the tree's "Density Light" grid cell.

Implements clLightBase.

float clBasalAreaLight::GetMeanGLI ( const float &  fConiferBA,
const float &  fAngiospermBA 
) [inline]

Calculates the mean GLI for a given pair of basal areas.

This is a separate function largely for testing purposes.

Parameters:
fConiferBA The conifer basal area, in square meters.
fAngiospermBA The angiosperm basal area, in square meters.
Returns:
Mean GLI, bounded between 0 and 100.

void clBasalAreaLight::UpdateGridValues ( clTreePopulation p_oPop  )  [protected]

Performs the grid updating each timestep.

It totals up angiosperm and conifer basal area within the search radius for each grid cell. It then compares them to the previous timestep's total. For any cell that has changed by more than the change threshold, a new light level is calculated. At the end, this sets m_bGridUpdated to true.

Parameters:
p_oPop Pointer to the tree population.


Member Data Documentation

Grid object which holds the light values.

The name of this grid is "Basal Area Light". It has one float data member called "Light", and two float data members called "Con BA" and "Ang BA", which hold the basal area of conifers and angiosperms, respectively, in the cell. 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 honored.

Species type status.

What type each species is

float* clBasalAreaLight::mp_fStatus [protected]

The status of each species, as angiosperm or conifer.

float clBasalAreaLight::m_fA [protected]

The "a" parameter for the mean light function.

float clBasalAreaLight::m_fConiferB [protected]

The conifer "b" parameter for the mean light function.

The angiosperm "b" parameter for the mean light function.

float clBasalAreaLight::m_fConiferC [protected]

The conifer "c" parameter for the mean light function.

The angiosperm "c" parameter for the mean light function.

float clBasalAreaLight::m_fSigma [protected]

The sigma parameter of the lognormal PDF function.

float clBasalAreaLight::m_fMinDbh [protected]

The minimum DBH for trees to count towards density in a cell.

float clBasalAreaLight::m_fRadius [protected]

The search radius for trees.

The amount by which total basal area in a cell has to change in order to trigger a new light calculation.

short int clBasalAreaLight::m_iGridLightCode [protected]

Return code for the "Light" data member of the "Basal Area Light" grid.

short int clBasalAreaLight::m_iGridConBACode [protected]

Return code for the "Con BA" data member of the "Basal Area Light" grid.

short int clBasalAreaLight::m_iGridAngBACode [protected]

Return code for the "Ang BA" data member of the "Basal Area Light" grid.

Whether or not the "Basal Area Light" grid has been updated this timestep.


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

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