#include <MerchantableStemWoodVolume.h>
Public Member Functions | |
clMerchantableStemWoodVolume (clSimManager *p_oSimManager) | |
Constructor. | |
~clMerchantableStemWoodVolume () | |
Destructor. | |
void | Action () |
Makes volume calculations. | |
void | GetData (xercesc::DOMDocument *p_oDoc) |
Does setup for this behavior. | |
void | RegisterTreeDataMembers () |
Registers the "FIA_volume" float data member. | |
Protected Attributes | |
float * | mp_fB1 |
B1 in the stem fraction equation. | |
float * | mp_fB2 |
B2 in the stem fraction equation. | |
float * | mp_fSpgr |
WOOD_SPGR_GREENVOL_DRYWT in the volume equation. | |
int * | mp_iIndexes |
Helps with array access. | |
char * | m_cQuery |
String to pass to clTreePopulation::Find() in order to get the trees for which to calculate biomass. | |
short int * | mp_iVolumeCodes |
Holds data member codes for "FIA_Volume" float data member. | |
short int * | mp_iBiomassCodes |
Holds data member codes for "Biomass" float data member. |
This class calculates merchantable wood volume from the FIADB manual. This uses as an input biomass as calculated by the class clDimensionAnalysis.
volume (ft3) of merchantable stem wood (not bark) = merchantable stem wood biomass (pounds) / WOOD_SPGR_GREENVOL_DRYWT, where WOOD_SPGR_GREENVOL_DRYWT is a parameter.
Merchantable stem wood biomass = Biomass stem fraction * biomass * conversion factor from Mg to pounds. Biomass is the value calculated by clDimensionAnalysis.
Biomass stem fraction = exp(B1 + B2/DBH), where DBH is in cm and B1 and B2 are parameters.
This creates a new tree float data member called "FIA_volume".
The name string and parameter file call string for this behavior are both "FIA Merchantable Stem Wood Volume".
This behavior may only be applied to adults.
NOTE: Merchantable stem wood volume was put off to probably occur in a post-hoc analysis tool.
Copyright 2010 Charles D. Canham.
clMerchantableStemWoodVolume::clMerchantableStemWoodVolume | ( | clSimManager * | p_oSimManager | ) |
clMerchantableStemWoodVolume::~clMerchantableStemWoodVolume | ( | ) |
Destructor.
Deletes arrays.
void clMerchantableStemWoodVolume::Action | ( | ) | [virtual] |
Makes volume calculations.
A query is sent to the tree population to get all trees to which this behavior is applied. For each, the stem wood volume is calculated and the value is placed in the "FIA_volume" float tree data member.
Reimplemented from clBehaviorBase.
void clMerchantableStemWoodVolume::GetData | ( | xercesc::DOMDocument * | p_oDoc | ) | [virtual] |
Does setup for this behavior.
Steps:
p_oDoc | DOM tree of parsed input file. |
modelErr | If any tree does not have the "Biomass" float data member registered |
Implements clWorkerBase.
void clMerchantableStemWoodVolume::RegisterTreeDataMembers | ( | ) | [virtual] |
Registers the "FIA_volume" float data member.
The return codes are captured in the mp_iVolumeCodes array.
modelErr | if this behavior is being applied to any tree type except adults. |
Reimplemented from clBehaviorBase.
float* clMerchantableStemWoodVolume::mp_fB1 [protected] |
B1 in the stem fraction equation.
Array size is # species to which this behavior applies.
float* clMerchantableStemWoodVolume::mp_fB2 [protected] |
B2 in the stem fraction equation.
Array size is # species to which this behavior applies.
float* clMerchantableStemWoodVolume::mp_fSpgr [protected] |
WOOD_SPGR_GREENVOL_DRYWT in the volume equation.
Array size is # species to which this behavior applies.
int* clMerchantableStemWoodVolume::mp_iIndexes [protected] |
Helps with array access.
Array size is number of total species.
char* clMerchantableStemWoodVolume::m_cQuery [protected] |
String to pass to clTreePopulation::Find() in order to get the trees for which to calculate biomass.
This will instigate a species/type search for all the species and types to which this behavior applies.
short int* clMerchantableStemWoodVolume::mp_iVolumeCodes [protected] |
Holds data member codes for "FIA_Volume" float data member.
Array index is # species to which this behavior applies.
short int* clMerchantableStemWoodVolume::mp_iBiomassCodes [protected] |
Holds data member codes for "Biomass" float data member.
Array index is # species to which this behavior applies.