clLightDepSeedSurvival Class Reference

Light Dependent Seed Survival - Version 1.1. More...

#include <LightDepSeedSurvival.h>

Inheritance diagram for clLightDepSeedSurvival:

clGLIBase clLightBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clLightDepSeedSurvival (clSimManager *p_oSimManager)
 Constructor.
 ~clLightDepSeedSurvival ()
 Destructor.
void GetData (xercesc::DOMDocument *p_oDoc)
 Performs setup.
void Action ()
 Performs establishment.
void SetNameData (char *cNameString)
 Captures the namestring passed to this behavior.
void RegisterTreeDataMembers ()
 Overridden from clLightBase to do nothing.
float CalcLightValue (clTree *p_oTree, clTreePopulation *p_oPop)
 Overridden from clLightBase to do nothing.

Protected Member Functions

void GetParameterFileData (xercesc::DOMDocument *p_oDoc)
 Declares arrays and fills them with parameter file data.
void SetupGrid ()
 Populates required grid pointers.
void DoLightSetup ()
 Performs calculations required of light.
float GetGLI (clTreePopulation *p_oPop, const float &fX, const float &fY)
 Gets the GLI for a given point.
void GetTreeDataMemberCodes ()
 Gets the return codes for needed tree data members.
float GetLightFavorability (const int &iSpecies, const float &fGLI)
 Calculates the light favorability for a given species and GLI.
float GetLightExtinctionCoefficient (clTree *p_oTree)
 Gets the light extinction coefficent.

Protected Attributes

clGridBasemp_oSeedGrid
 Pointer to the "Dispersed Seeds" grid created by disperse behaviors.
clGridBasemp_oStormLightGrid
 Pointer to the "Storm Light" grid created by clStormLight, if needed.
float ** mp_fLightExtCoeff
 Storm light extinction coefficients, if m_bUseStormLight is false.
float * mp_fOptimumGLI
 Optimum light level at which there is no reduction in establishment - one per behavior species.
float * mp_fLowGLISlope
 Slope of favorability dropoff below the optimum light level - one per behavior species.
float * mp_fHighGLISlope
 Slope of favorability dropoff above the optimum light level - one per behavior species.
float m_fLightHeight
 Height at which light is to be calculated, if m_bUseStormLight is false.
float m_fMaxSearchDistance
 Maximum search distance for shading neighbors, if m_bUseStormLight is false.
short int * mp_iSeedGridCode
 Data member codes for seed grid for number of seeds.
short int ** mp_iDamageCodes
 Holds return data codes for the "stm_dmg" tree data member, if m_bUseStormLight is false.
short int * mp_iIndexes
 Speeds access to arrays.
short int m_iNumTotalSpecies
 Number of species.
short int m_iLightCode
 Index for the "Light" data member of the Storm Light grid, if m_bUseStormLight is true.
bool m_bUseStormLight
 Whether or not to have this behavior calculate GLI (false) or get GLI from the Storm Light grid (true).


Detailed Description

Light Dependent Seed Survival - Version 1.1.

This behavior assesses seed survival based on light levels. The starting number of seeds is created by any disperse behavior and placed in the grid "Dispersed Seeds". The number of seeds surviving out of this number is a function of GLI. Because of the need to calculate light levels, this class descends from clGLIBase.

The number of seeds of a given species that survive in a particular "Dispersed Seeds" grid cell is:

Rsp = Ssp * LE

where:

The number of seeds is given a random round.

LE is calculated from GLI as:

where

GLI can come in two ways. The first method is that this behavior will calculate GLI like all other GLIs. There is one difference: neighbor trees that have hurricane damage have different light extinction coefficients from their undamaged neighbors. To achieve this, we override the function clLightBase::GetLightExtinctionCoefficient(). This effect is not required.

The second way is to get the GLI from the Storm Light grid.

A fatal error will be thrown if a disperse behavior is not used, or if Storm Light is the source of GLIs but it is not used.

The namestring and parameter file call string for this class is "Light Dependent Seed Survival" (for having this behavior calculate GLI) or "Storm Light Dependent Seed Survival" (for having Storm Light be the GLI source). Apply this behavior to the desired species; use any type, since type will be ignored.

Copyright 2005 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 14, 2005 - Created (LEM)
October 15, 2005 - Added storm light stuff (LEM)

Constructor & Destructor Documentation

clLightDepSeedSurvival::clLightDepSeedSurvival ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clLightDepSeedSurvival::~clLightDepSeedSurvival (  ) 

Destructor.


Member Function Documentation

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

Performs setup.

Calls:

Parameters:
p_oDoc DOM tree of parsed input file.

Reimplemented from clLightBase.

void clLightDepSeedSurvival::Action (  )  [virtual]

Performs establishment.

For each grid cell in "Dispersed Seeds", for each species, this takes the number of seeds and determines how many of them germinate. Steps for each grid cell:

  1. Call GetGLI() to get the light level at the center of the grid cell.
  2. For each species, call GetLightFavorability() to get the light favorability.
  3. Calculate Rsp = Ssp*LE*exp(-c*Sspδ) for each species.
  4. Create a seedling for each of Rsp for each species.

Reimplemented from clLightBase.

