20#ifndef STANDSTATISTICS_H
21#define STANDSTATISTICS_H
44 double count()
const {
return mCount; }
45 double dbh_avg()
const {
return mAverageDbh; }
47 double volume()
const {
return mSumVolume; }
48 double gwl()
const {
return mGWL;}
52 double npp()
const {
return mNPP; }
55 int cohortCount()
const {
return static_cast<int>(mCohortCount); }
56 int saplingCount()
const {
return static_cast<int>(mSaplingCount); }
60 double cStem()
const {
return mCStem; }
61 double nStem()
const {
return mNStem; }
62 double cBranch()
const {
return mCBranch; }
63 double nBranch()
const {
return mNBranch; }
73 double totalCarbon()
const {
return mCStem + mCBranch + mCFoliage + mCFineRoot + mCCoarseRoot + mCRegeneration; }
76 inline void addBiomass(
const double biomass,
const double CNRatio,
double *C,
double *N);
85 double mAverageHeight;
86 double mLeafAreaIndex;
93 double mSumSaplingAge;
94 double mAverageSaplingAge;
96 double mBasalAreaSaplings;
98 double mCStem, mCFoliage, mCBranch, mCCoarseRoot, mCFineRoot;
99 double mNStem, mNFoliage, mNBranch, mNCoarseRoot, mNFineRoot;
100 double mCRegeneration, mNRegeneration;
The class contains data available at ResourceUnit x Species scale.
Definition: resourceunitspecies.h:34
The SaplingStat class stores statistics on the resource unit x species level.
Definition: saplings.h:132
Collects information on stand level for each tree species.
Definition: standstatistics.h:28
void calculate()
call after all trees are processed (postprocessing)
Definition: standstatistics.cpp:112
double basalArea() const
sum of basal area of all trees (m2/ha)
Definition: standstatistics.h:49
void add(const StandStatistics &stat)
add aggregates of stat to own aggregates
Definition: standstatistics.cpp:169
double nStem() const
Definition: standstatistics.h:61
double nBranch() const
Definition: standstatistics.h:63
double cBranch() const
Definition: standstatistics.h:62
void clearOnlyTrees()
clear the statistics only for tree biomass (keep NPP, regen, ...)
Definition: standstatistics.cpp:59
double count() const
Definition: standstatistics.h:44
double nRegeneration() const
Definition: standstatistics.h:71
double nppSaplings() const
carbon gain of saplings (kg Biomass increment)/ha
Definition: standstatistics.h:54
double cRegeneration() const
Definition: standstatistics.h:70
double cCoarseRoot() const
Definition: standstatistics.h:66
double totalCarbon() const
total carbon stock: sum of carbon of all living trees + regeneration layer
Definition: standstatistics.h:73
double height_avg() const
average tree height (m)
Definition: standstatistics.h:46
double gwl() const
total increment (m3/ha)
Definition: standstatistics.h:48
double nFoliage() const
Definition: standstatistics.h:65
double cFoliage() const
Definition: standstatistics.h:64
void addNPP(const TreeGrowthData *tgd)
add only the NPP
Definition: standstatistics.cpp:103
double nppAbove() const
above ground NPP (kg Biomass increment)/ha
Definition: standstatistics.h:53
void calculateAreaWeighted()
call after a series of addAreaWeighted
Definition: standstatistics.cpp:153
int saplingCount() const
number individuals in regeneration layer (represented by "cohortCount" cohorts) N/ha
Definition: standstatistics.h:56
void addAreaWeighted(const StandStatistics &stat, const double weight)
add aggregates of stat to this aggregate and scale using the weight (e.g. stockable area)
Definition: standstatistics.cpp:197
double nCoarseRoot() const
Definition: standstatistics.h:67
double saplingAge() const
average age of sapling (currenty not weighted with represented sapling numbers...)
Definition: standstatistics.h:57
double cStem() const
Definition: standstatistics.h:60
StandStatistics()
Definition: standstatistics.h:30
int cohortCount() const
number of cohorts of saplings / ha
Definition: standstatistics.h:55
void setResourceUnitSpecies(const ResourceUnitSpecies *rus)
Definition: standstatistics.h:31
double leafAreaIndex() const
[m2/m2]/ha stocked area (trees > 4m)
Definition: standstatistics.h:50
double cFineRoot() const
Definition: standstatistics.h:68
double saplingBasalArea() const
total basal area (m2) of saplings (>1.3m)
Definition: standstatistics.h:58
double nFineRoot() const
Definition: standstatistics.h:69
double volume() const
sum of tree volume (m3/ha)
Definition: standstatistics.h:47
double leafAreaIndexSaplings() const
m2/m2 LAI of sapling layer
Definition: standstatistics.h:51
double npp() const
sum. of NPP (kg Biomass increment, above+belowground, trees >4m)/ha
Definition: standstatistics.h:52
double dbh_avg() const
average dbh (cm)
Definition: standstatistics.h:45
void clear()
call before trees are aggregated
Definition: standstatistics.cpp:39
holds a couple of system statistics primarily aimed for performance and memory analyis.
Definition: standstatistics.h:107
int treeCount
Definition: standstatistics.h:115
double tEstablishment
Definition: standstatistics.h:125
int saplingCount
Definition: standstatistics.h:116
int newSaplings
Definition: standstatistics.h:117
double tWriteOutput
Definition: standstatistics.h:127
double tTreeGrowth
Definition: standstatistics.h:122
void writeOutput()
Definition: standstatistics.cpp:251
double tReadPattern
Definition: standstatistics.h:121
void reset()
Definition: standstatistics.h:110
double tSapling
Definition: standstatistics.h:124
double tSeedDistribution
Definition: standstatistics.h:123
double tApplyPattern
Definition: standstatistics.h:120
SystemStatistics()
Definition: standstatistics.h:109
double tTotalYear
Definition: standstatistics.h:128
double tManagement
Definition: standstatistics.h:119
double tCarbonCycle
Definition: standstatistics.h:126
A tree is the basic simulation entity of iLand and represents a single tree.
Definition: tree.h:44
internal data structure which is passed between function and to statistics
Definition: tree.h:257