clHeightGLIWeibullMortality Class Reference

Height-GLI Weibull Mortality - Version 2.0. More...

#include <HeightGLIWeibullMortality.h>

Inheritance diagram for clHeightGLIWeibullMortality:

clMortalityBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clHeightGLIWeibullMortality (clSimManager *p_oSimManager)
 Constructor.
 ~clHeightGLIWeibullMortality ()
 Destructor.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Calls GetTreeDataMemberCodes(), then ReadParameterFileData().
deadCode DoMort (clTree *p_oTree, const float &fDbh, const short int &iSpecies)
 Calculates mortality according to the equation above.

Protected Member Functions

void GetTreeDataMemberCodes ()
 Queries for the return codes of the "Light", "Browsed", and "Height" tree data members.
void ReadParameterFileData (xercesc::DOMDocument *p_oDoc)
 Reads the parameter file data.

Protected Attributes

short int ** mp_iLightCodes
 Return codes for the "Light" tree float data member variable.
short int ** mp_iHeightCodes
 Return codes for the "Height" tree float data member variable.
short int ** mp_iBrowsedCodes
 Return codes for the "Browsed" tree bool data member variable.
float * mp_fMaxMort
 Max mortality - sized number of behavior species.
float * mp_fA
 Mortality "a" parameter - sized number of behavior species.
float * mp_fB
 Mortality "b" parameter - sized number of behavior species.
float * mp_fC
 Mortality "c" parameter - sized number of behavior species.
float * mp_fD
 Mortality "d" parameter - sized number of behavior species.
float * mp_fBrowsedMaxMort
 Browsed max mortality - sized number of behavior species.
float * mp_fBrowsedA
 Browsed "a" parameter - sized number of behavior species.
float * mp_fBrowsedB
 Browsed "b" parameter - sized number of behavior species.
float * mp_fBrowsedC
 Browsed "c" parameter - sized number of behavior species.
float * mp_fBrowsedD
 Browsed "d" parameter - sized number of behavior species.
int * mp_iIndexes
 To help access the other arrays.
float m_fYearsPerTimestep
 Number of years per timestep - for converting probabilities for multi- year timesteps.


Detailed Description

Height-GLI Weibull Mortality - Version 2.0.

This evaluates mortality according to a weibull function of tree height and GLI.

The equation used in this behavior is:

p = Mmax * exp(-a * H b - c * GLI d)
where

If browsing has been implemented (class clRandomBrowse), then this will attempt to implement a second set of parameters for when trees are browsed. Lack of the browse behavior will cause use of the unbrowsed parameters only. A mix of browse applied and unapplied can be used; however, there must be parameters for all the same species for browsed, even if they're not all used.

This class's namestring is "height gli weibull mortshell". The parameter file call string is "Height GLI Weibull Mortality".

Copyright 2006 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
January 26, 2006 - Created (LEM)
April 3, 2007 - Added browse awareness and made version 2.0 (LEM)

Constructor & Destructor Documentation

clHeightGLIWeibullMortality::clHeightGLIWeibullMortality ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clHeightGLIWeibullMortality::~clHeightGLIWeibullMortality (  ) 

Destructor.


Member Function Documentation

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

Calls GetTreeDataMemberCodes(), then ReadParameterFileData().

Parameters:
p_oDoc DOM tree of parsed input file.

Reimplemented from clMortalityBase.

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

Calculates mortality according to the equation above.

Then uses a random number to decide if a tree dies.

Parameters:
p_oTree Tree being evaluated
fDbh Tree's DBH
iSpecies Species of the tree being evaluated
Returns:
natural if the tree is to die, notdead if it lives.

Implements clMortalityBase.

void clHeightGLIWeibullMortality::GetTreeDataMemberCodes (  )  [protected]

Queries for the return codes of the "Light", "Browsed", and "Height" tree data members.

Return codes are captured in the mp_iLightCodes, mp_iBrowsedCodes, and mp_iHeightCodes arrays.

Exceptions:
modelErr if any data member codes are missing for light or height. Missing browse is not an error.

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

Reads the parameter file data.

Unbrowsed parameters are always read. Browsed parameters are read only if there is a non -1 value somewhere in mp_iBrowsedCodes. However, if there is, then the same set of species had better be present for the browsed parameters as for the unbrowsed.

Parameters:
p_oDoc DOM tree of parsed input file.
Exceptions:
modelErr if the max mortality parameter is not between 0 and 1.


Member Data Documentation

Return codes for the "Light" tree float data member variable.

Array size is number of species to which this behavior applies by number of types

Return codes for the "Height" tree float data member variable.

Array size is number of species to which this behavior applies by number of types

Return codes for the "Browsed" tree bool data member variable.

Array size is number of species to which this behavior applies by number of types

Max mortality - sized number of behavior species.

Mortality "a" parameter - sized number of behavior species.

Mortality "b" parameter - sized number of behavior species.

Mortality "c" parameter - sized number of behavior species.

Mortality "d" parameter - sized number of behavior species.

Browsed max mortality - sized number of behavior species.

Browsed "a" parameter - sized number of behavior species.

Browsed "b" parameter - sized number of behavior species.

Browsed "c" parameter - sized number of behavior species.

Browsed "d" parameter - sized number of behavior species.

To help access the other arrays.

Number of years per timestep - for converting probabilities for multi- year timesteps.


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

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