OpenSprinkler / OpenSprinkler-Weather

OpenSprinkler weather service used to calculate watering scale for the OpenSprinkler Unified Firmware.
https://opensprinkler.com
63 stars 38 forks source link

open-meteo.com as a complete weather api provider (incl. ET) #120

Open mlatorre31 opened 2 years ago

mlatorre31 commented 2 years ago

open-meteo.com Very interesting weather api for (among other use) agricultural data (evapotranspiration, solar radiation, etc). Therefore very useful for OpenSprinkler watering management. Includes also a forecast which could make possible to manage future watering programs and also weather forecast representation. Also seems to cover large part of the globe (at least EU and US with 2km resolution). Features seems good and well documented. And free (or with attractive licensing I guess for commercial use).

open-meteo commented 2 years ago

Creator of open-meteo here

Let me know if you need additional weather variables, formats or other information. For US there is not yet a 2 km integrated, but it is on the roadmap for the next weeks

Best, Jeff

mlatorre31 commented 2 years ago

Thanks Jeff for jumping in This is a very interesting job you are doing!

There are three adjustments methods used to asses the watering scale based on weather. Please somebody correct me if wrong

Zimmerman requires humidity, precipitation, temperature ETo use this algorithm to implement potential evapotranspiration. I don't know if your api provide already this same value. But I guess that each component could be retrieved as per current implementation Rain Delay use current rain data to delay programs

I guess that a new weather provider could be implemented but I have no JS and Node.js background to help more...

rmloeb commented 2 years ago

A new weather provider that delivered exactly the same JSON string as the application in this github would be most welcome, although even 2km may be too large an area. There are some other criteria that I don't entirely understand. For example, the current OpenSprinkler wather app caches the previous days weather at midnight and delivers that for the next 24 hours, substituting current temp and rain in the JSON string. Caching is done by geolocation. You can see that in the code for the app. Solar radiation is a requirement for ETo calculation.

garudaonekh commented 2 years ago

Go thru the open-meteo.com api, it does provide ETo but I am not sure how accurate for location outside US.

Anyone with more experienced with this, please share more insight on this.

open-meteo commented 2 years ago

@garudaonekh sorry for the late reply. ET₀ Reference Evapotranspiration just not yet supported, until now ;-)

Today I implemented FAO-56 Penman-Monteith ET₀. Input (temperature, humidity, wind and irradiation) is directly used from weather models.

The calculation should be very close to the paper @mlatorre31 linked. The difference is, that weather models use backwards averaged radiation and the solar calculation in this paper was not considering it. Additionally I am using slightly more accurate clear sky radiation and use hourly data instead of daily data.

Best, Jeff

opensprinklershop commented 2 years ago

I made it. See https://github.com/opensprinklershop/OpenSprinkler-Weather

mlatorre31 commented 2 years ago

@opensprinklershop Thank you!

I tried to alter a little bit your implementation as open-meteo provides directly hourly ET0 values (thanks @open-meteo !) without calculation needs. However I had to create a new getET0 method from weatherProvider in order to not alter other Weather Providers relying on getEToData to do the math. I am new to TypeScript so probably very sketchy....

garudaonekh commented 1 year ago

@opensprinklershop Thank you!

I tried to alter a little bit your implementation as open-meteo provides directly hourly ET0 values (thanks @open-meteo !) without calculation needs. However I had to create a new getET0 method from weatherProvider in order to not alter other Weather Providers relying on getEToData to do the math. I am new to TypeScript so probably very sketchy....

Can you share this? OpenMeteo ET0 is good. I don't know TypeScript