clResourceMortality Class Reference

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

#include <ResourceMortality.h>

Inheritance diagram for clResourceMortality:

clMortalityBase clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clResourceMortality (clSimManager *p_oSimManager)
 Constructor.
 ~clResourceMortality ()
 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_fRho
 Scaling factor - ρ in equation above.
float * mp_fMu
 Function mode - μ in equation above.
float * mp_fDelta
 Increase in survival due to growth - δ in equation above.
float * mp_fSigma
 Shape of function in low-growth conditions - σ 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

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 = 1 - ρ * exp(-(R - μ)2 / 2(δG + σ)2)
where:

It saves some calculations to work with the probability of SURVIVAL instead of MORTALITY; remove the "1 - " part from the beginning of the above equation. To compound the survival probability over the number of years per timestep, use PX, where P is the annual probability of survival and X is the number of years per timestep.

Once a tree's survival 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 "resourcemortshell". Its parameter file call string is "Growth resource mortality".

Copyright 2005 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
February 9, 2005 - Created (LEM)


Constructor & Destructor Documentation

clResourceMortality::clResourceMortality ( clSimManager p_oSimManager  ) 

Constructor.

Sets the namestring.


Member Function Documentation

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

bool clResourceMortality::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 clResourceMortality::ReadParameterFileData ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Reads in parameter file data.

Parameters:
p_oDoc Parsed DOM tree of parameter file.

void clResourceMortality::GetResourceGrid (  )  [protected]

Gets the "Resource" grid.

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

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


Member Data Documentation

clGridBase* clResourceMortality::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".

float* clResourceMortality::mp_fRho [protected]

Scaling factor - ρ in equation above.

Array size is number of behavior species.

float* clResourceMortality::mp_fMu [protected]

Function mode - μ in equation above.

Array size is number of behavior species.

float* clResourceMortality::mp_fDelta [protected]

Increase in survival due to growth - δ in equation above.

Array size is number of behavior species.

float* clResourceMortality::mp_fSigma [protected]

Shape of function in low-growth conditions - σ in equation above.

Array size is number of behavior species.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:30:45 2007 for SORTIE Core C++ Documentation by  doxygen 1.5.2