iLand
|
A tree is the basic simulation entity of iLand and represents a single tree. More...
#include <tree.h>
Public Types | |
enum | TreeRemovalType { TreeDeath =0 , TreeHarvest =1 , TreeDisturbance =2 , TreeSalavaged =3 , TreeKilled =4 , TreeCutDown =5 } |
Public Member Functions | |
Tree () | |
void | setup () |
calculates initial values for biomass pools etc. after dimensions are set. More... | |
int | id () const |
numerical unique ID of the tree More... | |
int | age () const |
the tree age (years) More... | |
const QPointF | position () const |
metric coordinates of the tree More... | |
const QPoint | positionIndex () const |
the x/y indicies (2m grid) of the tree More... | |
const Species * | species () const |
pointer to the tree species of the tree. More... | |
const ResourceUnit * | ru () const |
pointer to the ressource unit the tree belongs to. More... | |
float | dbh () const |
dimater at breast height in cm More... | |
float | height () const |
tree height in m More... | |
float | lightResourceIndex () const |
LRI of the tree (updated during readStamp()) More... | |
float | leafArea () const |
leaf area (m2) of the tree More... | |
double | volume () const |
volume (m3) of stem volume based on geometry and density calculated on the fly. More... | |
double | basalArea () const |
basal area of the tree at breast height in m2 More... | |
bool | isDead () const |
returns true if the tree is already dead. More... | |
float | crownRadius () const |
fetch crown radius (m) from the attached stamp More... | |
float | biomassFoliage () const |
mass (kg) of foliage More... | |
float | biomassBranch () const |
mass (kg) of branches More... | |
float | biomassFineRoot () const |
mass (kg) of fine roots More... | |
float | biomassCoarseRoot () const |
mass (kg) of coarse roots More... | |
float | biomassStem () const |
mass (kg) of stem, conceputally stem biomass + reserve pool More... | |
float | biomassReserve () const |
double | barkThickness () const |
mass (kg) of the reserve pool More... | |
float | stressIndex () const |
the scalar stress rating (0..1) More... | |
void | die (TreeGrowthData *d=nullptr) |
the tree dies (is killed) More... | |
void | remove (double removeFoliage=0., double removeBranch=0., double removeStem=0.) |
remove the tree (management). More... | |
void | removeDisturbance (const double stem_to_soil_fraction, const double stem_to_snag_fraction, const double branch_to_soil_fraction, const double branch_to_snag_fraction, const double foliage_to_soil_fraction) |
remove the tree due to an special event (disturbance) the part of the biomass that goes not to soil/snags is removed (e.g. More... | |
void | enableDebugging (const bool enable=true) |
void | removeBiomassOfTree (const double removeFoliageFraction, const double removeBranchFraction, const double removeStemFraction) |
removes fractions (0..1) for foliage, branches, stem, and roots from a tree, e.g. More... | |
void | removeRootBiomass (const double removeFineRootFraction, const double removeCoarseRootFraction) |
remove root biomass of trees (e.g. due to funghi) More... | |
void | setNewId () |
force a new id for this object (after copying trees) More... | |
void | setId (const int id) |
set a spcific ID (if provided in stand init file). More... | |
void | setPosition (const QPointF pos) |
void | setPosition (const QPoint posIndex) |
void | setDbh (const float dbh) |
void | setHeight (const float height) |
void | setSpecies (Species *ts) |
void | setRU (ResourceUnit *ru) |
void | setAge (const int age, const float treeheight) |
void | markForHarvest (bool do_mark) |
bool | isMarkedForHarvest () const |
void | markForCut (bool do_mark) |
bool | isMarkedForCut () const |
void | markCropTree (bool do_mark) |
bool | isMarkedAsCropTree () const |
void | markCropCompetitor (bool do_mark) |
bool | isMarkedAsCropCompetitor () const |
void | setDeathReasonWind () |
void | setDeathReasonBarkBeetle () |
void | setDeathReasonFire () |
void | setDeathCutdown () |
void | setAffectedBite () |
void | setIsHarvested () |
bool | isDeadWind () const |
bool | isDeadBarkBeetle () const |
bool | isDeadFire () const |
bool | isAffectedBite () const |
bool | isCutdown () const |
bool | isHarvested () const |
void | applyLIP () |
apply LightInfluencePattern onto the global grid More... | |
void | readLIF () |
calculate the lightResourceIndex with multiplicative approach More... | |
void | heightGrid () |
calculate the height grid More... | |
void | applyLIP_torus () |
apply LightInfluencePattern on a closed 1ha area More... | |
void | readLIF_torus () |
calculate LRI from a closed 1ha area More... | |
void | heightGrid_torus () |
calculate the height grid More... | |
void | calcLightResponse () |
calculate light response More... | |
void | grow () |
main growth function to update the tree state. More... | |
QString | dump () |
dumps some core variables of a tree to a string. More... | |
void | dumpList (QList< QVariant > &rTargetList) |
const Stamp * | stamp () const |
TODO: only for debugging purposes. More... | |
Static Public Member Functions | |
static void | setGrid (FloatGrid *gridToStamp, Grid< HeightGridValue > *dominanceGrid) |
static void | resetStatistics () |
static int | statPrints () |
static int | statCreated () |
Friends | |
class | TreeWrapper |
class | StandStatistics |
class | TreeOut |
class | TreeRemovedOut |
class | LandscapeRemovedOut |
class | Snapshot |
class | SnapshotItem |
class | ScriptTree |
A tree is the basic simulation entity of iLand and represents a single tree.
Trees in iLand are designed to be lightweight, thus the list of stored properties is limited. Basic properties are dimensions (dbh, height), biomass pools (stem, leaves, roots), the reserve NPP pool. Additionally, the location and species are stored. A Tree has a height of at least 4m; trees below this threshold are covered by the regeneration layer (see Sapling). Trees are stored in lists managed at the resource unit level.
Tree::Tree | ( | ) |
|
inline |
the tree age (years)
void Tree::applyLIP | ( | ) |
apply LightInfluencePattern onto the global grid
void Tree::applyLIP_torus | ( | ) |
apply LightInfluencePattern on a closed 1ha area
Apply LIPs.
This "Torus" functions wraps the influence at the edges of a 1ha simulation area.
double Tree::barkThickness | ( | ) | const |
mass (kg) of the reserve pool
thickness of the bark (cm)
double Tree::basalArea | ( | ) | const |
basal area of the tree at breast height in m2
return the basal area in m2
|
inline |
mass (kg) of branches
|
inline |
mass (kg) of coarse roots
|
inline |
mass (kg) of fine roots
|
inline |
mass (kg) of foliage
|
inline |
|
inline |
mass (kg) of stem, conceputally stem biomass + reserve pool
void Tree::calcLightResponse | ( | ) |
calculate light response
float Tree::crownRadius | ( | ) | const |
fetch crown radius (m) from the attached stamp
|
inline |
dimater at breast height in cm
void Tree::die | ( | TreeGrowthData * | d = nullptr | ) |
the tree dies (is killed)
This function is called if a tree dies.
QString Tree::dump | ( | ) |
dumps some core variables of a tree to a string.
void Tree::dumpList | ( | QList< QVariant > & | rTargetList | ) |
|
inline |
void Tree::grow | ( | ) |
main growth function to update the tree state.
grow() is the main function of the yearly tree growth.
The main steps are:
|
inline |
tree height in m
void Tree::heightGrid | ( | ) |
calculate the height grid
heightGrid() This function calculates the "dominant height field".
This grid is coarser as the fine-scaled light-grid.
void Tree::heightGrid_torus | ( | ) |
calculate the height grid
|
inline |
numerical unique ID of the tree
|
inline |
|
inline |
|
inline |
returns true if the tree is already dead.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
leaf area (m2) of the tree
|
inline |
LRI of the tree (updated during readStamp())
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
metric coordinates of the tree
|
inline |
the x/y indicies (2m grid) of the tree
void Tree::readLIF | ( | ) |
calculate the lightResourceIndex with multiplicative approach
reads the light influence field value for a tree.
The LIF field is scanned within the crown area of the focal tree, and the influence of the focal tree is "subtracted" from the LIF values. Finally, the "LRI correction" is applied. see http://iland-model.org/competition+for+light for details.
void Tree::readLIF_torus | ( | ) |
calculate LRI from a closed 1ha area
Torus version of read stamp (glued edges)
void Tree::remove | ( | double | removeFoliage = 0. , |
double | removeBranch = 0. , |
||
double | removeStem = 0. |
||
) |
remove the tree (management).
remove a tree (most likely due to harvest) from the system.
removalFractions for tree compartments: if 0: all biomass stays in the system, 1: all is "removed" default values: all biomass remains in the forest (i.e.: kill()).
void Tree::removeBiomassOfTree | ( | const double | removeFoliageFraction, |
const double | removeBranchFraction, | ||
const double | removeStemFraction | ||
) |
removes fractions (0..1) for foliage, branches, stem, and roots from a tree, e.g.
remove a part of the biomass of the tree, e.g. due to fire.
due to a fire. values of "0" remove nothing, "1" removes the full compartent.
void Tree::removeDisturbance | ( | const double | stem_to_soil_fraction, |
const double | stem_to_snag_fraction, | ||
const double | branch_to_soil_fraction, | ||
const double | branch_to_snag_fraction, | ||
const double | foliage_to_soil_fraction | ||
) |
remove the tree due to an special event (disturbance) the part of the biomass that goes not to soil/snags is removed (e.g.
remove the tree due to an special event (disturbance) this is +- the same as die().
fire)
stem_to_soil_fraction | (0..1) of stem biomass that is routed to the soil |
stem_to_snag_fraction | (0..1) of the stem biomass continues as standing dead |
branch_to_soil_fraction | (0..1) of branch biomass that is routed to the soil |
branch_to_snag_fraction | (0..1) of the branch biomass continues as standing dead |
foliage_to_soil_fraciton | (0..1) fraction of biomass that goes directly to the soil. The rest (1.-fraction) is removed. |
void Tree::removeRootBiomass | ( | const double | removeFineRootFraction, |
const double | removeCoarseRootFraction | ||
) |
remove root biomass of trees (e.g. due to funghi)
|
static |
|
inline |
pointer to the ressource unit the tree belongs to.
|
inline |
void Tree::setAge | ( | const int | age, |
const float | treeheight | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
void Tree::setHeight | ( | const float | height | ) |
|
inline |
set a spcific ID (if provided in stand init file).
|
inline |
|
inline |
force a new id for this object (after copying trees)
|
inline |
|
inline |
|
inline |
|
inline |
void Tree::setup | ( | ) |
calculates initial values for biomass pools etc. after dimensions are set.
|
inline |
pointer to the tree species of the tree.
|
inline |
TODO: only for debugging purposes.
|
inlinestatic |
|
inlinestatic |
|
inline |
the scalar stress rating (0..1)
double Tree::volume | ( | ) | const |
volume (m3) of stem volume based on geometry and density calculated on the fly.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |