clSubstrateDepSeedSurvival Class Reference

Substrate Dependent Seed Survival - Version 1.1. More...

#include <SubstrateDepSeedSurvival.h>

Inheritance diagram for clSubstrateDepSeedSurvival:

clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clSubstrateDepSeedSurvival (clSimManager *p_oSimManager)
 Constructor.
 ~clSubstrateDepSeedSurvival ()
 Destructor.
void GetData (xercesc::DOMDocument *p_oDoc)
 Performs setup.
void Action ()
 Assesses seed survival.
void SetNameData (char *cNameString)
 Captures the behavior name passed from the parameter file.

Protected Member Functions

void GetParameterFileData (xercesc::DOMDocument *p_oDoc)
 Declares arrays and fills them with parameter file data.
void CalculateSubstrateFavorabilityIndex ()
 For each grid cell in the substrate favorability grid, determines its substrate favorability index.
void SetupGrids ()
 Sets up the grids.

Protected Attributes

clGridBasemp_oSubstrateGrid
 Pointer to "Substrate" grid, created by clSubstrate.
clGridBasemp_oSubstrateFavGrid
 The grid called "Substrate Favorability" will have a cell resolution matching the "Substrate" grid.
clGridBasemp_oSeedGrid
 Pointer to the "Dispersed Seeds" grid created by disperse behaviors.
float * mp_fCanGroundScarSoilFav
 Canopy / ground scarified soil favorability - one per behavior species.
float * mp_fCanGroundTipUpFav
 Canopy / ground tip-up mounds favorability - one per behavior species.
float * mp_fCanGroundFreshLogFav
 Canopy / ground fresh logs favorability - one per behavior species.
float * mp_fCanGroundDecLogFav
 Canopy / ground decayed logs favorability - one per behavior species.
float * mp_fCanGroundForFlLitterFav
 Canopy / ground forest floor litter favorability - one per behavior species.
float * mp_fCanGroundForFlMossFav
 Canopy / ground forest floor moss favorability - one per behavior species.
float * mp_fGapMoundScarSoilFav
 Gap / mound scarified soil favorability - one per behavior species.
float * mp_fGapMoundTipUpFav
 Gap / mound tip-up mounds favorability - one per behavior species.
float * mp_fGapMoundFreshLogFav
 Gap / mound fresh logs favorability - one per behavior species.
float * mp_fGapMoundDecLogFav
 Gap / mound decayed logs favorability - one per behavior species.
float * mp_fGapMoundForFlLitterFav
 Gap / mound forest floor litter favorability - one per behavior species.
float * mp_fGapMoundForFlMossFav
 Gap / mound forest floor moss favorability - one per behavior species.
short int * mp_iIndexes
 Speeds access to favorability arrays.
short int * mp_iSubstrFavCode
 Data member codes for substrate grid for favorability index.
short int * mp_iSeedGridCode
 Data member codes for seed grid for number of seeds.
float m_fMoundProp
 Proportion of plot that is mound, if using microtopography - 0 - 1.
short int m_iIsGapCode
 Data member code for gap status in dispersed seed grid.
short int m_iScarifiedSoilCode
 Data member code - float - scarsoil grid data member.
short int m_iForestFloorLitterCode
 Data member code - float - fflitter grid data member.
short int m_iForestFloorMossCode
 Data member code - float - ffmoss grid data member.
short int m_iTipUpCode
 Data member code - float - tipup grid data member.
short int m_iFreshLogCode
 Data member code - float - freshlog grid data member.
short int m_iDecayedLogCode
 Data member code - float - declog grid data member.
bool m_bUsesGap
 Whether or not gap status is used by this behavior.
bool m_bUsesMicro
 Whether or not microtopography is used.

Detailed Description

Substrate Dependent Seed Survival - Version 1.1.

This behavior assesses seed survival as a function of substrate composition. This behavior can be used in three different configurations: with gap status, without gap status, and with microtopography.

This uses the information in the "Substrate" grid (created and populated by clSubstrate) to determine how favorable a location is for seed survival. The "Substrate" grid contains, in each cell, the proportion of each of the six substrate types. For each species, this behavior knows, on a scale from 0 to 1, how favorable a substrate type is to seeds of that species. The behavior calculates a "favorability index" for each grid cell for each species by multiplying the proportion of each substrate by its favorability and summing the results. This index is the proportion of seeds of that species that survive at that location.

If this is used with gap status, then there are two possible favorabilities for each species for each substrate type: the favorability in a gap cell and the favorability in a canopy cell. This behavior uses the appropriate favorabilities for the gap status of the cell.

If this is used with microtopography, then there are twelve substrate types: each of the basic six on the ground and on a mound. Each substrate type is split into mound and ground based on the fixed proportion of each specified by the user. A favorability index is created from these twelve types the same way it is created with six, above.

To keep track of seed favorabilities, this behavior creates a grid called "Substrate Favorability".