void clLightDepSeedSurvival::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.

Parameters:
cNameString Behavior's namestring.

Reimplemented from clBehaviorBase.

void clLightDepSeedSurvival::RegisterTreeDataMembers (  )  [inline, virtual]

Overridden from clLightBase to do nothing.

Reimplemented from clLightBase.

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

Overridden from clLightBase to do nothing.

Implements clLightBase.

void clLightDepSeedSurvival::GetParameterFileData ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Declares arrays and fills them with parameter file data.

Parameters:
p_oDoc Parsed parameter file.
Exceptions:
modelErr if:
  • m_bUseStormLight is false, and any of the light extinction coefficient values are not between 0 and 1.
  • m_bUseStormLight is false, and the value for m_fLightHeight is not zero or greater
  • The value for mp_fOptimumGLI is not between 0 and 100.
  • m_bUseStormLight is false, and the value for m_iNumAltDiv is not greater than 0.
  • m_bUseStormLight is false, and the value for m_iNumAziDiv is not greater than 0.
Parameters:
p_oDoc DOM tree of parsed input file.

void clLightDepSeedSurvival::SetupGrid (  )  [protected]

Populates required grid pointers.

This gets a pointer to the "Dispersed Seeds" grid and all its data members, and does the same for the "Storm Light" grid if m_bUseStormLight is true.

Exceptions:
modelErr if the "Dispersed Seeds" grid does not exist, or if the "Storm Light" grid does not exist and m_bUseStormLight is true.

void clLightDepSeedSurvival::DoLightSetup (  )  [protected]

Performs calculations required of light.

This calculates the brightness array for GLI and the values for m_fAziChunkConverter, m_fRcpTanMinAng, mp_fAziSlope, m_fSinMinSunAng, m_iMinAngRow, and m_fMaxSearchDistance. This function does nothing if m_bUseStormLight is false.

float clLightDepSeedSurvival::GetGLI ( clTreePopulation p_oPop,
const float &  fX,
const float &  fY 
) [protected]

Gets the GLI for a given point.

If m_bUseStormLight is true, this gets the value of "Storm Light" for that grid. If false, this calculates GLI at the height in m_fLightHeight.

Parameters:
p_oPop Tree population, for getting shading neighbors.
fX X coordinate of point for which to get GLI.
fY Y coordinate of point for which to get GLI.
Returns:
GLI value.

void clLightDepSeedSurvival::GetTreeDataMemberCodes (  )  [protected]

Gets the return codes for needed tree data members.

This declares and populates the mp_iDamageCodes array with the return codes for the "stm_dmg" tree int data member. It is not an error if they are not present. This function does nothing if m_bUseStormLight is false.

float clLightDepSeedSurvival::GetLightFavorability ( const int &  iSpecies,
const float &  fGLI 
) [protected]

Calculates the light favorability for a given species and GLI.

This GLI is turned into a proportion germinating according to the following:

  • If GLI = optimum GLI for a species, then proportion germinating = 1.
  • If GLI < optimum GLI for a species, then proportion germinating = 1 -
  • (slope below optimum*(optimum GLI - actual GLI)).
  • If GLI > optimum GLI for a species, then proportion germinating = 1 - (slope above optimum*(actual GLI - optimum GLI)).
Parameters:
iSpecies Species for which to calculate light favorability.
fGLI GLI value.

float clLightDepSeedSurvival::GetLightExtinctionCoefficient ( clTree p_oTree  )  [protected, virtual]

Gets the light extinction coefficent.

If the tree has storm damage, the light extinction coefficient appropriate to the tree's damage category is returned. Otherwise the default light extinction coefficient behavior of clLightOrg is used.

Parameters:
p_oTree Tree for which to obtain the light extinction coefficient.
Returns:
The light extinction coefficient, as the proportion of light transmitted by the tree, as a value between 0 and 1.

Reimplemented from clLightBase.


Member Data Documentation

Pointer to the "Dispersed Seeds" grid created by disperse behaviors.

Pointer to the "Storm Light" grid created by clStormLight, if needed.

Storm light extinction coefficients, if m_bUseStormLight is false.

Array size is m_iNumTotalSpecies by 2 - number of damage categories.

Optimum light level at which there is no reduction in establishment - one per behavior species.

Slope of favorability dropoff below the optimum light level - one per behavior species.

Slope of favorability dropoff above the optimum light level - one per behavior species.

Height at which light is to be calculated, if m_bUseStormLight is false.

Maximum search distance for shading neighbors, if m_bUseStormLight is false.

Data member codes for seed grid for number of seeds.

Array size is # behavior species.

short int** clLightDepSeedSurvival::mp_iDamageCodes [protected]

Holds return data codes for the "stm_dmg" tree data member, if m_bUseStormLight is false.

Array size is number of total species by 2 (saplings and adults).

short int* clLightDepSeedSurvival::mp_iIndexes [protected]

Speeds access to arrays.

Number of species.

For the destructor.

short int clLightDepSeedSurvival::m_iLightCode [protected]

Index for the "Light" data member of the Storm Light grid, if m_bUseStormLight is true.

Whether or not to have this behavior calculate GLI (false) or get GLI from the Storm Light grid (true).


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

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