#include <MastingNonSpatialDisperse.h>
Public Member Functions | |
clMastingNonSpatialDispersal (clSimManager *p_oSimManager) | |
Constructor. | |
~clMastingNonSpatialDispersal () | |
Destructor. | |
Protected Types | |
enum | event { mast, nonmast, numevents } |
Masting vs. More... | |
Protected Member Functions | |
void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
Reads in parameter file values. | |
void | ComputeBasalArea () |
Computes the total "basal area" of all adults for each species. | |
void | AddSeeds () |
Does dispersal. | |
Protected Attributes | |
float ** | mp_fInvGaussMu |
Mu parameter for inverse gaussian distribution. | |
float ** | mp_fInvGaussLambda |
Lambda parameter for inverse gaussian distribution. | |
float ** | mp_fNormalMean |
Mean for normal distribution. | |
float ** | mp_fNormalStandardDev |
Standard deviation for normal distribution. | |
float * | mp_fBinomialP |
P parameter for binomial distribution for deciding when to mast - array size = number behavior species. | |
float * | mp_fBasalArea |
"Basal area" for each species. | |
short int * | mp_iGroup |
Group affiliation of the species. | |
pdf ** | mp_iFunction |
PDF to use for seed draw. | |
float | m_fScaler |
Factor for scaling from seeds per square meter per year to seeds per grid cell per timestep. | |
bool | m_bGroupsUsed |
Whether or not species are put into groups. |
This class performs non-spatial dispersal with masting. The actual dispersal is non-density dependent, or bath, dispersal. This is a constant seed rain which does not depend on the presence of parent trees in the plot. The actual disperal - just dropping a constant amount of seed everywhere - is easy. Figuring out how much seed to drop is the complicated bit.
The first decision is whether or not there will be masting. This is done by using a random draw on a binomial probability distribution. Each species gets its parameters for this distribution.
Once it is known whether masting will occur, the actual number of seeds per square meter is drawn from a random distribution. Each species can use its own probability function, and can use different functions in masting and non-masting timesteps.
Once the number of seeds per square meter is known, they are evenly distributed to the seed grid cells.
As an additional refinement, species can mast together in groups. In this case, all the species in a group are treated as one entity - masting together, and using the same parameters for seed dispersal - except that at the end, once the number of seeds per square meter is known, they are divided up according to the relative basal areas of the adults in the group across the entire plot. If there are no adults of any of the species in the plot, the seeds are divided evenly.
Apart from grouping, species operate completely independently and the masting activities of one species do not affect the others in any way.
This behavior's namestring and parameter file call string are both "masting non spatial disperse".
Copyright 2008 Charles D. Canham.
enum clMastingNonSpatialDispersal::event [protected] |
clMastingNonSpatialDispersal::clMastingNonSpatialDispersal | ( | clSimManager * | p_oSimManager | ) |
Constructor.
p_oSimManager | Sim Manager object. |
clMastingNonSpatialDispersal::~clMastingNonSpatialDispersal | ( | ) |
Destructor.
void clMastingNonSpatialDispersal::DoShellSetup | ( | xercesc::DOMDocument * | p_oDoc | ) | [protected, virtual] |
Reads in parameter file values.
p_oDoc | DOM tree of parsed parameter file. |
Implements clDisperseBase.
void clMastingNonSpatialDispersal::ComputeBasalArea | ( | ) | [protected] |
Computes the total "basal area" of all adults for each species.
This will allow calculation of relative basal area for each group. Basal area is not actually basal area, since we don't need to multiply by pi to get the relative values. We'll just square the radii. Totals are placed in mp_fBasalArea.
void clMastingNonSpatialDispersal::AddSeeds | ( | ) | [protected, virtual] |
Does dispersal.
This calculates basal area as necessary for groups; checks to see if masting is occurring or not; then uses the appropriate random draw and the appropriate parameters to pick the number of seeds to add to each grid cell.
Implements clDisperseBase.
float** clMastingNonSpatialDispersal::mp_fInvGaussMu [protected] |
Mu parameter for inverse gaussian distribution.
The array is 2D - the first index is masting or non-masting. The second index is number behavior species.
float** clMastingNonSpatialDispersal::mp_fInvGaussLambda [protected] |
Lambda parameter for inverse gaussian distribution.
The array is 2D - the first index is masting or non-masting. The second index is number behavior species.
float** clMastingNonSpatialDispersal::mp_fNormalMean [protected] |
Mean for normal distribution.
The array is 2D - the first index is masting or non-masting. The second index is species.
float** clMastingNonSpatialDispersal::mp_fNormalStandardDev [protected] |
Standard deviation for normal distribution.
The array is 2D - the first index is masting or non-masting. The second index is species.
float* clMastingNonSpatialDispersal::mp_fBinomialP [protected] |
P parameter for binomial distribution for deciding when to mast - array size = number behavior species.
float* clMastingNonSpatialDispersal::mp_fBasalArea [protected] |
"Basal area" for each species.
Since all we care about is relative proportion, this will just add up the squares of the radii. Array size = number behavior species.
short int* clMastingNonSpatialDispersal::mp_iGroup [protected] |
Group affiliation of the species.
Any species with the same group number will always mast together. Array size is number behavior species.
pdf** clMastingNonSpatialDispersal::mp_iFunction [protected] |
PDF to use for seed draw.
The array is 2D - the first index is masting or non-masting. The second index is number behavior species.
float clMastingNonSpatialDispersal::m_fScaler [protected] |
Factor for scaling from seeds per square meter per year to seeds per grid cell per timestep.
bool clMastingNonSpatialDispersal::m_bGroupsUsed [protected] |
Whether or not species are put into groups.