In order to translate between different grid cell sizes in the "Substrate" and "Dispersed Seeds" grids, each seed is assigned a temporary random location within its "Dispersed Seeds" grid cell. A random number is compared to the favorability at that location and the seed either survives or dies. The number of surviving seeds in a "Dispersed Seeds" grid cell is assigned back to that cell.

A fatal error is thrown if: there are no disperse behaviors for the run, if gap status establishment is used without gap status disperse, or if substrate establishment is used without substrate.

The namestring for this class is "Substrate Dependent Seed Survival". Call this from the parameter file using either "No Gap Substrate Seed Survival", "Gap Substrate Seed Survival", or "Microtopographic Substrate Seed Survival". Apply this behavior to species; use any type, since it will be ignored.

Copyright 2005 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 18, 2005 - Created (LEM)
June 3, 2005 - Updated to reflect changes made to substrate (LEM)


Constructor & Destructor Documentation

clSubstrateDepSeedSurvival::clSubstrateDepSeedSurvival ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.


Member Function Documentation

void clSubstrateDepSeedSurvival::GetData ( xercesc::DOMDocument *  p_oDoc  )  [virtual]

Performs setup.

This calls GetParameterFileData() and SetupGrids().

Parameters:
p_oDoc DOM tree of parsed input file.

Implements clWorkerBase.

void clSubstrateDepSeedSurvival::Action (  )  [virtual]

Assesses seed survival.

This calculates the favorability index for each grid cell. For each grid cell, the favorability index is the sum of the proportions of each substrate multiplied by the favorability of that substrate for the cover condition of that grid cell (canopy or gap).

Then, for each cell in the seeds grid, each seed's probability of survival is assessed. It will be given a random location within the grid cell of the "Dispersed Seeds" grid from which it comes. Then a random number is compared to the substrate favorability at that location to see if the seed survives or not. This allows us to translate easily between different grid cell resolutions in the "Dispersed Seeds" and "Substrate" grids.

Reimplemented from clBehaviorBase.

void clSubstrateDepSeedSurvival::SetNameData ( char *  cNameString  )  [virtual]

Captures the behavior name passed from the parameter file.

If the name called from the parameter file is "No Gap Substrate Seed Survival", then m_bUsesGap is set to false. If the name called is "Gap Substrate Seed Survival", then m_bUsesGap is set to true. If the name called is "Microtopographic Substrate Seed Survival", then m_bUsesGap is set to false and m_bUsesMicro is set to true.

Parameters:
cNameString Behavior name from parameter file.

Reimplemented from clBehaviorBase.

void clSubstrateDepSeedSurvival::GetParameterFileData ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Declares arrays and fills them with parameter file data.

If m_bUsesGap is true, all gap substrate favorabilities are also retrieved.

Parameters:
p_oDoc Parsed parameter file.
Exceptions:
modelErr if any of the substrate favorabilities are not between 0 and 1, or if the mound proportion is not between 0 and 1.

void clSubstrateDepSeedSurvival::CalculateSubstrateFavorabilityIndex (  )  [protected]

For each grid cell in the substrate favorability grid, determines its substrate favorability index.

If m_bUsesGap is true, then the gap status is retrieved from the seed grid and the favorability matches the gap status; otherwise, the favorability is calculated with the canopy parameters.

For each grid cell, the favorability index is the sum of the proportions of each substrate multiplied by the favorability of that substrate for the cover condition of that grid cell (canopy or gap).

void clSubstrateDepSeedSurvival::SetupGrids (  )  [protected]

Sets up the grids.

This creates the substrate favorability grid and retrieves a pointer to the dispersed seeds grid.

Exceptions:
modelErr If the "Substrate" grid doesn't exist, or if the "Dispersed Seeds" grid doesn't exist.


Member Data Documentation

clGridBase* clSubstrateDepSeedSurvival::mp_oSubstrateFavGrid [protected]

The grid called "Substrate Favorability" will have a cell resolution matching the "Substrate" grid.

It will contain the substrate favorability index. The grid cell record will consist of (# species) float data members, "Favorability IndexX". It will have a member for each species even if the creating behavior does not apply to all, because another behavior in this run may apply to different species.

It is possible that a grid map will have been read in for this grid; it will be ignored, and any grid created with such a map will be overwritten.

clGridBase* clSubstrateDepSeedSurvival::mp_oSeedGrid [protected]

Pointer to the "Dispersed Seeds" grid created by disperse behaviors.

short int* clSubstrateDepSeedSurvival::mp_iSubstrFavCode [protected]

Data member codes for substrate grid for favorability index.

Array size is # total species.

short int* clSubstrateDepSeedSurvival::mp_iSeedGridCode [protected]

Data member codes for seed grid for number of seeds.

Array size is # total species.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:30:45 2007 for SORTIE Core C++ Documentation by  doxygen 1.5.2