#include <HeightGLIWeibullMortality.h>
Inheritance diagram for clHeightGLIWeibullMortality:
Public Member Functions | |
clHeightGLIWeibullMortality (clSimManager *p_oSimManager) | |
Constructor. | |
~clHeightGLIWeibullMortality () | |
Destructor. | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Calls GetTreeDataMemberCodes(), then ReadParameterFileData(). | |
bool | 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. |
This evaluates mortality according to a weibull function of tree height and GLI.
The equation used in this behavior is:
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.
clHeightGLIWeibullMortality::clHeightGLIWeibullMortality | ( | clSimManager * | p_oSimManager | ) |
Constructor.
p_oSimManager | Sim Manager object. |
void clHeightGLIWeibullMortality::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Calls GetTreeDataMemberCodes(), then ReadParameterFileData().
p_oDoc | DOM tree of parsed input file. |
Reimplemented from clMortalityBase.
bool 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.
p_oTree | Tree being evaluated | |
fDbh | Tree's DBH | |
iSpecies | Species of the tree being evaluated |
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.
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.
p_oDoc | DOM tree of parsed input file. |
modelErr | if the max mortality parameter is not between 0 and 1. |
short int** clHeightGLIWeibullMortality::mp_iLightCodes [protected] |
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
short int** clHeightGLIWeibullMortality::mp_iHeightCodes [protected] |
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
short int** clHeightGLIWeibullMortality::mp_iBrowsedCodes [protected] |
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