clTempDependentNeighborhoodSurvival Class Reference

Temperature dependent neighborhood survival - Version 1.0. More...

#include <TempDependentNeighborhoodSurvival.h>

Inheritance diagram for clTempDependentNeighborhoodSurvival:

clMortalityBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clTempDependentNeighborhoodSurvival (clSimManager *p_oSimManager)
 Constructor.
 ~clTempDependentNeighborhoodSurvival ()
 Destructor.
deadCode DoMort (clTree *p_oTree, const float &fDbh, const short int &iSpecies)
 Determines mortality for a tree.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Does setup.
void PreMortCalcs (clTreePopulation *p_oPop)
 Does beginning of the time step setup.

Protected Member Functions

void ValidateData ()
 Makes sure N for each species does not = 0 and that the neighbor search radius >= 0.
void ReadParameterFile (xercesc::DOMDocument *p_oDoc, clTreePopulation *p_oPop)
 Reads data from the parameter file.
float GetBAT (float &fX, float &fY, clTreePopulation *p_oPop)
 Gets the total adult neighborhood basal area within the specified radius from a given point.
void SetupGrid (clTreePopulation *p_oPop)
 Sets up the "Temperature Dependent Neighborhood Survival" grid.

Protected Attributes

clGridBasemp_oGrid
 Grid holding survival rate for each species.
float * mp_fM
 Temperature function M - sized number of species.
float * mp_fN
 Temperature function N - sized number of species.
float * mp_fA
 A parameter - sized number of species.
float * mp_fB
 B parameter - sized number of species.
float * mp_fTempFunction
 Temperature portion of the survival function - sized number of species.
short int * mp_iGridSurvivalCodes
 Holds data member codes for the "survival_x" data members of the "Temperature Dependent Neighborhood Survival" grid.
float m_fRadius
 Neighborhood search radius.
float m_fMinSaplingHeight
 Minimum sapling height.
short int m_iBATCode
 Return code for the "BAT" grid data member.


Detailed Description

Temperature dependent neighborhood survival - Version 1.0.

This is a mortality shell object which calculates survival as a function of climate and adult neighbor basal area.

The equation for one year's survival is:

Probability of survival = exp(-1.0*A*BAT^B)*exp(-0.5*(((X-M)/N)^2))
where A, B, M, and N are parameters, X is the plot mean annual temperature, and BAT is the adult neighborhood basal area within a specified radius, in square meters.

Rather than calculate a survival rate for each individual tree, this calculates a survival rate for each cell in a grid. Trees then get the survival rate of the grid cell in which they are found. For efficiency, the survival rate for a cell is not calculated until there is a tree that needs it.

Snags, seedlings, and trees that are already dead from disturbance events are never counted in the neighbor count.

For multi year time steps, the annual probability of survival is raised to the power of the number of years per time step.

The parameter file call string for this is "Temp Dependent Neighborhood Survival". The namestring for this behavior is "TempDependentNeighborhoodmortshell".

Copyright 2010 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
October 4, 2010 - Created (LEM)

Constructor & Destructor Documentation

clTempDependentNeighborhoodSurvival::clTempDependentNeighborhoodSurvival ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clTempDependentNeighborhoodSurvival::~clTempDependentNeighborhoodSurvival (  ) 

Destructor.


Member Function Documentation

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

Determines mortality for a tree.

This starts by checking the grid cell of the tree to see if survival rate has already been calculated. If so, use it. If not, calculate it for this species for this grid cell. If not already determined, get the adult neighborhood basal area for the cell and calculate the probability of survival using the equation above. Use the random number generator to decide life or death; return the result.

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

Implements clMortalityBase.

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

Does setup.

  1. ReadParameterFile() is called to read the parameter file's data.
  2. ValidateData() is called to validate the data.
  3. SetupGrid() is called to create the survival grid.

Parameters:
p_oDoc DOM tree of parsed input tree.

Reimplemented from clMortalityBase.

void clTempDependentNeighborhoodSurvival::PreMortCalcs ( clTreePopulation p_oPop  )  [virtual]

Does beginning of the time step setup.

This clears all grid values and calculates the temperature portion of the survival function for each species.

Parameters:
p_oPop Tree population.

Reimplemented from clMortalityBase.

void clTempDependentNeighborhoodSurvival::ValidateData (  )  [protected]

Makes sure N for each species does not = 0 and that the neighbor search radius >= 0.

Exceptions:
modelErr if the above conditions are not met.

void clTempDependentNeighborhoodSurvival::ReadParameterFile ( xercesc::DOMDocument *  p_oDoc,
clTreePopulation p_oPop 
) [protected]

Reads data from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input tree.
p_oPop Tree population.

float clTempDependentNeighborhoodSurvival::GetBAT ( float &  fX,
float &  fY,
clTreePopulation p_oPop 
) [protected]

Gets the total adult neighborhood basal area within the specified radius from a given point.

Neighbors must have a DBH greater than the minimum. They also cannot be dead from a disturbance event; but any trees that have a dead code of "natural" are assumed to have died in the current time step mortality cycle and thus should be counted.

Parameters:
fX X coordinate of point for which to calculate neighborhood basal area
fY Y coordinate of point for which to calculate neighborhood basal area
p_oPop Tree population.
Returns:
Total adult basal area in square meters.

void clTempDependentNeighborhoodSurvival::SetupGrid ( clTreePopulation p_oPop  )  [protected]

Sets up the "Temperature Dependent Neighborhood Survival" grid.

This ignores any maps.

Parameters:
p_oPop Tree population object.


Member Data Documentation

Grid holding survival rate for each species.

The grid name is "Temperature Dependent Neighborhood Survival". It has X+1 float data members, where X = the total number of species. The data member names are "survival_x", for the time step survival rate (where "x" is the species number), and "BAT" for the total adult neighborhood basal area.

Temperature function M - sized number of species.

Temperature function N - sized number of species.

A parameter - sized number of species.

B parameter - sized number of species.

Temperature portion of the survival function - sized number of species.

Holds data member codes for the "survival_x" data members of the "Temperature Dependent Neighborhood Survival" grid.

Array size is total # species.

Neighborhood search radius.

Minimum sapling height.

For doing neighbor searches.

Return code for the "BAT" grid data member.


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

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