#include <NeighborhoodSeedPredation.h>
Inheritance diagram for clNeighborhoodSeedPredation:
Public Member Functions | |
clNeighborhoodSeedPredation (clSimManager *p_oSimManager) | |
Constructor. | |
~clNeighborhoodSeedPredation () | |
Destructor. | |
void | GetData (xercesc::DOMDocument *p_oDoc) |
Does setup. | |
void | Action () |
Performs neighborhood seed predation. | |
Protected Attributes | |
clGridBase * | mp_oSeedGrid |
Pointer to the "Dispersed Seeds" grid created by disperse behaviors. | |
float * | mp_fNonMastingA |
Non-masting "A" parameter. | |
float * | mp_fNonMastingB |
Non-masting "B" parameter. | |
float * | mp_fNonMastingC |
Non-masting "C" parameter. | |
float * | mp_fMastingA |
Masting "A" parameter. | |
float * | mp_fMastingB |
Masting "B" parameter. | |
float * | mp_fMastingC |
Masting "C" parameter. | |
float * | mp_fMastingLoadingFactor |
PCA masting loading factor. | |
float * | mp_fNonMastingLoadingFactor |
PCA non-masting loading factor. | |
short int * | mp_iSeedGridCode |
Data member codes for seed grid for number of seeds. | |
short int * | mp_iIndexes |
For accessing the other arrays. | |
float | m_fPlotArea |
Area of the plot, in square meters. | |
float | m_fRadius |
Radius of neighborhoods. | |
float | m_fMastingThreshold |
Threshold of seeds per square meter for a masting timestep. | |
float | m_fMinNeighDBH |
Minimum neighbor DBH. |
This behavior reduces the number of seeds by simulating seed predation. Rate of offtake is a function of neighborhood composition and masting.
Neighborhood is assessed by computing a PCA score using the basal area of trees in a particular radius around each seed grid cell. This is done as follows:
Masting is assessed by counting the seeds to which this behavior applies and comparing it to a density per timestep threshold. Above the threshold is masting; below is not. The only difference between masting and non-masting timesteps is the parameters used.
The proportion of seed removed is calculated as:
A fatal error is thrown if a disperse behavior is not also defined for the run.
This class's namestring and parameter call string are both "Neighborhood Seed Predation".
Copyright 2007 Charles D. Canham.
clNeighborhoodSeedPredation::clNeighborhoodSeedPredation | ( | clSimManager * | p_oSimManager | ) |
Constructor.
p_oSimManager | Sim Manager object. |
void clNeighborhoodSeedPredation::GetData | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does setup.
This reads in values from the parameter file and gets pointers to the grid.
p_oDoc | DOM tree of parsed input file. |
modelErr | if any of the following are negative: neighborhood radius, min neighbor DBH, masting threshold; or if the seed grid is not found. |
Implements clWorkerBase.
void clNeighborhoodSeedPredation::Action | ( | ) | [virtual] |
Performs neighborhood seed predation.
First, for the whole plot, this assesses whether masting has occurred by comparing the density of seeds of species to which this behavior applies to the threshold. Then for each cell, the neighborhood PCA score and the proportion to remove is calculated. A random round is used to take care of fractional parts of seeds.
Reimplemented from clBehaviorBase.
clGridBase* clNeighborhoodSeedPredation::mp_oSeedGrid [protected] |
Pointer to the "Dispersed Seeds" grid created by disperse behaviors.
float* clNeighborhoodSeedPredation::mp_fNonMastingA [protected] |
Non-masting "A" parameter.
Array size is number of species to which this behavior applies.
float* clNeighborhoodSeedPredation::mp_fNonMastingB [protected] |
Non-masting "B" parameter.
Array size is number of species to which this behavior applies.
float* clNeighborhoodSeedPredation::mp_fNonMastingC [protected] |
Non-masting "C" parameter.
Array size is number of species to which this behavior applies.
float* clNeighborhoodSeedPredation::mp_fMastingA [protected] |
Masting "A" parameter.
Array size is number of species to which this behavior applies.
float* clNeighborhoodSeedPredation::mp_fMastingB [protected] |
Masting "B" parameter.
Array size is number of species to which this behavior applies.
float* clNeighborhoodSeedPredation::mp_fMastingC [protected] |
Masting "C" parameter.
Array size is number of species to which this behavior applies.
float* clNeighborhoodSeedPredation::mp_fMastingLoadingFactor [protected] |
PCA masting loading factor.
Array size is total number of species.
float* clNeighborhoodSeedPredation::mp_fNonMastingLoadingFactor [protected] |
PCA non-masting loading factor.
Array size is total number of species.
short int* clNeighborhoodSeedPredation::mp_iSeedGridCode [protected] |
Data member codes for seed grid for number of seeds.
Array size is number of species to which this behavior applies.
short int* clNeighborhoodSeedPredation::mp_iIndexes [protected] |
For accessing the other arrays.
float clNeighborhoodSeedPredation::m_fPlotArea [protected] |
Area of the plot, in square meters.
float clNeighborhoodSeedPredation::m_fRadius [protected] |
Radius of neighborhoods.
float clNeighborhoodSeedPredation::m_fMastingThreshold [protected] |
Threshold of seeds per square meter for a masting timestep.
This comes as an annual amount in the parameter file and is converted to a timestep amount.
float clNeighborhoodSeedPredation::m_fMinNeighDBH [protected] |
Minimum neighbor DBH.