Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenWeatherMap returns incorrect current weather

I'm trying to implement an iphone app and i'm integration OpenWeatherMap to retrieve the current weather. However, I've noticed the data returned is incorrect (off by about 39 degree Fahrenheit).

Below is the JSON URL i'm using to retrieve current weather for Denver, Usa using Lan/Lon coordinates where xxxxxxxxxxxxx is my APPID key.

http://api.openweathermap.org/data/2.5/weather?APPID=xxxxxxxxxxxxx&lat=39.738539&lon=-104.981114

The temperature returned was 291.05988. From documentation read, this temperature unit is Kelvin. So to convert to Fahrenhiet, I take 291.05988 - 254.928 = 36.13188 degree Fahrenheit. However, the true current weather is 75 degree Fahrenheit. This is off by about 39 degrees.

Please advise what I'm doing wrong.

Thanks Loc

like image 381
Loc Pham Avatar asked Aug 07 '14 19:08

Loc Pham


People also ask

How accurate is OpenWeatherMap?

The figure shows that MAE is about 0.5 degrees, RMSE is less than 2 degrees, reliability is between 90% and 100%, and inaccuracy is about 1% (less is better). It is clear that the OpenWeather NWP model provides the most accurate result.

Where does OpenWeatherMap get its data?

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 often is OpenWeatherMap updated?

The frequency of data update is 1 hour.


1 Answers

For those cruising by later, you don't need to do any conversions for Fahrenheit, you can add another query param to your request for that:

Fahrenheit: units=imperial

... also the option for Celsius: units=metric

Example being:

http://api.openweathermap.org/data/2.5/weather?q=London&appid=XXXXXX&units=imperial

Found this here.

like image 182
mfink Avatar answered Nov 03 '22 01:11

mfink