iLand
|
ResourceUnit is the spatial unit that encapsulates a forest stand and links to several environmental components (Climate, Soil, Water, ...). More...
#include <resourceunit.h>
Public Member Functions | |
ResourceUnit (const int index) | |
~ResourceUnit () | |
void | setup () |
setup operations after the creation of the model space. More... | |
void | setSpeciesSet (SpeciesSet *set) |
set species and setup the species-per-RU-data More... | |
void | setClimate (Climate *climate) |
void | setBoundingBox (const QRectF &bb) |
void | setID (const int id) |
const Climate * | climate () const |
link to the climate on this resource unit More... | |
SpeciesSet * | speciesSet () const |
get SpeciesSet this RU links to. More... | |
const WaterCycle * | waterCycle () const |
water model of the unit More... | |
Snag * | snag () const |
access the snag object More... | |
Soil * | soil () const |
access the soil model More... | |
SaplingCell * | saplingCellArray () const |
access the array of sapling-cells More... | |
SaplingCell * | saplingCell (const QPoint &lifCoords) const |
return a pointer to the 2x2m SaplingCell located at 'lif' More... | |
double | saplingCoveredArea (bool below130cm) const |
return the area (m2) which is covered by saplings (cells >0 saplings) if below130cm is false, then only pixels with saplings >1.3m are counted; otherwise pixel are counted when saplings < 1.3m are present or when grass cover is present More... | |
ResourceUnitSpecies & | resourceUnitSpecies (const Species *species) |
get RU-Species-container of species from the RU More... | |
const ResourceUnitSpecies * | constResourceUnitSpecies (const Species *species) const |
get RU-Species-container of species from the RU More... | |
ResourceUnitSpecies * | resourceUnitSpecies (const int species_index) const |
get RU-Species-container with index 'species_index' from the RU More... | |
const QList< ResourceUnitSpecies * > & | ruSpecies () const |
QVector< Tree > & | trees () |
reference to the tree list. More... | |
const QVector< Tree > & | constTrees () const |
reference to the (const) tree list. More... | |
Tree * | tree (const int index) |
get pointer to a tree More... | |
const ResourceUnitVariables & | resouceUnitVariables () const |
access to variables that are specific to resourceUnit (e.g. nitrogenAvailable) More... | |
const StandStatistics & | statistics () const |
int | index () const |
int | id () const |
const QRectF & | boundingBox () const |
const QPoint & | cornerPointOffset () const |
coordinates on the LIF grid of the upper left corner of the RU More... | |
double | area () const |
get the resource unit area in m2 More... | |
double | stockedArea () const |
get the stocked area in m2 More... | |
double | stockableArea () const |
total stockable area in m2 More... | |
double | productiveArea () const |
TotalArea - Unstocked Area - loss due to BeerLambert (m2) More... | |
double | leafAreaIndex () const |
Total Leaf Area Index (m2/m2) of trees>4m. More... | |
double | leafArea () const |
total leaf area of resource unit (m2) More... | |
double | interceptedArea (const double LA, const double LightResponse) |
const double & | LRImodifier () const |
double | averageAging () const |
leaf area weighted average aging More... | |
double | topHeight (bool &rIrregular) const |
calculate the top tree height (as 90th percentile of the top heights on the 10m pixels), 'rIrregular' is set to true when 50% of the area < 50% of topheight More... | |
int | svdStateId () const |
the Id of the state the resource unit is in More... | |
int | svdPreviousStateId () const |
the Id of the state the resource unit was previously in More... | |
int | svdStateTime () const |
the number of years the RU is already in the current state svdStateId() More... | |
int | svdPreviousTime () const |
the number of years that the RU was in the previous state svdPreviousStateId() More... | |
Tree & | newTree () |
returns a modifiable reference to a free space inside the tree-vector. should be used for tree-init. More... | |
int | newTreeIndex () |
returns the index of a newly inserted tree More... | |
void | cleanTreeList () |
remove dead trees from the tree storage. More... | |
void | treeDied () |
sets the flag that indicates that the resource unit contains dead trees More... | |
bool | hasDiedTrees () const |
if true, the resource unit has dead trees and needs maybe some cleanup More... | |
void | addWLA (const float LA, const float LRI) |
addWLA() is called by each tree to aggregate the total weighted leaf area on a unit More... | |
void | addLR (const float LA, const float LightResponse) |
void | calculateInterceptedArea () |
function that distributes effective interception area according to the weight of Light response and LeafArea of the indivudal ( More... | |
void | addTreeAging (const double leaf_area, const double aging_factor) |
aggregate the tree aging values (weighted by leaf area) More... | |
void | addTreeAgingForAllTrees () |
calculate average tree aging for all trees of a RU. Used directly after stand initialization. More... | |
void | countStockedPixel (bool pixelIsStocked) |
void | createStandStatistics () |
helping function to create an initial state for stand statistics More... | |
void | recreateStandStatistics (bool recalculate_stats) |
re-build stand statistics after some change happened to the resource unit More... | |
void | setStockableArea (const double area) |
set stockable area (m2) More... | |
void | setCreateDebugOutput (const bool do_dbg) |
enable/disable output generation for RU More... | |
bool | shouldCreateDebugOutput () const |
is debug output enabled for the RU? More... | |
void | snagNewYear () |
clean transfer pools More... | |
void | calculateCarbonCycle () |
calculate snag dynamics at the end of a year More... | |
void | newYear () |
reset values for a new simulation year More... | |
void | production () |
called after the LIP/LIF calc, before growth of individual trees. Production (3PG), Water-cycle More... | |
void | beforeGrow () |
called before growth of individuals More... | |
void | afterGrow () |
called after the growth of individuals More... | |
void | yearEnd () |
called at the end of a year (after regeneration??) More... | |
Friends | |
class | RUWrapper |
class | SVDStates |
class | SVDStateOut |
class | SVDIndicatorOut |
ResourceUnit is the spatial unit that encapsulates a forest stand and links to several environmental components (Climate, Soil, Water, ...).
A resource unit has a size of (currently) 100x100m. Many processes in iLand operate on the level of a ResourceUnit. Each resource unit has the same Climate and other properties (e.g. available nitrogen). Proceses on this level are, inter alia, NPP Production (see Production3PG), water calculations (WaterCycle), the modeling of dead trees (Snag) and soil processes (Soil).
ResourceUnit::ResourceUnit | ( | const int | index | ) |
ResourceUnit::~ResourceUnit | ( | ) |
|
inline |
|
inline |
aggregate the tree aging values (weighted by leaf area)
void ResourceUnit::addTreeAgingForAllTrees | ( | ) |
calculate average tree aging for all trees of a RU. Used directly after stand initialization.
|
inline |
addWLA() is called by each tree to aggregate the total weighted leaf area on a unit
void ResourceUnit::afterGrow | ( | ) |
called after the growth of individuals
|
inline |
get the resource unit area in m2
|
inline |
leaf area weighted average aging
void ResourceUnit::beforeGrow | ( | ) |
called before growth of individuals
|
inline |
void ResourceUnit::calculateCarbonCycle | ( | ) |
calculate snag dynamics at the end of a year
void ResourceUnit::calculateInterceptedArea | ( | ) |
function that distributes effective interception area according to the weight of Light response and LeafArea of the indivudal (
void ResourceUnit::cleanTreeList | ( | ) |
remove dead trees from the tree storage.
remove dead trees from tree list reduce size of vector if lots of space is free tests showed that this way of cleanup is very fast, because no memory allocations are performed (simple memmove()) when trees are moved.
|
inline |
link to the climate on this resource unit
const ResourceUnitSpecies * ResourceUnit::constResourceUnitSpecies | ( | const Species * | species | ) | const |
get RU-Species-container of species
from the RU
|
inline |
reference to the (const) tree list.
|
inline |
coordinates on the LIF grid of the upper left corner of the RU
|
inline |
void ResourceUnit::createStandStatistics | ( | ) |
helping function to create an initial state for stand statistics
refresh of tree based statistics.
WARNING: this function is only called once (during startup). see function "yearEnd()" above!!!
|
inline |
if true, the resource unit has dead trees and needs maybe some cleanup
|
inline |
|
inline |
|
inline |
|
inline |
total leaf area of resource unit (m2)
|
inline |
Total Leaf Area Index (m2/m2) of trees>4m.
|
inline |
Tree & ResourceUnit::newTree | ( | ) |
returns a modifiable reference to a free space inside the tree-vector. should be used for tree-init.
int ResourceUnit::newTreeIndex | ( | ) |
returns the index of a newly inserted tree
void ResourceUnit::newYear | ( | ) |
reset values for a new simulation year
void ResourceUnit::production | ( | ) |
called after the LIP/LIF calc, before growth of individual trees. Production (3PG), Water-cycle
production() is the "stand-level" part of the biomass production (3PG).
|
inline |
TotalArea - Unstocked Area - loss due to BeerLambert (m2)
void ResourceUnit::recreateStandStatistics | ( | bool | recalculate_stats | ) |
re-build stand statistics after some change happened to the resource unit
recreate statistics.
This is necessary after events that changed the structure of the stand after the growth of trees (where stand statistics are updated). An example is after disturbances.
|
inline |
access to variables that are specific to resourceUnit (e.g. nitrogenAvailable)
|
inline |
get RU-Species-container with index 'species_index' from the RU
ResourceUnitSpecies & ResourceUnit::resourceUnitSpecies | ( | const Species * | species | ) |
get RU-Species-container of species
from the RU
|
inline |
SaplingCell * ResourceUnit::saplingCell | ( | const QPoint & | lifCoords | ) | const |
return a pointer to the 2x2m SaplingCell located at 'lif'
return the sapling cell at given LIF-coordinates
|
inline |
access the array of sapling-cells
double ResourceUnit::saplingCoveredArea | ( | bool | below130cm | ) | const |
return the area (m2) which is covered by saplings (cells >0 saplings) if below130cm
is false, then only pixels with saplings >1.3m are counted; otherwise pixel are counted when saplings < 1.3m are present or when grass cover is present
void ResourceUnit::setBoundingBox | ( | const QRectF & | bb | ) |
|
inline |
|
inline |
enable/disable output generation for RU
|
inline |
void ResourceUnit::setSpeciesSet | ( | SpeciesSet * | set | ) |
set species and setup the species-per-RU-data
|
inline |
set stockable area (m2)
void ResourceUnit::setup | ( | ) |
setup operations after the creation of the model space.
|
inline |
is debug output enabled for the RU?
|
inline |
access the snag object
|
inline |
clean transfer pools
|
inline |
access the soil model
|
inline |
get SpeciesSet this RU links to.
|
inline |
|
inline |
total stockable area in m2
|
inline |
get the stocked area in m2
|
inline |
the Id of the state the resource unit was previously in
|
inline |
the number of years that the RU was in the previous state svdPreviousStateId()
|
inline |
the Id of the state the resource unit is in
|
inline |
the number of years the RU is already in the current state svdStateId()
double ResourceUnit::topHeight | ( | bool & | rIrregular | ) | const |
calculate the top tree height (as 90th percentile of the top heights on the 10m pixels), 'rIrregular' is set to true when 50% of the area < 50% of topheight
|
inline |
get pointer to a tree
|
inline |
sets the flag that indicates that the resource unit contains dead trees
|
inline |
reference to the tree list.
|
inline |
water model of the unit
void ResourceUnit::yearEnd | ( | ) |
called at the end of a year (after regeneration??)
|
friend |
|
friend |
|
friend |
|
friend |