Rev 300 | Rev 328 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | |||
193 | werner | 2 | #ifndef SPECIESRESPONSE_H |
3 | #define SPECIESRESPONSE_H |
||
4 | class ResourceUnit; |
||
5 | class ResourceUnitSpecies; |
||
6 | class Species; |
||
7 | |||
8 | class SpeciesResponse |
||
9 | { |
||
10 | public: |
||
11 | SpeciesResponse(); |
||
12 | // actions |
||
13 | void setup(ResourceUnitSpecies *rus); |
||
209 | werner | 14 | /// calculate the species specific environmental response values for the resource unit. |
15 | /// this function called before the 3pg production. |
||
193 | werner | 16 | void calculate(); |
17 | // access responses |
||
18 | const double *tempResponse() const { return mTempResponse; } |
||
19 | const double *soilWaterResponse() const { return mSoilWaterResponse; } |
||
251 | werner | 20 | const double *absorbedRadiation() const { return mRadiation; } ///< radiation sum in MJ/m2 |
327 | werner | 21 | const double *utilizableRadiation() const {return mUtilizableRadiation; } |
300 | werner | 22 | const double *co2Response() const { return mCO2Response; } |
193 | werner | 23 | double nitrogenResponse() const { return mNitrogenResponse; } |
24 | private: |
||
209 | werner | 25 | void clear(); |
193 | werner | 26 | const ResourceUnit *mRu; |
27 | const Species *mSpecies; |
||
327 | werner | 28 | |
226 | werner | 29 | double mRadiation[12]; ///< radiation sums per month (within vegetation period) |
327 | werner | 30 | double mUtilizableRadiation[12]; ///< sum of daily radiation*minResponse |
31 | double mTempResponse[12]; ///< average of temperature response |
||
32 | double mSoilWaterResponse[12]; ///< average of soilwater response |
||
193 | werner | 33 | double mNitrogenResponse; |
300 | werner | 34 | double mCO2Response[12]; |
193 | werner | 35 | }; |
36 | |||
37 | #endif // SPECIESRESPONSE_H |