Subversion Repositories public iLand

Rev

Rev 179 | Rev 214 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 179 Rev 209
Line 42... Line 42...
42
    // mortality
42
    // mortality
43
    double deathProb_intrinsic() const { return mDeathProb_intrinsic; }
43
    double deathProb_intrinsic() const { return mDeathProb_intrinsic; }
44
    double deathProb_stress() const { return mDeathProb_stress; }
44
    double deathProb_stress() const { return mDeathProb_stress; }
45
    // aging
45
    // aging
46
    double aging(const float height, const int age);
46
    double aging(const float height, const int age);
-
 
47
    // environmental responses
-
 
48
    double vpdResponse(const double &vpd) const;
-
 
49
    double temperatureResponse(const double &delayed_temp) const;
-
 
50
    double nitrogenResponse(const double &availableNitrogen) const { return mSet->nitrogenResponse(availableNitrogen, mRespNitrogenClass); }
47
51
48
    const Stamp* stamp(const float dbh, const float height) const { return mLIPs.stamp(dbh, height);}
52
    const Stamp* stamp(const float dbh, const float height) const { return mLIPs.stamp(dbh, height);}
49
    // maintenance
53
    // maintenance
50
    void setup();
54
    void setup();
51
private:
55
private:
Line 81... Line 85...
81
    double mDeathProb_intrinsic;  ///< prob. of intrinsic death per year [0..1]
85
    double mDeathProb_intrinsic;  ///< prob. of intrinsic death per year [0..1]
82
    double mDeathProb_stress; ///< max. prob. of death per year when tree suffering maximum stress
86
    double mDeathProb_stress; ///< max. prob. of death per year when tree suffering maximum stress
83
    // Aging
87
    // Aging
84
    double mMaximumAge; ///< maximum age of species (years)
88
    double mMaximumAge; ///< maximum age of species (years)
85
    double mMaximumHeight; ///< maximum height of species (m) for aging
89
    double mMaximumHeight; ///< maximum height of species (m) for aging
-
 
90
    // environmental responses
-
 
91
    double mRespVpdExponent; ///< exponent in vpd response calculation (Mäkela 2008)
-
 
92
    double mRespTempMin; ///< temperature response calculation offset
-
 
93
    double mRespTempMax; ///< temperature response calculation: saturation point for temp. response
-
 
94
    double mRespNitrogenClass; ///< nitrogen response class (1..3). fractional values (e.g. 1.2) are interpolated.
86
    Expression mAging;
95
    Expression mAging;
87
};
96
};
88
97
89
98
90
// inlined functions...
99
// inlined functions...
91
inline void Species::hdRange(const double dbh, double &rLowHD, double &rHighHD)
100
inline void Species::hdRange(const double dbh, double &rLowHD, double &rHighHD)
92
{
101
{
93
    rLowHD = mHDlow.calculate(dbh);
102
    rLowHD = mHDlow.calculate(dbh);
94
    rHighHD = mHDhigh.calculate(dbh);
103
    rHighHD = mHDhigh.calculate(dbh);
-
 
104
}
-
 
105
/** vpdResponse calculates response on vpd.
-
 
106
    Input: vpd [kPa]*/
-
 
107
inline double Species::vpdResponse(const double &vpd) const
-
 
108
{
-
 
109
    return exp(mRespVpdExponent * vpd);
-
 
110
}
-
 
111
-
 
112
/** temperatureResponse calculates response on delayed daily temperature.
-
 
113
    Input: average temperature [°C]
-
 
114
    Note: slightly different from Mäkela 2008: the maximum parameter (Sk) in iLand is interpreted as the absolute
-
 
115
          temperature yielding a response of 1; in Mäkela 2008, Sk is the width of the range (relative to the lower threhold)
-
 
116
*/
-
 
117
inline double Species::temperatureResponse(const double &delayed_temp) const
-
 
118
{
-
 
119
    double x = qMax(delayed_temp-mRespTempMin, 0.);
-
 
120
    x = qMin(x/(mRespTempMax-mRespTempMin), 1.);
-
 
121
    return x;
95
}
122
}
96
123
97
#endif // SPECIES_H
124
#endif // SPECIES_H