Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1054 | 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 "windout.h" |
||
21 | |||
22 | WindOut::WindOut() |
||
23 | { |
||
24 | mWM = 0; |
||
25 | setName("Wind disturbance module output", "wind"); |
||
26 | setDescription("Wind related output generated by event (typically per year). "\ |
||
27 | "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 " \ |
||
28 | "For spatially explicit outputs, see also the script functions for extracting gridded data."); |
||
29 | columns() << OutputColumn::year() |
||
30 | << OutputColumn("iterations", "Number of iterations of the storm event. Translate to duration by multiplying with 'durationPerIteration'.", OutInteger) |
||
31 | << OutputColumn("windspeed_ms", "Wind speed of the event in m/s (note that windspeed varies with topography and between interations).", OutDouble) |
||
32 | << OutputColumn("direction", "Main wind direction of the event in degrees (0°: north, 90°: east, 180°: south, 270°: west).", OutDouble) |
||
33 | << OutputColumn("area_ha", "Total area affected (sum of area of pixels with affected trees)", OutDouble) |
||
34 | << OutputColumn("killedTrees", "total number of trees that were killed in the event.", OutDouble) |
||
1060 | werner | 35 | << OutputColumn("killedBasalArea", "Total Basal Area (m2) of killed during the event.", OutDouble) |
36 | << OutputColumn("killedVolume", "Sum of tree volume (m3) killed during the event.", OutDouble); |
||
1054 | werner | 37 | |
38 | |||
39 | } |
||
40 | |||
41 | WindOut::~WindOut() |
||
42 | { |
||
43 | |||
44 | } |
||
45 | |||
46 | void WindOut::exec() |
||
47 | { |
||
48 | if (!mWM) |
||
49 | return; |
||
50 | |||
51 | const double area_factor = 0.01; // area in ha of one pixel |
||
52 | *this << currentYear(); |
||
53 | *this << mWM->mCurrentIteration << mWM->mWindSpeed << GRAD(mWM->mWindDirection) << mWM->mPixelAffected*area_factor; |
||
1060 | werner | 54 | *this << mWM->mTreesKilled << mWM->mTotalKilledBasalArea << mWM->mTotalKilledVolume; |
1054 | werner | 55 | |
1066 | werner | 56 | //qDebug() << "windout" << mWM->mTotalKilledBasalArea; |
1054 | werner | 57 | |
58 | writeRow(); |
||
59 | |||
60 | } |
||
61 | |||
62 | void WindOut::setup() |
||
63 | { |
||
64 | |||
65 | } |
||
66 |