clNCIJuvenileGrowth Class Reference

NCI juvenile growth - Version 1. More...

#include <NCIJuvenileGrowth.h>

Inheritance diagram for clNCIJuvenileGrowth:

clGrowthBase clBehaviorBase clWorkerBase

List of all members.

Public Member Functions

 clNCIJuvenileGrowth (clSimManager *p_oSimManager)
 Constructor.
 ~clNCIJuvenileGrowth ()
 Destructor.
float CalcDiameterGrowthValue (clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth)
 Returns the value in the tree's float data member that holds the value that was calculated by PreGrowthCalcs().
void PreGrowthCalcs (clTreePopulation *p_oPop)
 Calculates growth for all NCI trees.
void DoShellSetup (xercesc::DOMDocument *p_oDoc)
 Does setup.
void SetNameData (char *cNameString)
 Captures the namestring passed to this behavior.

Protected Member Functions

float CalculateNCI (clTree *p_oTree, clTreePopulation *p_oPop, clAllometry *p_oAllom, clPlot *p_oPlot)
 Calculates the NCI value for a tree.
void ValidateData ()
 Makes sure all input data is valid.
void GetTreeMemberCodes ()
 Gets the return codes for needed tree data members.
void ReadParameterFile (xercesc::DOMDocument *p_oDoc)
 Reads data from the parameter file.
void AssembleUniqueTypes ()
 Assembles a unique list of types applied to this behavior and places it in mp_iWhatBehaviorTypes.

Protected Attributes

short int ** mp_iGrowthCodes
 Holds return data codes for the "Growth" tree data member.
short int * mp_iWhatBehaviorTypes
 List of types managed by this behavior.
short int m_iNumBehaviorTypes
 Number of types managed by this behavior.
float ** mp_fLambda
 Lamba for NCI.
float * mp_fAlpha
 Neighbor diam10 effect.
float * mp_fBeta
 Neighbor distance effect.
float * mp_fCrowdingSlope
 Crowding effect slope.
float * mp_fCrowdingSteepness
 Crowding effect steepness.
float * mp_fMinimumNeighborDiam10
 The minimum Diam10, in cm, of neighbors to be included in NCI calculations.
float * mp_fSizeEffectA
 Size effect "a" parameter.
float * mp_fSizeEffectB
 Size effect "b" parameter.
float * mp_fMaxGrowth
 Maximum growth, cm/yr.
float * mp_fMaxCrowdingRadius
 Maximum search radius, in meters, in which to look for crowding neighbors.
float m_fDiam10Divisor
 The value to divide diam10 by in NCI.
short int * mp_iIndexes
 Speeds access to the arrays.
bool m_bIncludeSnags
 Whether or not to include snags in NCI.


Detailed Description

NCI juvenile growth - Version 1.

This is a growth shell object which applies a variant on the NCI (neighborhood competition index) function designed for juvenile trees.

Growth per year is Growth = Max Growth * Size Effect * Crowding Effect. The amount of growth is in cm/year. For multi-year timesteps, the behavior will calculate total growth with a loop. Each loop iteration will increment DBH for one year. For each year, the Size Effect (SE) value is recalculated with the previous year's new DBH value. All values for each year of growth are summed to get the growth for the timestep.

Size Effect = a * d10 ^ b, where d10 is diameter at 10 cm height. Crowding Effect = exp(-C * NCI ^ D). NCI is calculated with d10, not DBH, even for adults; the d10 - DBH conversion equation will be used with the sapling parameters.

This can only be applied to seedlings and saplings. An error will be thrown otherwise.

The parameter file call string for this to be diameter-incrementing with auto-height updating is "NCI Juvenile Growth"; for diameter-only incrementing, use "NCI Juvenile Growth diam only". The namestring for this behavior is "ncijuvenilegrowthshell".

Copyright 2010 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
March 23, 2010 - Created (LEM)

Constructor & Destructor Documentation

clNCIJuvenileGrowth::clNCIJuvenileGrowth ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.

clNCIJuvenileGrowth::~clNCIJuvenileGrowth (  ) 

Destructor.


Member Function Documentation

float clNCIJuvenileGrowth::CalcDiameterGrowthValue ( clTree p_oTree,
clTreePopulation p_oPop,
float  fHeightGrowth 
) [virtual]

Returns the value in the tree's float data member that holds the value that was calculated by PreGrowthCalcs().

Parameters:
p_oTree Tree to which to apply growth.
p_oPop Tree population object.
fHeightGrowth Amount of height growth, in m (ignored).
Returns:
Amount of diameter growth, in cm.

Reimplemented from clGrowthBase.

