Loading [MathJax]/extensions/ams.js
ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Weather.h
Go to the documentation of this file.
1 //
2 // weather.h
3 //
4 
5 
6 #ifndef WEATHER_H
7 #define WEATHER_H
8 
9 #include <vector>
10 using namespace std;
11 
12 extern class Weather *g_weather;
13 
14 // Below is the data for insolation in MJ per m2 for �dum fitted to 1961-1990
15 // by Olesen (1991)
16 const double c_insolation [365] = {
17  0.91,
18  0.921585,
19  0.935138,
20  0.950669,
21  0.968188,
22  0.987706,
23  1.009231,
24  1.032774,
25  1.058346,
26  1.085956,
27  1.115614,
28  1.14733,
29  1.181113,
30  1.216974,
31  1.254921,
32  1.294964,
33  1.337112,
34  1.381373,
35  1.427757,
36  1.476271,
37  1.526923,
38  1.57972,
39  1.634671,
40  1.691781,
41  1.751057,
42  1.812504,
43  1.876128,
44  1.941934,
45  2.009926,
46  2.080107,
47  2.15248,
48  2.227048,
49  2.303812,
50  2.382774,
51  2.463933,
52  2.547289,
53  2.63284,
54  2.720585,
55  2.81052,
56  2.902642,
57  2.996945,
58  3.093425,
59  3.192073,
60  3.292884,
61  3.395847,
62  3.500954,
63  3.608194,
64  3.717555,
65  3.829024,
66  3.942587,
67  4.05823,
68  4.175935,
69  4.295687,
70  4.417465,
71  4.541252,
72  4.667024,
73  4.794762,
74  4.924441,
75  5.056036,
76  5.189522,
77  5.324873,
78  5.462059,
79  5.601051,
80  5.741819,
81  5.884329,
82  6.02855,
83  6.174446,
84  6.321981,
85  6.471118,
86  6.621819,
87  6.774044,
88  6.927753,
89  7.082902,
90  7.239449,
91  7.397349,
92  7.556555,
93  7.717022,
94  7.8787,
95  8.041541,
96  8.205493,
97  8.370505,
98  8.536524,
99  8.703496,
100  8.871365,
101  9.040077,
102  9.209573,
103  9.379796,
104  9.550686,
105  9.722183,
106  9.894227,
107  10.06675,
108  10.2397,
109  10.41301,
110  10.58661,
111  10.76044,
112  10.93443,
113  11.10852,
114  11.28264,
115  11.45671,
116  11.63068,
117  11.80448,
118  11.97802,
119  12.15125,
120  12.3241,
121  12.49648,
122  12.66834,
123  12.8396,
124  13.01019,
125  13.18004,
126  13.34907,
127  13.51721,
128  13.6844,
129  13.85056,
130  14.01561,
131  14.17949,
132  14.34212,
133  14.50344,
134  14.66337,
135  14.82184,
136  14.97877,
137  15.13411,
138  15.28778,
139  15.43971,
140  15.58983,
141  15.73807,
142  15.88437,
143  16.02866,
144  16.17087,
145  16.31093,
146  16.44879,
147  16.58439,
148  16.71764,
149  16.8485,
150  16.97691,
151  17.1028,
152  17.22612,
153  17.3468,
154  17.46479,
155  17.58005,
156  17.6925,
157  17.80211,
158  17.90881,
159  18.01256,
160  18.11332,
161  18.21102,
162  18.30564,
163  18.39712,
164  18.48542,
165  18.5705,
166  18.65233,
167  18.73086,
168  18.80605,
169  18.87788,
170  18.94632,
171  19.01132,
172  19.07286,
173  19.13092,
174  19.18546,
175  19.23647,
176  19.28393,
177  19.3278,
178  19.36809,
179  19.40475,
180  19.4378,
181  19.4672,
182  19.49296,
183  19.51506,
184  19.53349,
185  19.54825,
186  19.55934,
187  19.56676,
188  19.5705,
189  19.57058,
190  19.56698,
191  19.55973,
192  19.54883,
193  19.53428,
194  19.51611,
195  19.49432,
196  19.46893,
197  19.43996,
198  19.40743,
199  19.37136,
200  19.33177,
201  19.28868,
202  19.24213,
203  19.19214,
204  19.13873,
205  19.08195,
206  19.02183,
207  18.95839,
208  18.89168,
209  18.82173,
210  18.74858,
211  18.67228,
212  18.59286,
213  18.51036,
214  18.42484,
215  18.33634,
216  18.2449,
217  18.15058,
218  18.05342,
219  17.95348,
220  17.8508,
221  17.74545,
222  17.63746,
223  17.52691,
224  17.41384,
225  17.29832,
226  17.18039,
227  17.06012,
228  16.93757,
229  16.8128,
230  16.68586,
231  16.55683,
232  16.42576,
233  16.29271,
234  16.15775,
235  16.02094,
236  15.88235,
237  15.74203,
238  15.60006,
239  15.4565,
240  15.3114,
241  15.16485,
242  15.0169,
243  14.86762,
244  14.71707,
245  14.56532,
246  14.41243,
247  14.25848,
248  14.10352,
249  13.94762,
250  13.79084,
251  13.63325,
252  13.47491,
253  13.31588,
254  13.15624,
255  12.99604,
256  12.83534,
257  12.6742,
258  12.5127,
259  12.35088,
260  12.18881,
261  12.02654,
262  11.86415,
263  11.70167,
264  11.53918,
265  11.37673,
266  11.21437,
267  11.05216,
268  10.89016,
269  10.72841,
270  10.56697,
271  10.40589,
272  10.24522,
273  10.08502,
274  9.925323,
275  9.766186,
276  9.607653,
277  9.449772,
278  9.292586,
279  9.13614,
280  8.980476,
281  8.825635,
282  8.67166,
283  8.518588,
284  8.366459,
285  8.215311,
286  8.06518,
287  7.916101,
288  7.768108,
289  7.621236,
290  7.475515,
291  7.330978,
292  7.187655,
293  7.045573,
294  6.904763,
295  6.765249,
296  6.62706,
297  6.490218,
298  6.35475,
299  6.220676,
300  6.088021,
301  5.956804,
302  5.827045,
303  5.698765,
304  5.571981,
305  5.44671,
306  5.32297,
307  5.200776,
308  5.080142,
309  4.961083,
310  4.843613,
311  4.727743,
312  4.613485,
313  4.50085,
314  4.38985,
315  4.280492,
316  4.172788,
317  4.066743,
318  3.962368,
319  3.859668,
320  3.758651,
321  3.659322,
322  3.561687,
323  3.465753,
324  3.371522,
325  3.279,
326  3.18819,
327  3.099097,
328  3.011723,
329  2.926071,
330  2.842145,
331  2.759946,
332  2.679477,
333  2.600739,
334  2.523735,
335  2.448466,
336  2.374933,
337  2.303139,
338  2.233084,
339  2.16477,
340  2.098198,
341  2.033369,
342  1.970285,
343  1.908946,
344  1.849355,
345  1.791512,
346  1.735419,
347  1.681077,
348  1.628489,
349  1.577656,
350  1.528581,
351  1.481264,
352  1.43571,
353  1.391919,
354  1.349896,
355  1.309643,
356  1.271164,
357  1.234461,
358  1.199539,
359  1.166401,
360  1.135053,
361  1.105497,
362  1.07774,
363  1.051786,
364  1.02764,
365  1.005309,
366  0.984798,
367  0.966113,
368  0.94926,
369  0.934248,
370  0.921081,
371  0.909769,
372  0.900317,
373  0.892735,
374  0.88703,
375  0.88321,
376  0.881284,
377  0.881261,
378  0.883149,
379  0.886958,
380  0.892696,
381  0.900374
382 };
383 
384 
385 class Weather
386 {
387  vector<double> m_rain;
388  vector<double> m_wind;
389  vector<double> m_winddir;
390  vector<double> m_winddir8;
391  vector<double> m_WindDirRadians;
392  vector<double> m_temp;
393  vector<double> m_soiltemp;
394  vector<double> m_snow;
395  vector<double> m_mintemp;
396  vector<double> m_maxtemp;
397  vector<double> m_relhumidity;
398  vector<double> m_soiltemptwilight;
399  vector<double> m_radiation;
400  vector<double> m_flyinghours;
401 
402  //below are the vectors for storing the weather data in hour
403  vector<vector<double>> m_rain_h;
404  vector<vector<double>> m_wind_h;
405  vector<vector<double>> m_winddir_h;
406  vector<vector<double>> m_winddir8_h;
407  vector<vector<double>> m_temp_h;
408  vector<vector<double>> m_radiation_h;
409  vector<vector<double>> m_soiltemp_h;
410  vector<vector<double>> m_snow_h;
411  vector<vector<double>> m_humidity_h;
412 
413  //index for today's hourly weather data
415 
416  bool m_fsoiltemp = false;
417  bool m_fsnow = false;
418  bool m_fminmaxtemp = false;
419  bool m_frelhumidity = false;
420  bool m_fsoiltemptwilight = false;
421  bool m_fradiation = false;
422  bool m_fflyinghours = false;
423 
424 
425 
426  double m_temptoday;
427  double m_raintoday;
428  double m_windtoday;
434  double m_insolation;
445  double m_temp_variation{0};
446 
447 
451 
453 
455  double m_snowdepth;
456 
460  int m_NoDays;
462 public:
463  Weather( const char* a_weatherdatafile = "default");
464  ~Weather( void );
465 
467  double GetTempHour(int hour) {return m_temp_h.at(m_hourly_today_index).at(hour);}
468  double GetSoilTempHour(int hour) { return m_soiltemp_h.at(m_hourly_today_index).at(hour); }
469  double GetWindHour(int hour) {return m_wind_h.at(m_hourly_today_index).at(hour);}
470  double GetRainHour(int hour) {return m_rain_h.at(m_hourly_today_index).at(hour);}
471  double GetRadiationHour(int hour) {return m_radiation_h.at(m_hourly_today_index).at(hour);}
472  double GetDDDegs( long a_date );
473  double GetGlobalRadiation(long a_date) { if(m_hourly_flag) return m_radiation.at(a_date % m_datemodulus); return (double)c_insolation[a_date % m_datemodulus]; }
474  double GetGlobalRadiation( void ) { return m_insolation; }
476  double GetTemp(long a_date) { return m_temp[a_date % m_datemodulus]; }
478  double GetSoilTemp(void) { return m_soiltemptoday; }
480  double GetSoilTemp(long a_date) { return m_soiltemp[a_date % m_datemodulus]; }
482  double GetTemp(void) { return m_temptoday; }
484  double GetTempAfterDays(int days) { return m_temp[(m_weather_day + days) % m_datemodulus]; }
486  double GetMinTemp(void) { return m_mintemptoday; }
488  double GetMaxTemp(void) { return m_maxtemptoday; }
490  double GetMinTempYesterday(void) { return m_mintempyesterday; }
492  double GetMaxTempYesterday(void) { return m_maxtempyesterday; }
494  double GetMinTempTomorrow(void) { return m_mintemptomorrow; }
496  double GetMaxTempTomorrow(void) { return m_maxtemptomorrow; }
498  double GetRadiation(void) { return m_radiationtoday; }
500  double GetFlyingHours(void) { return m_flyinghourstoday; }
502  double GetHumidity(void) { return m_humiditytoday; }
504  double GetHumidity(long a_date) { return m_relhumidity[a_date % m_datemodulus]; }
505  double GetMeanTemp(long a_date, unsigned int a_period);
506  double GetRain(long a_date) { return m_rain[a_date %m_datemodulus]; }
507  double GetRain( void ) { return m_raintoday; }
508  double GetWind(long a_date) { return m_wind[a_date % m_datemodulus]; }
509  double GetWind( void ) { return m_windtoday; }
511  int GetWindDirection( void ) { return m_winddirtoday; }
513  int GetWindDirection8( void ) { return m_winddir8today; }
515  double GetWindDirectionRadians(void) {return m_WindDirTodayRadians;}
516  bool GetSnow( long a_date );
517  bool GetSnow( void ) { return m_snowtoday; }
519  double GetSnowDepth(void) { return m_snowdepth; }
520  bool Raining( void ) { return m_rainingtoday; }
521 
522  bool Get_fsoiltemp(void) { return m_fsoiltemp; } // if true read, if false calculated
523  bool Get_fsnow(void) { return m_fsnow; } // if true read, if false calculated
524  bool Get_fminmaxtemp(void) { return m_fminmaxtemp; } // if true exists, if false it does not
525  bool Get_frelhumidity(void) { return m_frelhumidity; } // if true exists, if false it does not
526  bool Get_fsoiltemptwilight(void) { return m_fsoiltemptwilight; } // if true exists, if false it does not
527  bool Get_fradiation(void) { return m_fradiation; } // if true exists, if false it does not
528  int GetNoDays(void) { return m_NoDays; }
529 
530  // Returns total amount of rain from a_date and a_period of days
531  // *backwards*! Normally a_date is equal to g_date->Date() when one
532  // want to check for rain before doing a crop management step.
533  // a_period should be at least one and positive.
534  // --FN--, 29/11-2000.
535  double GetRainPeriod( long a_date, unsigned int a_period );
536  double GetWindPeriod( long a_date, unsigned int a_period );
537  double GetTempPeriod(long a_date, unsigned int a_period);
538  double GetRHPeriod(long a_date, unsigned int a_period);
539  void Tick( void );
540 
541  void readWeatherFile(int NoDays, ifstream& inFile);
542  void readWeatherFileHourly(int NoHours, int NoDays, ifstream& inFile);
543 
544 protected:
545  double DeriveSnowCover(double a_snowdepth, double a_rainfall, double a_temperature);
546  double DeriveSoilTemp(double a_temperature);
547 
548 };
549 
551 
552 #endif // WEATHER_H
553 
554 
555 
556 
557 
558 
Weather::m_winddir8today
int m_winddir8today
Definition: Weather.h:430
M_PI
#define M_PI
Definition: sunset.h:33
Weather::m_hourly_flag
bool m_hourly_flag
Flag for hourly data.
Definition: Weather.h:458
Weather::GetGlobalRadiation
double GetGlobalRadiation(void)
Definition: Weather.h:474
WARN_FILE
Definition: MapErrorMsg.h:37
g_rand_uni_fnc
double g_rand_uni_fnc()
Definition: ALMaSS_Random.cpp:56
Weather::m_snowdepth
double m_snowdepth
The snow depth in cm.
Definition: Weather.h:455
Weather::GetFlyingHours
double GetFlyingHours(void)
Get the max temperature today.
Definition: Weather.h:500
l_weather_relhumidity
static CfgBool l_weather_relhumidity("WEATHER_RELHUMIDITY", CFG_CUSTOM, false)
Weather::GetSoilTemp
double GetSoilTemp(long a_date)
Get the soil temperature on a particular date.
Definition: Weather.h:480
Weather::GetSnow
bool GetSnow(void)
Definition: Weather.h:517
g_weather
class Weather * g_weather
Definition: Weather.cpp:49
Weather::m_radiation
vector< double > m_radiation
Definition: Weather.h:399
Weather::m_soiltemp
vector< double > m_soiltemp
Definition: Weather.h:393
Weather::GetWind
double GetWind(void)
Definition: Weather.h:509
Weather::GetWindDirectionRadians
double GetWindDirectionRadians(void)
East is 0, anticlockwise.
Definition: Weather.h:515
Weather::m_temp
vector< double > m_temp
Definition: Weather.h:392
Weather::m_radiationtoday
double m_radiationtoday
Definition: Weather.h:443
WindDirections
const int WindDirections[12][100]
Definition: Weather.cpp:51
Weather::m_temptoday
double m_temptoday
Definition: Weather.h:426
Calendar::SetFirstYear
void SetFirstYear(int a_year)
Definition: Calendar.h:81
Weather::m_fradiation
bool m_fradiation
Definition: Weather.h:421
Weather::m_winddir8_h
vector< vector< double > > m_winddir8_h
Definition: Weather.h:406
Weather::Weather
Weather(const char *a_weatherdatafile="default")
Definition: Weather.cpp:217
CfgStr::value
char * value() const
Definition: Configurator.h:182
Weather::GetRHPeriod
double GetRHPeriod(long a_date, unsigned int a_period)
Definition: Weather.cpp:723
Weather::GetSoilTempHour
double GetSoilTempHour(int hour)
Definition: Weather.h:468
Weather::m_relhumidity
vector< double > m_relhumidity
Definition: Weather.h:397
CfgStr
String configurator entry class.
Definition: Configurator.h:173
Weather::GetMaxTempYesterday
double GetMaxTempYesterday(void)
Get the max temperature yesterday.
Definition: Weather.h:492
l_weather_radiation
static CfgBool l_weather_radiation("WEATHER_RADIATION", CFG_CUSTOM, false)
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
Weather::m_humiditytoday
double m_humiditytoday
Definition: Weather.h:435
Weather::GetDDDegs
double GetDDDegs(long a_date)
Definition: Weather.cpp:205
Weather::GetWindDirection8
int GetWindDirection8(void)
Eight wind directions N = 0, NE = 1, ..., clockwise.
Definition: Weather.h:513
l_weather_soiltemp
static CfgBool l_weather_soiltemp("WEATHER_SOILTEMP", CFG_CUSTOM, false)
CfgFloat::value
double value() const
Definition: Configurator.h:142
ls.h
Weather::GetRain
double GetRain(void)
Definition: Weather.h:507
Weather::GetRadiation
double GetRadiation(void)
Get the max temperature today.
Definition: Weather.h:498
l_weather_minmaxtemp
static CfgBool l_weather_minmaxtemp("WEATHER_MINMAXTEMP", CFG_CUSTOM, false)
Weather::m_fminmaxtemp
bool m_fminmaxtemp
Definition: Weather.h:418
l_weather_flyinghours
static CfgBool l_weather_flyinghours("WEATHER_FLYINGHOURS", CFG_CUSTOM, false)
Weather::Raining
bool Raining(void)
Definition: Weather.h:520
l_map_weather_file
static CfgStr l_map_weather_file("MAP_WEATHER_FILE", CFG_CUSTOM, "weather.pre")
Weather::m_fsoiltemptwilight
bool m_fsoiltemptwilight
Definition: Weather.h:420
Weather::m_datemodulus
long m_datemodulus
Definition: Weather.h:452
Weather::GetWind
double GetWind(long a_date)
Definition: Weather.h:508
Calendar::SetLastYear
void SetLastYear(int a_year)
Definition: Calendar.h:82
Weather::m_snow
vector< double > m_snow
Definition: Weather.h:394
Weather::Tick
void Tick(void)
Definition: Weather.cpp:66
Weather::m_mintemptomorrow
double m_mintemptomorrow
Definition: Weather.h:441
Weather::m_rain
vector< double > m_rain
Definition: Weather.h:387
CfgBool::value
bool value() const
Definition: Configurator.h:164
Weather::m_soiltemptoday
double m_soiltemptoday
Definition: Weather.h:436
Weather::m_fflyinghours
bool m_fflyinghours
Definition: Weather.h:422
Weather::m_temp_h
vector< vector< double > > m_temp_h
Definition: Weather.h:407
Weather::m_frelhumidity
bool m_frelhumidity
Definition: Weather.h:419
Weather::m_snowtoday
bool m_snowtoday
Definition: Weather.h:432
Weather::GetWindHour
double GetWindHour(int hour)
Definition: Weather.h:469
Weather::GetTemp
double GetTemp(void)
Get the temperature today.
Definition: Weather.h:482
Weather::readWeatherFileHourly
void readWeatherFileHourly(int NoHours, int NoDays, ifstream &inFile)
Definition: Weather.cpp:282
Weather::GetSnowDepth
double GetSnowDepth(void)
Get the current snow depth.
Definition: Weather.h:519
Weather::m_WindDirRadians
vector< double > m_WindDirRadians
Definition: Weather.h:391
Weather::GetTemp
double GetTemp(long a_date)
Get the temperature on a particular date.
Definition: Weather.h:476
Weather::m_snow_h
vector< vector< double > > m_snow_h
Definition: Weather.h:410
Calendar::Date
long Date(void)
Definition: Calendar.h:57
Calendar::Reset
void Reset(void)
Definition: Calendar.cpp:39
Weather::GetSoilTemp
double GetSoilTemp(void)
Get the current soil temperature.
Definition: Weather.h:478
Weather::GetHumidity
double GetHumidity(void)
Get the humidity score today.
Definition: Weather.h:502
Weather::m_radiation_h
vector< vector< double > > m_radiation_h
Definition: Weather.h:408
Weather::~Weather
~Weather(void)
Definition: Weather.cpp:659
CfgBool
Bool configurator entry class.
Definition: Configurator.h:155
Weather::m_mintemptoday
double m_mintemptoday
Definition: Weather.h:439
Weather::GetMeanTemp
double GetMeanTemp(long a_date, unsigned int a_period)
Definition: Weather.cpp:170
Weather::GetMinTempYesterday
double GetMinTempYesterday(void)
Get the min temperature yesterday.
Definition: Weather.h:490
Weather::m_maxtemptomorrow
double m_maxtemptomorrow
Definition: Weather.h:442
CreateWeather
Weather * CreateWeather()
Definition: Weather.cpp:738
Weather::GetMinTempTomorrow
double GetMinTempTomorrow(void)
Get the min temperature tomorrow.
Definition: Weather.h:494
Weather::DeriveSoilTemp
double DeriveSoilTemp(double a_temperature)
Definition: Weather.cpp:663
Calendar::GetLastYear
int GetLastYear(void)
Definition: Calendar.h:70
MapErrorMsg::Warn
void Warn(MapErrorState a_level, std::string a_msg1, std::string a_msg2)
Definition: MapErrorMsg.cpp:69
Weather::m_maxtempyesterday
double m_maxtempyesterday
Definition: Weather.h:438
Weather::GetWindPeriod
double GetWindPeriod(long a_date, unsigned int a_period)
Definition: Weather.cpp:697
Weather::m_wind_h
vector< vector< double > > m_wind_h
Definition: Weather.h:404
Weather::GetMinTemp
double GetMinTemp(void)
Get the min temperature today.
Definition: Weather.h:486
Weather::m_rainingtoday
bool m_rainingtoday
Definition: Weather.h:433
Weather::Get_fsnow
bool Get_fsnow(void)
Definition: Weather.h:523
Weather::m_soiltemptwilight
vector< double > m_soiltemptwilight
Definition: Weather.h:398
Weather::m_WindDirTodayRadians
double m_WindDirTodayRadians
Definition: Weather.h:431
Weather::m_windtoday
double m_windtoday
Definition: Weather.h:428
Weather::m_winddir
vector< double > m_winddir
Definition: Weather.h:389
l_weather_soiltemptwilight
static CfgBool l_weather_soiltemptwilight("WEATHER_SOILTEMPTWILIGHT", CFG_CUSTOM, false)
Weather::m_temp_variation
double m_temp_variation
Definition: Weather.h:445
CfgInt::value
int value() const
Definition: Configurator.h:116
Weather::GetRadiationHour
double GetRadiationHour(int hour)
Definition: Weather.h:471
c_insolation
const double c_insolation[365]
Definition: Weather.h:16
Weather::m_wind_valid
bool m_wind_valid
Definition: Weather.h:448
Weather::m_rain_h
vector< vector< double > > m_rain_h
Definition: Weather.h:403
Weather::m_fsnow
bool m_fsnow
Definition: Weather.h:417
Weather::m_humidity_h
vector< vector< double > > m_humidity_h
Definition: Weather.h:411
Weather::m_weather_day
int m_weather_day
Definition: Weather.h:461
Weather::Get_fradiation
bool Get_fradiation(void)
Definition: Weather.h:527
Weather::m_fsoiltemp
bool m_fsoiltemp
Definition: Weather.h:416
Weather::Get_fsoiltemp
bool Get_fsoiltemp(void)
Definition: Weather.h:522
Weather::DeriveSnowCover
double DeriveSnowCover(double a_snowdepth, double a_rainfall, double a_temperature)
Definition: Weather.cpp:668
g_weather
class Weather * g_weather
Definition: Weather.cpp:49
g_msg
MapErrorMsg * g_msg
Definition: MapErrorMsg.cpp:41
Weather::m_winddir_h
vector< vector< double > > m_winddir_h
Definition: Weather.h:405
Weather::m_hourly_today_index
int m_hourly_today_index
Definition: Weather.h:414
Weather::m_NoDays
int m_NoDays
Holds the number of days we have weather data for.
Definition: Weather.h:460
Weather::Get_fminmaxtemp
bool Get_fminmaxtemp(void)
Definition: Weather.h:524
Weather::GetNoDays
int GetNoDays(void)
Definition: Weather.h:528
Weather::GetTempHour
double GetTempHour(int hour)
Get today's weather data at the given hour.
Definition: Weather.h:467
Weather::GetTempPeriod
double GetTempPeriod(long a_date, unsigned int a_period)
Definition: Weather.cpp:707
CfgInt
Integer configurator entry class.
Definition: Configurator.h:102
Weather::GetGlobalRadiation
double GetGlobalRadiation(long a_date)
Definition: Weather.h:473
Weather::m_flyinghours
vector< double > m_flyinghours
Definition: Weather.h:400
Weather::m_wind
vector< double > m_wind
Definition: Weather.h:388
Weather::m_insolation
double m_insolation
Definition: Weather.h:434
Weather::m_raintoday
double m_raintoday
Definition: Weather.h:427
Weather::m_maxtemp
vector< double > m_maxtemp
Definition: Weather.h:396
CfgFloat
Double configurator entry class.
Definition: Configurator.h:126
Weather::m_mintempyesterday
double m_mintempyesterday
Definition: Weather.h:437
Weather::m_mintemp
vector< double > m_mintemp
Definition: Weather.h:395
Weather::GetMaxTemp
double GetMaxTemp(void)
Get the max temperature today.
Definition: Weather.h:488
Weather::m_soiltemp_h
vector< vector< double > > m_soiltemp_h
Definition: Weather.h:409
Weather::Get_fsoiltemptwilight
bool Get_fsoiltemptwilight(void)
Definition: Weather.h:526
Weather::GetHumidity
double GetHumidity(long a_date)
Get the humidity score today.
Definition: Weather.h:504
CFG_CUSTOM
Definition: Configurator.h:70
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
Calendar::DayInYear
int DayInYear(void)
Definition: Calendar.h:58
l_weather_starting_year
static CfgInt l_weather_starting_year("WEATHER_STARTING_YEAR", CFG_CUSTOM, 0)
Weather::m_winddir8_valid
bool m_winddir8_valid
Definition: Weather.h:450
Weather::GetTempAfterDays
double GetTempAfterDays(int days)
Get the temperature at the given number of days which is the number of days after today.
Definition: Weather.h:484
Weather::Get_frelhumidity
bool Get_frelhumidity(void)
Definition: Weather.h:525
Weather::GetRain
double GetRain(long a_date)
Definition: Weather.h:506
Weather::GetMaxTempTomorrow
double GetMaxTempTomorrow(void)
Get the max temperature tomorrow.
Definition: Weather.h:496
l_weather_snowcover
static CfgBool l_weather_snowcover("WEATHER_SNOWCOVER", CFG_CUSTOM, false)
Weather::m_winddir8
vector< double > m_winddir8
Definition: Weather.h:390
CreateWeather
Weather * CreateWeather()
Definition: Weather.cpp:738
Weather::GetWindDirection
int GetWindDirection(void)
Four wind directions N = 0, clockwise.
Definition: Weather.h:511
Weather::m_winddir_valid
bool m_winddir_valid
Definition: Weather.h:449
Weather
Definition: Weather.h:385
Weather::readWeatherFile
void readWeatherFile(int NoDays, ifstream &inFile)
Definition: Weather.cpp:487
Weather::m_winddirtoday
int m_winddirtoday
Definition: Weather.h:429
Weather::GetRainPeriod
double GetRainPeriod(long a_date, unsigned int a_period)
Definition: Weather.cpp:688
Weather::GetRainHour
double GetRainHour(int hour)
Definition: Weather.h:470
Weather::m_maxtemptoday
double m_maxtemptoday
Definition: Weather.h:440
Weather::m_flyinghourstoday
double m_flyinghourstoday
Definition: Weather.h:444