Rev 209 | Rev 211 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 209 | Rev 210 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | Redirecting to URL 'https://iland.boku.ac.at/svn/iland/tags/release_1.0/src/core/climate.h': |
1 | Redirecting to URL 'https://iland.boku.ac.at/svn/iland/tags/release_1.0/src/core/climate.h': |
2 | #ifndef CLIMATE_H
|
2 | #ifndef CLIMATE_H
|
3 | #define CLIMATE_H
|
3 | #define CLIMATE_H
|
4 | 4 | ||
5 | #include <QtSql>
|
5 | #include <QtSql>
|
6 | - | ||
- | 6 | /// current climate variables of a day. @sa Climate.
|
|
7 | struct ClimateDay
|
7 | struct ClimateDay
|
8 | {
|
8 | {
|
9 | int year; // year |
9 | int year; // year |
10 | int month; // month |
10 | int month; // month |
11 | int day; // day of year |
11 | int day; // day of year |
Line 14... | Line 14... | ||
14 | double preciptitation; // sum of day [mm] |
14 | double preciptitation; // sum of day [mm] |
15 | double radiation; // sum of day (MJ/m2) |
15 | double radiation; // sum of day (MJ/m2) |
16 | double vpd; // average of day [kPa] |
16 | double vpd; // average of day [kPa] |
17 | QString date() const { return QString("%1.%2.%3").arg(day).arg(month).arg(year); } |
17 | QString date() const { return QString("%1.%2.%3").arg(day).arg(month).arg(year); } |
18 | bool isValid() const { return (year>=0); } |
18 | bool isValid() const { return (year>=0); } |
- | 19 | }; |
|
- | 20 | ||
- | 21 | /// Sun handles calculations of day lengths, etc.
|
|
- | 22 | class Sun
|
|
- | 23 | {
|
|
- | 24 | public: |
|
- | 25 | void setup(const double latitude_rad); |
|
- | 26 | QString dump(); |
|
- | 27 | const double &daylength(const int day) { return mDaylength_h[day]; } |
|
- | 28 | private: |
|
- | 29 | double mLatitude; |
|
- | 30 | double mDaylength_h[366]; ///< daylength per day in hours |
|
19 | }; |
31 | }; |
20 | 32 | ||
21 | class Climate
|
33 | class Climate
|
22 | {
|
34 | {
|
23 | public: |
35 | public: |