Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Precipitation field in OpenWeatherMap API 2.5

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.

like image 889
fustaki Avatar asked Sep 07 '13 22:09

fustaki


People also ask

What is DT in OpenWeatherMap?

dt : Data receiving time (in unix, UTC format). dt is the time of data receiving in unixtime GMT (greenwich mean time).

Where does OpenWeatherMap get data from?

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.

How can I get the hourly weather from OpenWeatherMap org?

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.


2 Answers

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.

like image 150
silpol Avatar answered Nov 16 '22 00:11

silpol


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"}

like image 38
ejectamenta Avatar answered Nov 16 '22 02:11

ejectamenta