Rev 277 | Rev 369 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | |||
247 | werner | 2 | /** @class ResourceUnitSpecies |
3 | The class contains data available at ResourceUnit x Species scale. |
||
111 | Werner | 4 | Data stored is either statistical (i.e. number of trees per species) or used |
5 | within the model (e.g. fraction of utilizable Radiation) |
||
6 | */ |
||
7 | #include "global.h" |
||
189 | iland | 8 | #include "resourceunitspecies.h" |
111 | Werner | 9 | |
10 | #include "species.h" |
||
189 | iland | 11 | #include "resourceunit.h" |
235 | werner | 12 | void ResourceUnitSpecies::setup(Species *species, ResourceUnit *ru) |
13 | { |
||
14 | mSpecies = species; |
||
15 | mRU = ru; |
||
16 | mResponse.setup(this); |
||
17 | m3PG.setResponse(&mResponse); |
||
18 | mStatistics.setResourceUnitSpecies(this); |
||
277 | werner | 19 | mStatisticsDead.setResourceUnitSpecies(this); |
278 | werner | 20 | mStatisticsMgmt.setResourceUnitSpecies(this); |
277 | werner | 21 | mRemovedGrowth = 0.; |
235 | werner | 22 | } |
111 | Werner | 23 | |
24 | |||
226 | werner | 25 | void ResourceUnitSpecies::calculate() |
26 | { |
||
27 | mResponse.calculate();///< calculate environmental responses per species (vpd, temperature, ...) |
||
28 | m3PG.calculate();///< production of NPP |
||
29 | } |
||
277 | werner | 30 | |
31 | |||
32 | void ResourceUnitSpecies::updateGWL() |
||
33 | { |
||
34 | // removed growth is the running sum of all removed |
||
35 | // tree volume. the current "GWL" therefore is current volume (standing) + mRemovedGrowth. |
||
278 | werner | 36 | mRemovedGrowth+=statisticsDead().volume() + statisticsMgmt().volume(); |
277 | werner | 37 | } |