Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1014 | werner | 1 | /******************************************************************************************** |
2 | ** iLand - an individual based forest landscape and disturbance model |
||
3 | ** http://iland.boku.ac.at |
||
4 | ** Copyright (C) 2009- Werner Rammer, Rupert Seidl |
||
5 | ** |
||
6 | ** This program is free software: you can redistribute it and/or modify |
||
7 | ** it under the terms of the GNU General Public License as published by |
||
8 | ** the Free Software Foundation, either version 3 of the License, or |
||
9 | ** (at your option) any later version. |
||
10 | ** |
||
11 | ** This program is distributed in the hope that it will be useful, |
||
12 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
13 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
14 | ** GNU General Public License for more details. |
||
15 | ** |
||
16 | ** You should have received a copy of the GNU General Public License |
||
17 | ** along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
18 | ********************************************************************************************/ |
||
19 | |||
20 | #include "barkbeetleout.h" |
||
21 | #include "barkbeetlemodule.h" |
||
22 | |||
1095 | werner | 23 | /** @class BarkBeetleOut |
24 | @ingroup beetlemodule |
||
25 | BarkBeetleOut handles the database output of the bark beetle module. Note that grid-based outputs are also available via Javascript. |
||
26 | |||
27 | */ |
||
28 | |||
1014 | werner | 29 | BarkBeetleOut::BarkBeetleOut() |
30 | { |
||
31 | mBB = 0; |
||
32 | setName("BarkBeetle module output", "barkbeetle"); |
||
33 | setDescription("Barkbeetle related outputs per year. "\ |
||
34 | "The outputs are created after each year (or spread event) and contain information about bark beetle generations, spread and damage for the total landscape.\n " \ |
||
35 | "For spatially explicit outputs, see also the script functions for extracting gridded data."); |
||
36 | columns() << OutputColumn::year() |
||
1021 | werner | 37 | << OutputColumn("initialInfestedArea_ha", "Area of infested pixels (ha) at the start of the iteration (i.e. before winter mortality or background activation happen).", OutDouble) |
38 | << OutputColumn("backgroundMortality_ha", "Area of infested pixels (ha) that die due to winter mortality.", OutDouble) |
||
39 | << OutputColumn("backgroundActivation_ha", "Area of (not infested) pixels (ha) that are 'ignited' and consequently a source of bark beetles.", OutDouble) |
||
1066 | werner | 40 | << OutputColumn("stormActivation_ha", "Area of (not infested) pixels (ha) that are 'ignited' by storm and consequently infested.", OutDouble) |
1021 | werner | 41 | << OutputColumn("spreadCohorts", "Number of bark beetle 'packages' (x1000) that are spread from the source pixels (kilo-cohorts).", OutDouble) |
42 | << OutputColumn("landedCohorts", "Number of bark beetle 'packages' (x1000) that reach potential hosts (cohorts x 1000).", OutDouble) |
||
43 | << OutputColumn("landedArea_ha", "Area (ha) of potential host trees where bark beetles landed.", OutDouble) |
||
1024 | werner | 44 | << OutputColumn("infestedArea_ha", "Area (ha) of newly infected host pixels.", OutDouble) |
1157 | werner | 45 | << OutputColumn("killedArea_ha", "Area (ha) with trees killed by bark beetles (sum of 10m cells with dead trees).", OutDouble) |
1056 | werner | 46 | << OutputColumn("killedTrees", "total number of Norway spruce trees that were killed in this iteration.", OutDouble) |
1157 | werner | 47 | << OutputColumn("killedBasalArea", "Total Basal Area of killed trees in the current year.", OutDouble) |
48 | << OutputColumn("killedVolume", "Total volume of killed trees in the current year.", OutDouble); |
||
1014 | werner | 49 | |
50 | |||
51 | } |
||
52 | |||
53 | |||
54 | void BarkBeetleOut::exec() |
||
55 | { |
||
1021 | werner | 56 | const double area_factor = 0.01; // area in ha of one pixel |
1014 | werner | 57 | *this << currentYear(); |
1066 | werner | 58 | *this << mBB->stats.infestedStart*area_factor << mBB->stats.NWinterMortality*area_factor << mBB->stats.infestedBackground*area_factor << mBB->stats.infestedStorm*area_factor; |
1042 | werner | 59 | |
1021 | werner | 60 | *this << mBB->stats.NCohortsSpread * 0.001 << mBB->stats.NCohortsLanded*0.001 << mBB->stats.NPixelsLanded*area_factor; |
61 | *this << mBB->stats.NInfested*area_factor; |
||
1157 | werner | 62 | *this << mBB->stats.NAreaKilled*area_factor; |
63 | *this << mBB->stats.NTreesKilled << mBB->stats.BasalAreaKilled << mBB->stats.VolumeKilled; |
||
1014 | werner | 64 | |
65 | writeRow(); |
||
66 | } |
||
67 | |||
68 | void BarkBeetleOut::setup() |
||
69 | { |
||
70 | |||
71 | } |
||
72 |