Rev 1221 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1221 | Rev 1222 | ||
---|---|---|---|
1 | Redirecting to URL 'https://iland.boku.ac.at/svn/iland/tags/release_1.0/src/core/speciesresponse.h': |
1 | Redirecting to URL 'https://iland.boku.ac.at/svn/iland/tags/release_1.0/src/core/speciesresponse.h': |
2 | /********************************************************************************************
|
2 | /********************************************************************************************
|
3 | ** iLand - an individual based forest landscape and disturbance model
|
3 | ** iLand - an individual based forest landscape and disturbance model
|
4 | ** http://iland.boku.ac.at
|
4 | ** http://iland.boku.ac.at
|
5 | ** Copyright (C) 2009- Werner Rammer, Rupert Seidl
|
5 | ** Copyright (C) 2009- Werner Rammer, Rupert Seidl
|
6 | **
|
6 | **
|
7 | ** This program is free software: you can redistribute it and/or modify
|
7 | ** This program is free software: you can redistribute it and/or modify
|
8 | ** it under the terms of the GNU General Public License as published by
|
8 | ** it under the terms of the GNU General Public License as published by
|
9 | ** the Free Software Foundation, either version 3 of the License, or
|
9 | ** the Free Software Foundation, either version 3 of the License, or
|
10 | ** (at your option) any later version.
|
10 | ** (at your option) any later version.
|
11 | **
|
11 | **
|
12 | ** This program is distributed in the hope that it will be useful,
|
12 | ** This program is distributed in the hope that it will be useful,
|
13 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 | ** GNU General Public License for more details.
|
15 | ** GNU General Public License for more details.
|
16 | **
|
16 | **
|
17 | ** You should have received a copy of the GNU General Public License
|
17 | ** You should have received a copy of the GNU General Public License
|
18 | ** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
18 | ** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19 | ********************************************************************************************/
|
19 | ********************************************************************************************/
|
20 | 20 | ||
21 | #ifndef SPECIESRESPONSE_H
|
21 | #ifndef SPECIESRESPONSE_H
|
22 | #define SPECIESRESPONSE_H
|
22 | #define SPECIESRESPONSE_H
|
23 | class ResourceUnit; |
23 | class ResourceUnit; |
24 | class ResourceUnitSpecies; |
24 | class ResourceUnitSpecies; |
25 | class Species; |
25 | class Species; |
26 | 26 | ||
27 | class SpeciesResponse
|
27 | class SpeciesResponse
|
28 | {
|
28 | {
|
29 | public: |
29 | public: |
30 | SpeciesResponse(); |
30 | SpeciesResponse(); |
31 | // actions
|
31 | // actions
|
32 | void setup(ResourceUnitSpecies *rus); |
32 | void setup(ResourceUnitSpecies *rus); |
33 | /// calculate the species specific environmental response values for the resource unit.
|
33 | /// calculate the species specific environmental response values for the resource unit.
|
34 | /// this function called before the 3pg production.
|
34 | /// this function called before the 3pg production.
|
35 | void calculate(); ///< calculate responses for current year |
35 | void calculate(); ///< calculate responses for current year |
36 | void clear(); ///< set all responses to 0 |
36 | void clear(); ///< set all responses to 0 |
37 | // access components
|
37 | // access components
|
38 | const Species *species() const { return mSpecies; } |
38 | const Species *species() const { return mSpecies; } |
39 | const ResourceUnit *resourceUnit() const { return mRu; } |
39 | const ResourceUnit *resourceUnit() const { return mRu; } |
40 | // access responses
|
40 | // access responses
|
41 | const double *tempResponse() const { return mTempResponse; } |
41 | const double *tempResponse() const { return mTempResponse; } |
42 | const double *soilWaterResponse() const { return mSoilWaterResponse; } |
42 | const double *soilWaterResponse() const { return mSoilWaterResponse; } |
43 | const double *globalRadiation() const { return mRadiation; } ///< radiation sum in MJ/m2 |
43 | const double *globalRadiation() const { return mRadiation; } ///< radiation sum in MJ/m2 |
44 | const double *utilizableRadiation() const {return mUtilizableRadiation; } ///< utilizable radiation (rad*responses) |
44 | const double *utilizableRadiation() const {return mUtilizableRadiation; } ///< utilizable radiation (rad*responses) |
45 | const double *vpdResponse() const {return mVpdResponse; } |
45 | const double *vpdResponse() const {return mVpdResponse; } |
46 | const double *co2Response() const { return mCO2Response; } |
46 | const double *co2Response() const { return mCO2Response; } |
47 | double nitrogenResponse() const { return mNitrogenResponse; } |
47 | double nitrogenResponse() const { return mNitrogenResponse; } |
48 | double yearlyRadiation() const { return mTotalRadiation; } |
48 | double yearlyRadiation() const { return mTotalRadiation; } |
49 | double totalUtilizeableRadiation() const { return mTotalUtilizeableRadiation; } |
49 | double totalUtilizeableRadiation() const { return mTotalUtilizeableRadiation; } |
50 | /// response calculation called during water cycle
|
50 | /// response calculation called during water cycle
|
51 | /// calculates minimum-response of vpd-response and soilwater response
|
51 | /// calculates minimum-response of vpd-response and soilwater response
|
52 | void soilAtmosphereResponses(const double psi_kPa, const double vpd, double &rMinResponse) const; |
52 | void soilAtmosphereResponses(const double psi_kPa, const double vpd, double &rMinResponse) const; |
53 | 53 | ||
54 | private: |
54 | private: |
55 | const ResourceUnit *mRu; |
55 | const ResourceUnit *mRu; |
56 | const Species *mSpecies; |
56 | const Species *mSpecies; |
57 | 57 | ||
58 | double mRadiation[12]; ///< radiation sums per month (MJ/m2) |
58 | double mRadiation[12]; ///< radiation sums per month (MJ/m2) |
59 | double mUtilizableRadiation[12]; ///< sum of daily radiation*minResponse (MJ/m2) |
59 | double mUtilizableRadiation[12]; ///< sum of daily radiation*minResponse (MJ/m2) |
60 | double mTempResponse[12]; ///< average of temperature response |
60 | double mTempResponse[12]; ///< average of temperature response |
61 | double mSoilWaterResponse[12]; ///< average of soilwater response |
61 | double mSoilWaterResponse[12]; ///< average of soilwater response |
62 | double mVpdResponse[12]; ///< mean of vpd-response |
62 | double mVpdResponse[12]; ///< mean of vpd-response |
63 | double mNitrogenResponse; |
63 | double mNitrogenResponse; |
64 | double mCO2Response[12]; |
64 | double mCO2Response[12]; |
65 | double mTotalRadiation; ///< total radiation of the year (MJ/m2) |
65 | double mTotalRadiation; ///< total radiation of the year (MJ/m2) |
66 | double mTotalUtilizeableRadiation; ///< yearly sum of utilized radiation (MJ/m2) |
66 | double mTotalUtilizeableRadiation; ///< yearly sum of utilized radiation (MJ/m2) |
67 | }; |
67 | }; |
68 | 68 | ||
69 | #endif // SPECIESRESPONSE_H
|
69 | #endif // SPECIESRESPONSE_H
|
70 | 70 |