Forum Replies Created
-
AuthorPosts
-
dolfsParticipantUnfortunately there is yet another problem (which I discovered tonight). When you use parseFloat to convert yesterday’s precip to a float there will be a problem if the string was empty (which does happen with wunderground apparently). This then results in NaN and when you attempt to clamp against 0 for both today and yesterday and add them together, the result of the addition is then also NaN. This in turn results in 100% in Zimmerman. It makes sense to interpret an empty value as 0.
I suggest adding
if (isNan(currentPrecip)) currentPrecip = 0.0 if (isNan(yesterdayPrecip)) yesterdayPrecip = 0.0
alternatively
precip: ( (currentPrecip < 0) || isNan(currentPrecip)) ? 0 : currentPrecip ) + (( yesterdayPrecip < 0 || isNan(yesterdayPrecip)) ? 0 : yesterdayPrecip ),
Attachments:
dolfsParticipantAha. This may then be related to 200% Watering because of .9999 precip today if the one time a day this level was computed fell in the same window where, according to this bug linked to, I ended up with a 200% watering there. I see a few day with 3 WL samples taken in that window where WL=200 if I retrieve using the URL provided.
So, I’ll look again in a week, now that the linked bug supposedly has been fixed and see if the problem goes away.
dolfsParticipantExcellent!
dolfsParticipantThe particular weather station is not the problem. Wunderground is messing up during the interval where California (my location) is still in one day, and the wunderground servers are already in the next day. I am simply asking to make the weather script more robust so that negative precip values are turned into 0. That doesn’t fix wunderground, but makes OS more robust in the face of such issues and helps keep things watered properly. Sine negative precip cannot exist, this fix can do no harm.
-
AuthorPosts