Tl;dr You can now get past data with free Open-Meteo APIs. No API key required.
Weather forecasts from numerical models can never be compared directly to ground station measurements.
If you compare your home weather station with forecast, you will always notice differences. The temperature is off by a couple of degrees, wind is coming from a different angle or the precipitation sum of the past days could be less than half.
High resolution weather models are using 1x1 kilometer “grid-cells” to calculate weather based on current conditions and mathematical equations. Both of them have limited accuracy and a 1x1 kilo-meter grid-cells is still relatively large.
Although not “hyper-local”, weather models perform fairly well at predicting changes in large scale patterns like high and low pressure systems. Temperature forecasts for the next 3 days are usually within a couple of °C accuracy.
To bridge the gap to your personal weather station, simple statistics or machine learning can be used to optimise the “last mile”. A simple multivariate regression or a random forest algorithm are a good start.
The approach is simple:
Compare measurements from the past weeks with weather models
Calculate statistics
Combine forecast and statistics to get an improved forecast
The improved forecast fits quite well and eliminates most simple errors like temperature always 2° too high.
In practice getting all the pieces together is a challenging task.
Your weather station might not have an easy way to get past measurements
Measurements could have outliers and inconsistencies
Past weather forecasts are not easily accessible
Combining everything with a programming language like Python is a steep learning curve
With Open-Meteo, getting the past weather forecast bit, is now a lot easier!
Starting now, all our weather forecast APIs store the past forecasts as well. Simply by setting the `&past_days=14` parameter in the URL, you can get historical weather forecasts.
Below you find an example of 2 weeks past weather data for Berlin and a forecast for the next 7 days. The red line marks the current day.
The Open-Meteo API documentation gives you a head start in configuring your own free weather forecast API with historical data. Just look for the button “Past days” and set it to “2 weeks”.
In the background, Open-Meteo combines multiple runs of a weather model into one continuous time-series. How this works is explained in the article below.
There are plenty of possibilities with past weather data. You could build your own dashboard with rain of the past days or forecast your photovoltaic energy production.
Don’t miss to get future updates. There are plenty of new features planned like a weather archive that reaches centuries back or a seasonal forecast for the next months.
Hi,
I noticed that the forecast API has a "past days" filter which would also allow us to retrieve historical data from past days, weeks etc.. is the historical data from forecast API the same as the one from historical weather API?
Or the historical data from forecast API is the historical forecast data, not the actual?
THANKSS
Hi
Is the historical data weather forecasts or actual recorded weather?