the meteoblue weather API now offers more flexibility on how many forecast days can be retrieved. Previously the API updated roughly twice a day. Every 12 hours a new forecast model run was initialized with measurements form 0:00 or 12:00 UTC and was available a couple of hours later. Once a new model-run was available, the API only displayed the most current weather data for 180 forecast hours.
For end-users living in different time-zones it presents some challenges. Once the 12:00 UTC run arrives in the evening, the API could not provide todays data and only form partial daily aggregations. Most notably the daily minimum temperature is "null". In Asia this may happen early in the afternoon.
In the last couple of months, we developed a new storage system to continuously integrate new data and provide a better user experience. Now the newest 12 forecast runs are available via API and merged into a continuous time-series of data.
If you would like to test this new feature, add the parameter "&history_days=0" to the API URL to control how many days of the past should be displayed. By using "0", data now starts at 0:00 local-time of the current day. "1" starts at yesterday 0:00 local-time. Up to 4 days in the past can be selected. The time zone is automatically detected for the specified latitude and longitude coordinates or can be specified with "&tz=Europe%2FBerlin" or "&tz=UTC".
This behaviour is currently optional but will be the new default in 2 months on Monday, 2019-08-05. Previously the API already varied in the amounts of forecast hours available depending on the location and available forecast domains. The transition to the new 0:00 local-time behaviour works smoothly without any disruption.
The amount of forecast days can be limited with "&forecast_days=7". The meteoblue API ensures that always 7 days of forecast data are returned. For North and South America yesterday’s data could be shown until 4:00 in the morning, because of the time zone offset, model assimilation and computation delay. The "forecast_days" parameter is especially handy for web-applications always showing a fixed number of forecast days. Fewer days can also be selected. If "forecast_days" is not specified, the API returns as much forecast data as possible.
This new storage system is used for our new MLM (meteoblue learning multi-model). With MLM, up to 18 weather models are merged together to achieve a consensus forecast and adapt to the current weather situation and regional patterns. A new MLM forecast is calculated every time a weather model-run is available and continuously updates the forecast data.
As before, observations from measurement stations, radars, satellites and lightnings detectors update very couple of minutes. The current weather condition and the next few hours are continuously updated using nowcast. Each API call uses the newest available nowcast data. The classical model-update time every morning and evening therefore loses significance.
What you should do: If you would like to test the new behaviour in advance, append "&history_days=0" to requests to the meteoblue API. You can also select up to 4 days in the past. Optionally "&forecast_days=7" could be set to always retrieve 7 days of forecast. This feature is available for all API data packages introduced in 2015. Older forecast APIs do not support this behaviour and are slowly discontinued.
An additional reminder will be sent out before switching to the new behaviour a week before. The the behaviour will be default with data-start at 0:00 local-time on Monday, 2019-08-05.