iLand
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
Tree Class Reference

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 Speciesspecies () const
 pointer to the tree species of the tree. More...
 
const ResourceUnitru () 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 Stampstamp () 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
 

Detailed Description

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.

Member Enumeration Documentation

◆ TreeRemovalType

Enumerator
TreeDeath 
TreeHarvest 
TreeDisturbance 
TreeSalavaged 
TreeKilled 
TreeCutDown 

Constructor & Destructor Documentation

◆ Tree()

Tree::Tree ( )

Member Function Documentation

◆ age()

int Tree::age ( ) const
inline

the tree age (years)

◆ applyLIP()

void Tree::applyLIP ( )

apply LightInfluencePattern onto the global grid

◆ applyLIP_torus()

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.

◆ barkThickness()

double Tree::barkThickness ( ) const

mass (kg) of the reserve pool

thickness of the bark (cm)

◆ basalArea()

double Tree::basalArea ( ) const

basal area of the tree at breast height in m2

return the basal area in m2

◆ biomassBranch()

float Tree::biomassBranch ( ) const
inline

mass (kg) of branches

◆ biomassCoarseRoot()

float Tree::biomassCoarseRoot ( ) const
inline

mass (kg) of coarse roots

◆ biomassFineRoot()

float Tree::biomassFineRoot ( ) const
inline

mass (kg) of fine roots

◆ biomassFoliage()

float Tree::biomassFoliage ( ) const
inline

mass (kg) of foliage

◆ biomassReserve()

float Tree::biomassReserve ( ) const
inline

◆ biomassStem()

float Tree::biomassStem ( ) const
inline

mass (kg) of stem, conceputally stem biomass + reserve pool

◆ calcLightResponse()

void Tree::calcLightResponse ( )

calculate light response

◆ crownRadius()

float Tree::crownRadius ( ) const

fetch crown radius (m) from the attached stamp

◆ dbh()

float Tree::dbh ( ) const
inline

dimater at breast height in cm

◆ die()

void Tree::die ( TreeGrowthData d = nullptr)

the tree dies (is killed)

This function is called if a tree dies.

See also
ResourceUnit::cleanTreeList(), remove()

◆ dump()

QString Tree::dump ( )

dumps some core variables of a tree to a string.

◆ dumpList()

void Tree::dumpList ( QList< QVariant > &  rTargetList)

◆ enableDebugging()

void Tree::enableDebugging ( const bool  enable = true)
inline

◆ grow()

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:

◆ height()

float Tree::height ( ) const
inline

tree height in m

◆ heightGrid()

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.

◆ heightGrid_torus()

void Tree::heightGrid_torus ( )

calculate the height grid

◆ id()

int Tree::id ( ) const
inline

numerical unique ID of the tree

◆ isAffectedBite()

bool Tree::isAffectedBite ( ) const
inline

◆ isCutdown()

bool Tree::isCutdown ( ) const
inline

◆ isDead()

bool Tree::isDead ( ) const
inline

returns true if the tree is already dead.

◆ isDeadBarkBeetle()

bool Tree::isDeadBarkBeetle ( ) const
inline

◆ isDeadFire()

bool Tree::isDeadFire ( ) const
inline

◆ isDeadWind()

bool Tree::isDeadWind ( ) const
inline

◆ isHarvested()

bool Tree::isHarvested ( ) const
inline

◆ isMarkedAsCropCompetitor()

bool Tree::isMarkedAsCropCompetitor ( ) const
inline

◆ isMarkedAsCropTree()

bool Tree::isMarkedAsCropTree ( ) const
inline

◆ isMarkedForCut()

bool Tree::isMarkedForCut ( ) const
inline

◆ isMarkedForHarvest()

bool Tree::isMarkedForHarvest ( ) const
inline

◆ leafArea()

float Tree::leafArea ( ) const
inline

leaf area (m2) of the tree

◆ lightResourceIndex()

float Tree::lightResourceIndex ( ) const
inline

LRI of the tree (updated during readStamp())

◆ markCropCompetitor()

