clExpResourceMortality Class Reference

Exponential Growth and Resource Based Mortality - Version 1.0. More...

#include <ExpResourceMortality.h>

Inheritance diagram for clExpResourceMortality:

clMortalityBase clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clExpResourceMortality (clSimManager *p_oSimManager)
 Constructor.
 ~clExpResourceMortality ()
 Destructor.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Performs setup for this behavior.
bool DoMort (clTree *p_oTree, const float &fDbh, const short int &iSpecies)
 Calculates mortality according to the growth-resource mortality equation.

Protected Member Functions

void ReadParameterFileData (xercesc::DOMDocument *p_oDoc)
 Reads in parameter file data.
void GetResourceGrid ()
 Gets the "Resource" grid.
void GetTreeDataMemberCodes ()
 Queries for the return codes of the "Growth", "X", and "Y" float data members of a tree.

Protected Attributes

clGridBasemp_oResourceGrid
 Grid containing the levels of the second resource.
short int ** mp_iGrowthCodes
 Data member codes for "Growth" member - # behavior species by total # types.
short int ** mp_iXCodes
 Data member codes for "X" tree data member - # behavior species by total # types.
short int ** mp_iYCodes
 Data member codes for "Y" tree data member - # behavior species by total # types.
float * mp_fA
 Mortality at zero growth parameter - "a" in equation above.
float * mp_fB
 Light dependent mortality parameter - "b" in equation above.
float * mp_fC
 Resource dependent mortality parameter - "c" in equation above.
float * mp_fD
 "d" in equation above.
short int * mp_iIndexes
 For array access.
float m_fNumberYearsPerTimestep
 Number of years per timestep.
short int m_iResourceCode
 Index for "Resource" data member of the "Resource" grid.

Detailed Description

Exponential Growth and Resource Based Mortality - Version 1.0.

This evaluates mortality probability as a function of growth and a second (unidentified) resource.

The probability of mortality is:

Prob = (d+(a*R))*exp[-(b+c*R)*G]

where:

To compound the mortality probability over the number of years per timestep, use 1-(1-P)X, where P is the annual probability of mortality and X is the number of years per timestep.

Once a tree's mortality probability has been calculated, a random number is used to determine if the tree lives or dies.

The value of the second resource comes from a grid called "Resource", with a single float member named "Resource". This behavior doesn't create this grid, and it's considered a fatal error if it is not present at setup. This behavior will not modify the contents of this grid in any way.

This class's namestring is "expresourcemortshell". Its parameter file call string is "Exponential growth resource mortality".

Copyright 2006 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
July 5, 2006 - Created (LEM)


Constructor & Destructor Documentation

clExpResourceMortality::clExpResourceMortality ( clSimManager p_oSimManager  ) 

Constructor.

Sets the namestring.


Member Function Documentation

bool clExpResourceMortality::DoMort ( clTree p_oTree,
const float &  fDbh,
const short int &  iSpecies 
) [virtual]

Calculates mortality according to the growth-resource mortality equation.

The equation is listed above.

Parameters:
fDbh DBH of tree being evaluated - for seedlings will be 0
p_oTree Tree being evaluated
iSpecies Species of the tree being evaluated
Returns:
True if the tree is to die, false if it lives.

Implements clMortalityBase.

void clExpResourceMortality::DoShellSetup ( xercesc::DOMDocument *  p_oDoc  )  [virtual]

Performs setup for this behavior.

Calls:

  1. ReadParameterFileData
  2. GetTreeDataMemberCodes
  3. GetResourceGrid

Parameters:
p_oDoc Parsed DOM tree of parameter file.

Reimplemented from clMortalityBase.

void clExpResourceMortality::GetResourceGrid (  )  [protected]

Gets the "Resource" grid.

Exceptions:
modelErr if the grid named "Resource" is not present, or is not set up correctly.

void clExpResourceMortality::GetTreeDataMemberCodes (  )  [protected]

Queries for the return codes of the "Growth", "X", and "Y" float data members of a tree.

The "Growth" data member should have been registered by a child class of clGrowthBase.

Exceptions:
modelErr if there is no code for any species/type combo which uses this behavior.

void clExpResourceMortality::ReadParameterFileData ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Reads in parameter file data.

Parameters:
p_oDoc Parsed DOM tree of parameter file.


Member Data Documentation

float* clExpResourceMortality::mp_fA [protected]

Mortality at zero growth parameter - "a" in equation above.

Array size is number of behavior species.

float* clExpResourceMortality::mp_fB [protected]

Light dependent mortality parameter - "b" in equation above.

Array size is number of behavior species.

float* clExpResourceMortality::mp_fC [protected]

Resource dependent mortality parameter - "c" in equation above.

Array size is number of behavior species.

float* clExpResourceMortality::mp_fD [protected]

"d" in equation above.

Array size is number of behavior species.

clGridBase* clExpResourceMortality::mp_oResourceGrid [protected]

Grid containing the levels of the second resource.

This is not created by this behavior; it is expected to already be available. It should be named "Resource" and have one float data member called "Resource".


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 08:42:21 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.7