void clNCIJuvenileGrowth::PreGrowthCalcs ( clTreePopulation p_oPop  )  [virtual]

Calculates growth for all NCI trees.

The values are stashed in the "Growth" tree float data member for later application.

Steps:

  1. Get all trees for this behavior.
  2. For each tree, calculate NCIi by calling the function in the function pointer NCI. Stash the value in "Growth" for each tree.
  3. Go through all the NCI trees again. Calculate the amount of growth for each using the equations above. Use the function pointers to make sure that the proper function forms are used. Stash the end result in "Growth".
This must be called first of any growth stuff, since it uses other trees' DBHs to calculate NCI, and these must be before growth has been applied.

Growth per timestep is calculated by looping over the number of years per timestep and incrementing the DBH.

Parameters:
p_oPop Tree population object.

Reimplemented from clGrowthBase.

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

Does setup.

  1. AssembleUniqueTypes() is called to create a list of unique behavior types.
  2. ReadParameterFile() is called to read the parameter file's data.
  3. ValidateData() is called to validate the data.
  4. GetTreeMemberCodes() is called to get tree data return codes.
  5. SetFunctionPointers() is called to set up our function pointers.

Parameters:
p_oDoc DOM tree of parsed input tree.

Reimplemented from clGrowthBase.

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

Captures the namestring passed to this behavior.

This is overridden from clBehaviorBase so we can capture the namestring passed. Since this class can create multiple kinds of behaviors that function differently, this will capture what kind of behavior this is supposed to be.

Parameters:
cNameString Behavior's namestring.

Reimplemented from clBehaviorBase.

float clNCIJuvenileGrowth::CalculateNCI ( clTree p_oTree,
clTreePopulation p_oPop,
clAllometry p_oAllom,
clPlot p_oPlot 
) [protected]

Calculates the NCI value for a tree.

NCIi = Σ λk((D10k/q)α/distanceβ)
Parameters:
p_oTree Tree for which to calculate NCI.
p_oPop Tree population object.
p_oAllom Allometry object.
p_oPlot Plot object.
Returns:
NCI value.

void clNCIJuvenileGrowth::ValidateData (  )  [protected]

Makes sure all input data is valid.

The following must all be true:

  • Max radius of neighbor effects must be >= 0
  • Max growth for each species must be > 0
  • DBH divisor must be > 0
Exceptions:
modelErr if any of the above conditions are not met.

void clNCIJuvenileGrowth::GetTreeMemberCodes (  )  [protected]

Gets the return codes for needed tree data members.

Exceptions:
modelErr if a code comes back -1 for any species/type combo to which this behavior is applied.

void clNCIJuvenileGrowth::ReadParameterFile ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Reads data from the parameter file.

Parameters:
p_oDoc DOM tree of parsed input tree.
Exceptions:
modelErr if this behavior has been applied to any types except sapling and seedling.

void clNCIJuvenileGrowth::AssembleUniqueTypes (  )  [protected]

Assembles a unique list of types applied to this behavior and places it in mp_iWhatBehaviorTypes.


Member Data Documentation

short int** clNCIJuvenileGrowth::mp_iGrowthCodes [protected]

Holds return data codes for the "Growth" tree data member.

Array size is number of species to which this behavior applies by 2 (seedlings and saplings).

List of types managed by this behavior.

Number of types managed by this behavior.

float** clNCIJuvenileGrowth::mp_fLambda [protected]

Lamba for NCI.

Array is sized number of behavior species by number of total species. This array is accessed by using the species number as an array index.

float* clNCIJuvenileGrowth::mp_fAlpha [protected]

Neighbor diam10 effect.

α variable in Crowding Effect equation. Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

float* clNCIJuvenileGrowth::mp_fBeta [protected]

Neighbor distance effect.

β variable in Crowding Effect equation. Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

Crowding effect slope.

C in Crowding Effect equation. Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

Crowding effect steepness.

D in Crowding Effect equation. Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

The minimum Diam10, in cm, of neighbors to be included in NCI calculations.

Array is sized total number of species.

Size effect "a" parameter.

Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

Size effect "b" parameter.

Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

Maximum growth, cm/yr.

Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

Maximum search radius, in meters, in which to look for crowding neighbors.

For calculating the Crowding Effect. Array is sized number of species to which this behavior applies. This array is accessed by using the index returned for mp_iIndexes[species number].

The value to divide diam10 by in NCI.

q in the NCI equation above. May be set to 1.

short int* clNCIJuvenileGrowth::mp_iIndexes [protected]

Speeds access to the arrays.

Array size is is number of species.

Whether or not to include snags in NCI.


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

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