void Tree::markCropCompetitor ( bool  do_mark)
inline

◆ markCropTree()

void Tree::markCropTree ( bool  do_mark)
inline

◆ markForCut()

void Tree::markForCut ( bool  do_mark)
inline

◆ markForHarvest()

void Tree::markForHarvest ( bool  do_mark)
inline

◆ position()

const QPointF Tree::position ( ) const
inline

metric coordinates of the tree

◆ positionIndex()

const QPoint Tree::positionIndex ( ) const
inline

the x/y indicies (2m grid) of the tree

◆ readLIF()

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.

◆ readLIF_torus()

void Tree::readLIF_torus ( )

calculate LRI from a closed 1ha area

Torus version of read stamp (glued edges)

◆ remove()

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()).

◆ removeBiomassOfTree()

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.

◆ removeDisturbance()

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)

Parameters
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.

◆ removeRootBiomass()

void Tree::removeRootBiomass ( const double  removeFineRootFraction,
const double  removeCoarseRootFraction 
)

remove root biomass of trees (e.g. due to funghi)

◆ resetStatistics()

void Tree::resetStatistics ( )
static

◆ ru()

const ResourceUnit * Tree::ru ( ) const
inline

pointer to the ressource unit the tree belongs to.

◆ setAffectedBite()

void Tree::setAffectedBite ( )
inline

◆ setAge()

void Tree::setAge ( const int  age,
const float  treeheight 
)

◆ setDbh()

void Tree::setDbh ( const float  dbh)
inline

◆ setDeathCutdown()

void Tree::setDeathCutdown ( )
inline

◆ setDeathReasonBarkBeetle()

void Tree::setDeathReasonBarkBeetle ( )
inline

◆ setDeathReasonFire()

void Tree::setDeathReasonFire ( )
inline

◆ setDeathReasonWind()

void Tree::setDeathReasonWind ( )
inline

◆ setGrid()

void Tree::setGrid ( FloatGrid gridToStamp,
Grid< HeightGridValue > *  dominanceGrid 
)
static

◆ setHeight()

void Tree::setHeight ( const float  height)

◆ setId()

void Tree::setId ( const int  id)
inline

set a spcific ID (if provided in stand init file).

◆ setIsHarvested()

void Tree::setIsHarvested ( )
inline

◆ setNewId()

void Tree::setNewId ( )
inline

force a new id for this object (after copying trees)

◆ setPosition() [1/2]

void Tree::setPosition ( const QPoint  posIndex)
inline

◆ setPosition() [2/2]

void Tree::setPosition ( const QPointF  pos)
inline

◆ setRU()

void Tree::setRU ( ResourceUnit ru)
inline

◆ setSpecies()

void Tree::setSpecies ( Species ts)
inline

◆ setup()

void Tree::setup ( )

calculates initial values for biomass pools etc. after dimensions are set.

◆ species()

const Species * Tree::species ( ) const
inline

pointer to the tree species of the tree.

◆ stamp()

const Stamp * Tree::stamp ( ) const
inline

TODO: only for debugging purposes.

◆ statCreated()

static int Tree::statCreated ( )
inlinestatic

◆ statPrints()

static int Tree::statPrints ( )
inlinestatic

◆ stressIndex()

float Tree::stressIndex ( ) const
inline

the scalar stress rating (0..1)

◆ volume()

double Tree::volume ( ) const

volume (m3) of stem volume based on geometry and density calculated on the fly.

See also
Species::volumeFactor() for details

Friends And Related Function Documentation

◆ LandscapeRemovedOut

friend class LandscapeRemovedOut
friend

◆ ScriptTree

friend class ScriptTree
friend

◆ Snapshot

friend class Snapshot
friend

◆ SnapshotItem

friend class SnapshotItem
friend

◆ StandStatistics

friend class StandStatistics
friend

◆ TreeOut

friend class TreeOut
friend

◆ TreeRemovedOut

friend class TreeRemovedOut
friend

◆ TreeWrapper

friend class TreeWrapper
friend

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