OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Penmen-Monteith ETo method python script for possible use as weather script › Reply To: Penmen-Monteith ETo method python script for possible use as weather script
hplato
Shawn, there is one use case that I can’t quite figure out. It seems like there are cases where station run times are calculated, but the number of times to water is actually 0, so the stations don’t activate. However, the logs are written as if water has been distributed. Here’s the output from your python script (with a bunch of debugging that’s been thrown in to help understand the logging):
Don’t know if this is expected behavior, or if either ‘times’ or station runtimes are wrong. crop values are set to 0,1,0,1,1,0,1,0,0,1,1, so only grass has numbers.
DIR: /vol/git/EvapoTranspiration
Calculating values. Logging to /vol/git/EvapoTranspiration/logs/WeatherCustom.log
E: json load /vol/git/EvapoTranspiration/logs/16953 ([])
E: json load /vol/git/EvapoTranspiration/ET/16953 ([2.1595999999999997, -1.8694000000000006])
E: for loop logs = ([])
E: for loop l (11)
E: yET = ([2.1595999999999997, -1.8694000000000006])
E: ydur = ([-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1])
E: -2.1781 = round(( 2.1596 ) – ( -1 / 54 ), 4) * -1
E: _1mmProg[‘crop’][0] = 0
E: tET[int(_1mmProg[‘crop’][0])] = -2.1781
E: 1.8194 = round(( -1.8694 ) – ( -1 / 20 ), 4) * -1
E: _1mmProg[‘crop’][1] = 1
E: tET[int(_1mmProg[‘crop’][1])] = 1.8194
E: -2.1899 = round(( 2.1596 ) – ( -1 / 33 ), 4) * -1
E: _1mmProg[‘crop’][2] = 0
E: tET[int(_1mmProg[‘crop’][2])] = -2.1899
E: 1.8106 = round(( -1.8694 ) – ( -1 / 17 ), 4) * -1
E: _1mmProg[‘crop’][3] = 1
E: tET[int(_1mmProg[‘crop’][3])] = 1.8106
E: 1.8424 = round(( -1.8694 ) – ( -1 / 37 ), 4) * -1
E: _1mmProg[‘crop’][4] = 1
E: tET[int(_1mmProg[‘crop’][4])] = 1.8424
E: -2.2152 = round(( 2.1596 ) – ( -1 / 18 ), 4) * -1
E: _1mmProg[‘crop’][5] = 0
E: tET[int(_1mmProg[‘crop’][5])] = -2.2152
E: 1.8324 = round(( -1.8694 ) – ( -1 / 27 ), 4) * -1
E: _1mmProg[‘crop’][6] = 1
E: tET[int(_1mmProg[‘crop’][6])] = 1.8324
E: -2.2096 = round(( 2.1596 ) – ( -1 / 20 ), 4) * -1
E: _1mmProg[‘crop’][7] = 0
E: tET[int(_1mmProg[‘crop’][7])] = -2.2096
E: -2.1929 = round(( 2.1596 ) – ( -1 / 30 ), 4) * -1
E: _1mmProg[‘crop’][8] = 0
E: tET[int(_1mmProg[‘crop’][8])] = -2.1929
E: 1.8424 = round(( -1.8694 ) – ( -1 / 37 ), 4) * -1
E: _1mmProg[‘crop’][9] = 1
E: tET[int(_1mmProg[‘crop’][9])] = 1.8424
E: 1.8069 = round(( -1.8694 ) – ( -1 / 16 ), 4) * -1
E: _1mmProg[‘crop’][10] = 1
E: tET[int(_1mmProg[‘crop’][10])] = 1.8069
E: Done – mmFromLogs
E: ymm = ([-2.1781, 1.8194, -2.1899, 1.8106, 1.8424, -2.2152, 1.8324, -2.2096, -2.1929, 1.8424, 1.8069])
E: yET = ([-2.1929, 1.8069])
E: ET[0] = 4.13, yET[0] = -2.1929
E: ET[1] = 4.8255, yET[1] = 1.8069
E: aET[0] = 8.101 (0.540066666667) // mm/Day
E: times = 0 (max 0.540066666667/min 0.540066666667 max(min(0.540066666667, 4), 0))
E: aET[1] = 0.7992 (0.05328) // mm/Day
E: times = 0 (max 0.05328/min 0.05328 max(min(0.05328, 4), 0))
E: aET[2] = 8.1128 (0.540853333333) // mm/Day
E: times = 0 (max 0.540853333333/min 0.540853333333 max(min(0.540853333333, 4), 0))
E: aET[3] = 0.808 (0.0538666666667) // mm/Day
E: times = 0 (max 0.0538666666667/min 0.0538666666667 max(min(0.0538666666667, 4), 0))
E: aET[4] = 0.7762 (0.0517466666667) // mm/Day
E: times = 0 (max 0.0517466666667/min 0.0517466666667 max(min(0.0517466666667, 4), 0))
E: aET[5] = 8.1381 (0.54254) // mm/Day
E: times = 0 (max 0.54254/min 0.54254 max(min(0.54254, 4), 0))
E: aET[6] = 0.7862 (0.0524133333333) // mm/Day
E: times = 0 (max 0.0524133333333/min 0.0524133333333 max(min(0.0524133333333, 4), 0))
E: aET[7] = 8.1325 (0.542166666667) // mm/Day
E: times = 0 (max 0.542166666667/min 0.542166666667 max(min(0.542166666667, 4), 0))
E: aET[8] = 8.1158 (0.541053333333) // mm/Day
E: times = 0 (max 0.541053333333/min 0.541053333333 max(min(0.541053333333, 4), 0))
E: aET[9] = 0.7762 (0.0517466666667) // mm/Day
E: times = 0 (max 0.0517466666667/min 0.0517466666667 max(min(0.0517466666667, 4), 0))
E: aET[10] = 0.8117 (0.0541133333333) // mm/Day
E: times = 0 (max 0.0541133333333/min 0.0541133333333 max(min(0.0541133333333, 4), 0))
E: open(/vol/git/EvapoTranspiration/logs/16954, ‘w’)
E: open(/vol/git/EvapoTranspiration/ET/16954, ‘w’)
E: File: /vol/git/EvapoTranspiration/wuData/16954
Content-Type: text/html
Resolved your lat:xx.xxxx, lon:-xx.xxxx, they will be stored
0.0 mm precipitation forecast for next 3 days
0.4 mm precipitation fallen and forecast for today
P-M ETo
4.13 mm lost by grass
4.8255 mm lost by shrubs
sunrise & sunset in minutes from midnight local time
326 1303
Weather Station ID: xxxxxxxx
Current logged ET [6.3229, 3.0186]
[54, 20, 33, 17, 37, 18, 27, 20, 30, 37, 16]
[[-1, -1, -1, -1], [437, 0, 267, 0, 0, 146, 0, 162, 243, 0, 0]]