27 Phenology(
const Climate* climate) {mClimate=climate; mId=0; mMinVpd=mMaxVpd=mMinDayLength=mMaxDayLength=mMinTemp=mMaxTemp=0.; mDayStart=0;mDayEnd=365;mChillDaysBefore=-1; mChillDaysAfter=0;mChillDaysAfterLastYear=0;}
28 Phenology(
const int id,
const Climate* climate,
const double minVpd,
const double maxVpd,
29 const double minDayLength,
const double maxDayLength,
30 const double minTemp,
const double maxTemp): mId(
id), mClimate(climate), mMinVpd(minVpd), mMaxVpd(maxVpd),
31 mMinDayLength(minDayLength), mMaxDayLength(maxDayLength), mMinTemp(minTemp), mMaxTemp(maxTemp),mChillDaysAfter(0),mChillDaysAfterLastYear(0) {}
33 int id()
const {
return mId; }
37 const double *
month()
const {
return mPhenoFraction; }
43 int chillingDays()
const {
return mChillDaysBefore + mChillDaysAfterLastYear; }
56 double mPhenoFraction[12];
60 void calculateChillDays(
const int end_of_season=-1);
61 int mChillDaysBefore, mChillDaysAfter;
62 int mChillDaysAfterLastYear;
Climate handles climate input data and performs some basic related calculations on that data.
Definition: climate.h:66
Definition: phenology.h:25
Phenology(const int id, const Climate *climate, const double minVpd, const double maxVpd, const double minDayLength, const double maxDayLength, const double minTemp, const double maxTemp)
Definition: phenology.h:28
int vegetationPeriodLength() const
length of vegetation period in days, returs 365 for evergreens
Definition: phenology.h:38
int chillingDaysLastYear() const
Definition: phenology.h:44
const double * month() const
get result of phenology calcualtion for this year (a pointer to a array of 12 values between 0....
Definition: phenology.h:37
int vegetationPeriodEnd() const
day of year when vegeation period stops
Definition: phenology.h:40
Phenology(const Climate *climate)
Definition: phenology.h:27
void calculate()
calculate the phenology for the current year
Definition: phenology.cpp:46
int id() const
Definition: phenology.h:33
int vegetationPeriodStart() const
day of year when vegeation period starts
Definition: phenology.h:39
int chillingDays() const
get days of year that meet chilling requirements: the days in the autumn of the last year + the days ...
Definition: phenology.h:43