I'm using the Open Weather Map API for weather forecast. Current available version is 2.5 Here is a snippet of XML
...
<time day="2013-09-07">
<symbol number="500" name="light rain" var="10d"/>
<precipitation value="2.5" type="rain"/>
<windDirection deg="8" code="N" name="North"/>
<windSpeed mps="1.16" name="Calm"/>
<temperature day="14.56" min="12.79" max="14.56" night="12.79" eve="14.56" morn="14.56"/>
<pressure unit="hPa" value="973.09"/>
<humidity value="98" unit="%"/>
<clouds value="broken clouds" all="68" unit="%"/>
</time>
...
Here is the API request.
Does anyone know the unit of the field precipitation ?
2.5 are mm of rain? perhaps a probability?
Thanks in advance.
dt : Data receiving time (in unix, UTC format). dt is the time of data receiving in unixtime GMT (greenwich mean time).
We collect and process weather data from different sources such as global and local weather models, satellites, radars and a vast network of weather stations. Data is available in JSON, XML, or HTML format.
Looks like https://openweathermap.org/api/hourly-forecast will give you a list of forecasts. Look at the list. dt value which is "Time of data forecasted, Unix, UTC". Iterate over the list and find the time value which matches (as closely as possible) the time you're interested in.
Their description for protocol of weather station data transmission describes data for upload in millimetres for both snow and rain. And their JSON API v.1.0 (previous one) states Precipitation volume i.e. not probability.
All in all, it is precipitation volume in mm.
You can get precipitation probability with a forecast (not history as far as I know) from forecast.io
{"time":1421080800,"precipIntensity":0.0401,"precipIntensityError":0.0099,"precipProbability":0.47,"precipType":"rain"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With