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
Thanks Shawn,
Forgot about minimum. I can’t quite see how you disabled start time, nor do I see the actual mininum being factored in (this is your older code, the the logic is the same):
minRunmm = (min(minmax) if len(minmax) > 0 and min(minmax) >= 0 else 5)
maxRunmm = (max(minmax) if len(minmax) > 1 and max(minmax) >= minRunmm else 15)
times = 0
[snip]
for x in range(len(data[‘mmTime’])):
aET = safe_float(ET[data[‘crop’][x]] – todayRain – ymm[x] – tadjust) # tadjust is global ?
pretimes = times
times = int(max(min(aET / maxRunmm, 4), times)) # int(.999999) = 0
So thinking this through logically you’d want times > 0 _if_ the aET /minRunmm > 0 so maybe:
if (aET / minRumm > 0) times = 1;
times = int(max(min(aET / maxRunmm, 4), times)) # int(.999999) = 0
Make sense?