Rev 240 | Rev 280 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 240 | Rev 255 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | Climate(); |
42 | Climate(); |
43 | void setup(); ///< setup routine that opens database connection |
43 | void setup(); ///< setup routine that opens database connection |
44 | // activity
|
44 | // activity
|
45 | void nextYear(); |
45 | void nextYear(); |
46 | // access to climate data
|
46 | // access to climate data
|
47 | const ClimateDay *dayOfYear(const int dayofyear) { return mBegin + dayofyear;} ///< get pointer to climate structure by day of year (0-based-index) |
- | |
48 | const ClimateDay *day(const int month, const int day); ///< gets pointer to climate structure of given day (0-based indices, i.e. month=11=december!) |
- | |
- | 47 | const ClimateDay *dayOfYear(const int dayofyear) const { return mBegin + dayofyear;} ///< get pointer to climate structure by day of year (0-based-index) |
|
- | 48 | const ClimateDay *day(const int month, const int day) const; ///< gets pointer to climate structure of given day (0-based indices, i.e. month=11=december!) |
|
49 | /// returns two pointer (arguments!!!) to the begin and one after end of the given month (month: 0..11)
|
49 | /// returns two pointer (arguments!!!) to the begin and one after end of the given month (month: 0..11)
|
50 | void monthRange(const int month, const ClimateDay **rBegin, const ClimateDay **rEnd); |
- | |
51 | double days(const int month); ///< returns number of days of given month |
- | |
52 | int daysOfYear(); ///< returns number of days of current year. points to the first day of the current year. |
- | |
53 | const ClimateDay *begin() { return mBegin; } ///< STL-like (pointer)-iterator to the day *after* last day of the current year |
- | |
54 | const ClimateDay *end() { return mEnd; } ///< STL-like pointer iterator |
- | |
55 | void toDate(const int yearday, int *rDay=0, int *rMonth=0, int *rYear=0); ///< decode "yearday" to the actual year, month, day if provided |
- | |
- | 50 | void monthRange(const int month, const ClimateDay **rBegin, const ClimateDay **rEnd) const; |
|
- | 51 | double days(const int month) const; ///< returns number of days of given month |
|
- | 52 | int daysOfYear() const; ///< returns number of days of current year. points to the first day of the current year. |
|
- | 53 | const ClimateDay *begin() const { return mBegin; } ///< STL-like (pointer)-iterator to the day *after* last day of the current year |
|
- | 54 | const ClimateDay *end() const { return mEnd; } ///< STL-like pointer iterator |
|
- | 55 | void toDate(const int yearday, int *rDay=0, int *rMonth=0, int *rYear=0) const; ///< decode "yearday" to the actual year, month, day if provided |
|
56 | // access to other subsystems
|
56 | // access to other subsystems
|
57 | const Phenology &phenology(const int phenologyGroup) const; ///< phenology class of given type |
57 | const Phenology &phenology(const int phenologyGroup) const; ///< phenology class of given type |
58 | const Sun &sun() const { return mSun; } ///< solar radiation class |
58 | const Sun &sun() const { return mSun; } ///< solar radiation class |
59 | double daylength_h(const int doy) const { return sun().daylength(doy); } ///< length of the day in hours |
59 | double daylength_h(const int doy) const { return sun().daylength(doy); } ///< length of the day in hours |
60 | 60 |