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

#42809

hplato
Participant

OK, I’m trying to get my head around this. So the logic is, if any station runtimes have been calculated to address the water balance, then times should always equal at least 1.

Looking at the original python, the times calculation is:

for each mmTime entry: times = int(max(min(aET / maxRunmm, 4), times)) # int(.999999) = 0
-so for each station, take the minimum of aET / maxRunmn or 4 (since we only have 4 time slots), or if times has been previously set, then take its value.

So should this be,

for each mmTime entry:
if (aET) times = 1 #run once if there is any water to distribute
times = int(max(min(aET / maxRunmm, 4), times)) # int(.999999) = 0