Coder Social home page Coder Social logo

open-meteo / open-meteo Goto Github PK

View Code? Open in Web Editor NEW
1.9K 19.0 121.0 9.21 MB

Free Weather Forecast API for non-commercial use

Home Page: https://open-meteo.com

License: GNU Affero General Public License v3.0

Dockerfile 0.05% Swift 56.26% C 43.67% Shell 0.01%
weather-api weather weather-forecast

open-meteo's Introduction

🌤 Open-Meteo Weather API

Test codebeat badge GitHub license license: CC BY 4.0 Twitter Mastodon DOI

Open-Meteo is an open-source weather API and offers free access for non-commercial use. No API key is required. You can use it immediately!

Head over to https://open-meteo.com! Stay up to date with our blog at https://openmeteo.substack.com.

Features

How does Open-Meteo work?

Open-Meteo utilizes open-data weather forecasts provided by national weather services. These services offer numerical weather predictions that are free to download. However, working with these models can be challenging, as it requires expertise in binary file formats, grid-systems, projections, and the fundamentals of weather predictions.

Like many other weather APIs, Open-Meteo integrates high-resolution local and global weather models. Over 2 TB of data are downloaded and processed daily from multiple national weather services. The collected data is then stored in local files using a customized file format and compression technique to enhance access to time-series data such as a 14-day temperature forecast.

In contrast to other weather APIs, Open-Meteo provides complete access to its source code, and all data sources are openly listed, crediting the national weather services for their work. With Docker or prebuilt Ubuntu packages, it is possible to launch your own weather API within minutes. By providing the source code, users can conduct detailed verifications of the weather data processing and even make modifications themselves. Contributions are highly encouraged and welcomed.

The API is available for non-commercial use at no cost. Despite being free of charge, the forecast accuracy is top-notch. The API utilizes a vast array of local weather models with rapid updates, ensuring that the most precise forecast is generated for any location globally.

Resources

Who is using Open-Meteo?

Apps:

  • Weather.io A simple Progressive Web App (PWA) for checking the weather.
  • WeatherGraph Apple Watch App
  • Slideshow Digital Signage app for Android
  • weewx-DWD Weather forecasts etc. for WeeWX
  • omWeather Android Weather App
  • solXpect Android app which forecasts the output of your solar power plant
  • Raindrop Simple and intuitive weather app for the linux terminal.
  • Weatherian Multi-model meteogram (multi-platform)
  • WeatherAI WeatherAI offers an intuitive user experience that makes checking the weather a breeze.
  • Weather Free, open source, simple and complete weather app for Android
  • DroneWeather Weather forecasts, satellite count, and KP index for drone pilots.
  • Clima Beautiful, minimal, and fast weather app
  • SkyMuse Minimal, privacy-respecting weather app. Built with web technologies.
  • Weather Please Clean and minimal new tab replacement for browsers
  • QuickWeather Fast, free, and open source Android app
  • Rain Free, open source, beautiful, minimal and fast weather app
  • WetBulb A simple app that shows you the wetbulb temp 24h forecast and tells you if it is dangerous.
  • OSS Weather - Multi-model/multi-provider Open Source Android/iOS Weather app

Repositories:

  • Captain Cold Simple Open-Meteo -> Discord integration
  • wthrr-the-weathercrab Weather companion for the terminal
  • Weather-Cli A CLI program written in golang that allows you to get weather information from the terminal
  • Homepage A highly customizable homepage (or startpage / application dashboard) with Docker and service API integrations.
  • Spots Guru Weather forecast for lazy, the best wind & wave spots around you.
  • WeatherReport.jl A simple weather app for the Julia REPL

Other:

  • Menubar Weather A Raycast extension that displays live weather information in your menu bar
  • Contributions welcome!

Do you use Open-Meteo? Please open a pull request and add your repository or app to the list!

Client SDKs

Contributions welcome! Writing a SDK for Open-Meteo is more than welcome and a great way to help users.

Support

If you encounter bugs while using Open-Meteo APIs, please file a new issue ticket. For general ideas or Q&A please use the Discussion section on Github. Thanks!

For other enquiries please contact [email protected]

Run your own API

Instructions to use Docker to run your own weather API are available in the getting started guide.

Terms & Privacy

Open-Meteo APIs are free for open-source developer and non-commercial use. We do not restrict access, but ask for fair use.

If your application exceeds 10'000 requests per day, please contact us. We reserve the right to block applications and IP addresses that misuse our service.

For commercial use of Open-Meteo APIs, please contact us.

All data is provided as is without any warranty.

We do not collect any personal data. We do not share any personal information. We do not integrate any third party analytics, ads, beacons or plugins.

Data License

API data are offered under Attribution 4.0 International (CC BY 4.0)

You are free to share: copy and redistribute the material in any medium or format and adapt: remix, transform, and build upon the material.

Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

You must include a link next to any location, Open-Meteo data are displayed like:

Weather data by Open-Meteo.com

Source Code License

Open-Meteo is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find the license here. Exceptions are third party source-code with individual licensing in each file.

open-meteo's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-meteo's Issues

API says it's cloudy when it's sunny

The API says that it's cloudy right now (July 21st 2022 at 13.00) in Lund, Sweden (latitude 55.42N, longitude 13.11E), but in reality it's sunny. If I make a request to https://api.open-meteo.com/v1/forecast?latitude=55.42&longitude=13.11&timezone=Europe/Stockholm&current_weather=true&hourly=cloudcover,weathercode, it says that the weathercode is 3 which means it's cloudy and that the cloudcover is 100%. But in reality, it's sunny and there are hardly any clouds at all. If I look out the window, it looks like the weathercode should be 0 and the cloudcover should be less than 5%.

This is the JSON it returns:

{"latitude":55.42,"longitude":13.119999,"generationtime_ms":2.655029296875,"utc_offset_seconds":7200,"elevation":27.0,"current_weather":{"temperature":26.6,"windspeed":22.1,"winddirection":164.0,"weathercode":3.0,"time":"2022-07-21T13:00"},"hourly_units":{"time":"iso8601","cloudcover":"%","weathercode":"wmo code"},"hourly":{"time":["2022-07-21T00:00","2022-07-21T01:00","2022-07-21T02:00","2022-07-21T03:00","2022-07-21T04:00","2022-07-21T05:00","2022-07-21T06:00","2022-07-21T07:00","2022-07-21T08:00","2022-07-21T09:00","2022-07-21T10:00","2022-07-21T11:00","2022-07-21T12:00","2022-07-21T13:00","2022-07-21T14:00","2022-07-21T15:00","2022-07-21T16:00","2022-07-21T17:00","2022-07-21T18:00","2022-07-21T19:00","2022-07-21T20:00","2022-07-21T21:00","2022-07-21T22:00","2022-07-21T23:00","2022-07-22T00:00","2022-07-22T01:00","2022-07-22T02:00","2022-07-22T03:00","2022-07-22T04:00","2022-07-22T05:00","2022-07-22T06:00","2022-07-22T07:00","2022-07-22T08:00","2022-07-22T09:00","2022-07-22T10:00","2022-07-22T11:00","2022-07-22T12:00","2022-07-22T13:00","2022-07-22T14:00","2022-07-22T15:00","2022-07-22T16:00","2022-07-22T17:00","2022-07-22T18:00","2022-07-22T19:00","2022-07-22T20:00","2022-07-22T21:00","2022-07-22T22:00","2022-07-22T23:00","2022-07-23T00:00","2022-07-23T01:00","2022-07-23T02:00","2022-07-23T03:00","2022-07-23T04:00","2022-07-23T05:00","2022-07-23T06:00","2022-07-23T07:00","2022-07-23T08:00","2022-07-23T09:00","2022-07-23T10:00","2022-07-23T11:00","2022-07-23T12:00","2022-07-23T13:00","2022-07-23T14:00","2022-07-23T15:00","2022-07-23T16:00","2022-07-23T17:00","2022-07-23T18:00","2022-07-23T19:00","2022-07-23T20:00","2022-07-23T21:00","2022-07-23T22:00","2022-07-23T23:00","2022-07-24T00:00","2022-07-24T01:00","2022-07-24T02:00","2022-07-24T03:00","2022-07-24T04:00","2022-07-24T05:00","2022-07-24T06:00","2022-07-24T07:00","2022-07-24T08:00","2022-07-24T09:00","2022-07-24T10:00","2022-07-24T11:00","2022-07-24T12:00","2022-07-24T13:00","2022-07-24T14:00","2022-07-24T15:00","2022-07-24T16:00","2022-07-24T17:00","2022-07-24T18:00","2022-07-24T19:00","2022-07-24T20:00","2022-07-24T21:00","2022-07-24T22:00","2022-07-24T23:00","2022-07-25T00:00","2022-07-25T01:00","2022-07-25T02:00","2022-07-25T03:00","2022-07-25T04:00","2022-07-25T05:00","2022-07-25T06:00","2022-07-25T07:00","2022-07-25T08:00","2022-07-25T09:00","2022-07-25T10:00","2022-07-25T11:00","2022-07-25T12:00","2022-07-25T13:00","2022-07-25T14:00","2022-07-25T15:00","2022-07-25T16:00","2022-07-25T17:00","2022-07-25T18:00","2022-07-25T19:00","2022-07-25T20:00","2022-07-25T21:00","2022-07-25T22:00","2022-07-25T23:00","2022-07-26T00:00","2022-07-26T01:00","2022-07-26T02:00","2022-07-26T03:00","2022-07-26T04:00","2022-07-26T05:00","2022-07-26T06:00","2022-07-26T07:00","2022-07-26T08:00","2022-07-26T09:00","2022-07-26T10:00","2022-07-26T11:00","2022-07-26T12:00","2022-07-26T13:00","2022-07-26T14:00","2022-07-26T15:00","2022-07-26T16:00","2022-07-26T17:00","2022-07-26T18:00","2022-07-26T19:00","2022-07-26T20:00","2022-07-26T21:00","2022-07-26T22:00","2022-07-26T23:00","2022-07-27T00:00","2022-07-27T01:00","2022-07-27T02:00","2022-07-27T03:00","2022-07-27T04:00","2022-07-27T05:00","2022-07-27T06:00","2022-07-27T07:00","2022-07-27T08:00","2022-07-27T09:00","2022-07-27T10:00","2022-07-27T11:00","2022-07-27T12:00","2022-07-27T13:00","2022-07-27T14:00","2022-07-27T15:00","2022-07-27T16:00","2022-07-27T17:00","2022-07-27T18:00","2022-07-27T19:00","2022-07-27T20:00","2022-07-27T21:00","2022-07-27T22:00","2022-07-27T23:00"],"cloudcover":[7.0,15.0,55.0,13.0,27.0,50.0,2.0,5.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,100.0,85.0,100.0,100.0,0.0,67.0,86.0,35.0,68.0,76.0,94.0,90.0,96.0,100.0,94.0,95.0,83.0,90.0,92.0,85.0,88.0,84.0,95.0,95.0,100.0,100.0,98.0,99.0,100.0,100.0,45.0,26.0,68.0,72.0,98.0,100.0,100.0,100.0,100.0,96.0,95.0,100.0,97.0,99.0,96.0,96.0,91.0,93.0,94.0,95.0,99.0,100.0,94.0,100.0,91.0,76.0,69.0,70.0,93.0,85.0,76.0,62.0,70.0,64.0,100.0,100.0,59.0,36.0,43.0,30.0,13.0,41.0,70.0,98.0,97.0,95.0,94.0,92.0,91.0,89.0,76.0,62.0,48.0,42.0,37.0,31.0,45.0,59.0,74.0,62.0,51.0,40.0,28.0,16.0,4.0,32.0,59.0,87.0,91.0,96.0,100.0,97.0,95.0,92.0,90.0,89.0,88.0,91.0,94.0,97.0,97.0,98.0,98.0,100.0,100.0,99.0,100.0,100.0,100.0,100.0,100.0,100.0,91.0,82.0,74.0,74.0,75.0,75.0,75.0,75.0,75.0,59.0,44.0,29.0,48.0,67.0,86.0,79.0,73.0,66.0,57.0,48.0,39.0,38.0,38.0,37.0,34.0,30.0,27.0,20.0,13.0,6.0],"weathercode":[0.0,1.0,1.0,1.0,1.0,2.0,0.0,0.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,1.0,2.0,3.0,1.0,2.0,2.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,1.0,2.0,2.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,2.0,2.0,3.0,3.0,2.0,2.0,2.0,2.0,3.0,3.0,2.0,1.0,1.0,1.0,1.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,2.0,2.0,1.0,1.0,1.0,2.0,2.0,2.0,1.0,1.0,1.0,0.0,0.0,0.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,80.0,80.0,80.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,1.0,1.0,1.0,3.0,3.0,3.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,0.0,0.0,0.0]}}

This is not the first time this happens, it's happened before that it said it's cloudy when it's sunny, both at this location and at other locations.

Integrate ensemble weather models for a reliable 14 day weather forecast

Integrate 14 days weather forecasts from DWD ICON ensemble https://www.dwd.de/EN/research/weatherforecasting/num_modelling/04_ensemble_methods/ensemble_prediction/ensemble_prediction_node.html

Some research notes:

Data sources:

  • DWD EPS: 3 models (global, Europe, Central-Europe), 40 member, 120h forecast (NOTE: implementing an analytical solution for the ICON grid could save a lot of storage and CPU resources)
  • NOAA GFS ensemble , 30 member, 3 hourly, 364h forecast,
  • ECMWF IFS open-data, 50 member (maybe 100 with next IFS cycle), 360h forecast, 0.4° resolution, only 3 hourly, no clouds / solar radiation
  • MeteoFrance ensemble models -> only payed service available / closed data
  • Canada GEPS: 0.5° resolution, 3-hourly, 384h forecast + 768h seasonal every Thursday), North America version,

Returned "weathercode" is floating-point in "current_weather", "hourly" and "daily"

According to documentation at https://open-meteo.com/en/docs "weathercode" is supposed to be an integer constant:

Variable Valid time Unit Description
weathercode Instant WMO code Weather condition as a numeric code. Follow WMO weather interpretation codes. See table below for details.

yet, in my request:
https://api.open-meteo.com/v1/forecast?temperature_unit=celsius&windspeed_unit=ms&precipitation_unit=mm&timeformat=iso8601&latitude=56.3269&longitude=44.0075&timezone=auto&current_weather=true&hourly=weathercode&daily=weathercode

It is returned as a floating point number:

{"latitude":56.3125,"longitude":44.0,"generationtime_ms":1.1490583419799805,"utc_offset_seconds":10800,"timezone":"Europe/Moscow","timezone_abbreviation":"MSK","elevation":146.0,"current_weather":{"temperature":11.0,"windspeed":1.98,"winddirection":45.0,"weathercode":3.0,"time":"2022-10-10T17:00"},"hourly_units":{"time":"iso8601","weathercode":"wmo code"},"hourly":{"time":["2022-10-10T00:00","2022-10-10T01:00","2022-10-10T02:00","2022-10-10T03:00","2022-10-10T04:00","2022-10-10T05:00","2022-10-10T06:00","2022-10-10T07:00","2022-10-10T08:00","2022-10-10T09:00","2022-10-10T10:00","2022-10-10T11:00","2022-10-10T12:00","2022-10-10T13:00","2022-10-10T14:00","2022-10-10T15:00","2022-10-10T16:00","2022-10-10T17:00","2022-10-10T18:00","2022-10-10T19:00","2022-10-10T20:00","2022-10-10T21:00","2022-10-10T22:00","2022-10-10T23:00","2022-10-11T00:00","2022-10-11T01:00","2022-10-11T02:00","2022-10-11T03:00","2022-10-11T04:00","2022-10-11T05:00","2022-10-11T06:00","2022-10-11T07:00","2022-10-11T08:00","2022-10-11T09:00","2022-10-11T10:00","2022-10-11T11:00","2022-10-11T12:00","2022-10-11T13:00","2022-10-11T14:00","2022-10-11T15:00","2022-10-11T16:00","2022-10-11T17:00","2022-10-11T18:00","2022-10-11T19:00","2022-10-11T20:00","2022-10-11T21:00","2022-10-11T22:00","2022-10-11T23:00","2022-10-12T00:00","2022-10-12T01:00","2022-10-12T02:00","2022-10-12T03:00","2022-10-12T04:00","2022-10-12T05:00","2022-10-12T06:00","2022-10-12T07:00","2022-10-12T08:00","2022-10-12T09:00","2022-10-12T10:00","2022-10-12T11:00","2022-10-12T12:00","2022-10-12T13:00","2022-10-12T14:00","2022-10-12T15:00","2022-10-12T16:00","2022-10-12T17:00","2022-10-12T18:00","2022-10-12T19:00","2022-10-12T20:00","2022-10-12T21:00","2022-10-12T22:00","2022-10-12T23:00","2022-10-13T00:00","2022-10-13T01:00","2022-10-13T02:00","2022-10-13T03:00","2022-10-13T04:00","2022-10-13T05:00","2022-10-13T06:00","2022-10-13T07:00","2022-10-13T08:00","2022-10-13T09:00","2022-10-13T10:00","2022-10-13T11:00","2022-10-13T12:00","2022-10-13T13:00","2022-10-13T14:00","2022-10-13T15:00","2022-10-13T16:00","2022-10-13T17:00","2022-10-13T18:00","2022-10-13T19:00","2022-10-13T20:00","2022-10-13T21:00","2022-10-13T22:00","2022-10-13T23:00","2022-10-14T00:00","2022-10-14T01:00","2022-10-14T02:00","2022-10-14T03:00","2022-10-14T04:00","2022-10-14T05:00","2022-10-14T06:00","2022-10-14T07:00","2022-10-14T08:00","2022-10-14T09:00","2022-10-14T10:00","2022-10-14T11:00","2022-10-14T12:00","2022-10-14T13:00","2022-10-14T14:00","2022-10-14T15:00","2022-10-14T16:00","2022-10-14T17:00","2022-10-14T18:00","2022-10-14T19:00","2022-10-14T20:00","2022-10-14T21:00","2022-10-14T22:00","2022-10-14T23:00","2022-10-15T00:00","2022-10-15T01:00","2022-10-15T02:00","2022-10-15T03:00","2022-10-15T04:00","2022-10-15T05:00","2022-10-15T06:00","2022-10-15T07:00","2022-10-15T08:00","2022-10-15T09:00","2022-10-15T10:00","2022-10-15T11:00","2022-10-15T12:00","2022-10-15T13:00","2022-10-15T14:00","2022-10-15T15:00","2022-10-15T16:00","2022-10-15T17:00","2022-10-15T18:00","2022-10-15T19:00","2022-10-15T20:00","2022-10-15T21:00","2022-10-15T22:00","2022-10-15T23:00","2022-10-16T00:00","2022-10-16T01:00","2022-10-16T02:00","2022-10-16T03:00","2022-10-16T04:00","2022-10-16T05:00","2022-10-16T06:00","2022-10-16T07:00","2022-10-16T08:00","2022-10-16T09:00","2022-10-16T10:00","2022-10-16T11:00","2022-10-16T12:00","2022-10-16T13:00","2022-10-16T14:00","2022-10-16T15:00","2022-10-16T16:00","2022-10-16T17:00","2022-10-16T18:00","2022-10-16T19:00","2022-10-16T20:00","2022-10-16T21:00","2022-10-16T22:00","2022-10-16T23:00"],"weathercode":[3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,3.0,3.0,3.0,2.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,61.0,61.0,3.0,3.0,3.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,61.0,53.0,53.0,53.0,53.0,53.0,53.0,61.0,55.0,61.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,3.0,3.0,3.0,3.0,3.0,3.0,2.0,2.0,2.0,2.0,2.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,45.0,45.0,45.0,45.0,45.0,45.0,45.0,45.0,45.0,0.0,0.0,0.0,1.0,1.0,1.0,2.0,2.0,2.0,1.0,1.0,1.0,3.0,3.0,3.0,2.0,2.0]},"daily_units":{"time":"iso8601","weathercode":"wmo code"},"daily":{"time":["2022-10-10","2022-10-11","2022-10-12","2022-10-13","2022-10-14","2022-10-15","2022-10-16"],"weathercode":[3.0,3.0,61.0,61.0,3.0,45.0,45.0]}}

Add ECMWF precipitation and run off

Precipitation and run off were not yet integrated into Open-Meteo due to decoding issues. With updated decoders, this should now be possible

Incorrect error message for past_days out of range

If past_days > 92 you see the following incorrect error message:

{"error":true,"reason":"Past days is invalid. Allowed range 0 to 2. Given 93."}

Expected
{"error":true,"reason":"Past days is invalid. Allowed range 0 to 92. Given 93."}

[Question] Distance from coast in marine API

Is there any data in the DWD source you're using (or from another source you've come across) from which you can determine the distance from the requested (or model grid) point to the nearest coastline? For example, requesting data for Dublin (latitude: 53.3441, longitude: -6.2675) returns data for grid point latitude: 53.25, longitude: -6.25, which is here:

image

It would be useful to know the actual distance from this point to the coastline (and whether it is on a landmass or on water), perhaps as an optional parameter (so that the API endpoint could even be used to return only this information, without any actual wave data). I suspect that this information is not readily available!

Too slow to build OM files ?

Hey, first thank you very much for the great work !
I noticed that building the OM files in the DonwloadCommands takes too long ( for the icon global domain for example it takes 30/40 min) for each variable ? Is that a correct behaviour ? is there a way to speed up the process?
I see that your cronjobs are scheduled close to each other, with the number of variables i beleive that commands are lanuched before the previous ones are finished, how do you manage to make this work without issues ?

Thanks again for you fantastic work.

Kotlin library

In the past few days, I started implementing the API in an android launcher with Kotlin, but I ended up creating a separate library, which I would like to share here on Github.
Before publishing it, I would like to ask two things:

  1. How should I name the package? Currently, it's io.github.dadibit.openmeteolibrary for the library itself, and io.github.dadibit.openmeteoexample for the example app, but com.openmeteo.library and com.openmeteo.app would be easier names ('-' is not a valid character for package names, but '_' is, sorry)

  2. Because I have never made a separate android library from any android app I've ever coded, I would love to receive some support from more expert users on how I should structure the files.

The library has an OpenMeteoApi class and a OpenMeteoApiParams object, which groups some enums for the values each parameter can have + a simple date formatter.

Can't use UTC as a timezone for daily weather variables

Issue

I want to use UTC time, and be able to get daily weather variables, but I can't. I guess UTC isn't a real timezone option?

What should happen:

I get the daily weather variables with UTC time.

What actually happens:

image

[Suggestion] DWD MOSMIX

It would be great if you could add an endpoint for DWD MOSMIX. I've seen this mentioned as being on the roadmap, in a couple of comments on other issues, but I figured it would do no harm to suggest this explicitly here!

Free National weather services

Hi, I thought it would be nice to open a dedicated issue for some inputs on free National weather services. Because each new entry would require plenty of coding and debugging, I would suggest using this issue only to keep track of them (at least for the moment).

Although I'm not (yet) a contributor, I think implementing services that have a wide coverage should be more important than "more local" ones.

[Question] Geocoding API protobuf 3 structure

Hi guys, I'm a noob and sorry for disturbing ya, but I couldn't find anywhere how to structure my .proto file, so I've downloaded the bin and tried to decode it, here are my results:

HTTPS REQUEST:
https://geocoding-api.open-meteo.com/v1/search?name=Berlin&count=1&format=protobuf

location.proto:

syntax = "proto3";

message Location {
   int32 id = 1;
   string name = 2;
   float latitude = 4;
   float longitude = 5;
   float elevation = 7;
   string feature_code = 8;
   string country_code = 9;
   int32 admin1_id = 10;
   int32 admin2_id = 11;
   int32 admin3_id = 12;
   int32 admin4_id = 13;
   string timezone = 14;
   int32 population = 15;
   repeated string postcodes = 17;
   int32 country_id = 18;
   string country = 19;
   string admin1 = 20;
   string admin2 = 21;
   string admin3 = 22;
   string admin4 = 23;
}

message LocationSearchResults {
   repeated Location results = 1;
}

If anyone know an easy way to find this proto structure, it would be nice to learn, because it took me sometime to figure it out!
Cheers!

[Suggestion] Tidal information

It would be great if open-meteo could provide a tides API endpoint to provide tidal information (times series and/or high-low points), similar to the worldtides API. My understanding is that worldtides uses data from official national agencies, where available, and fills in any gaps from a global model (based on "satellite telemetry" and "harmonic analysis"). I guess this could be integrated into the marine API endpoint, or could be separate.

[Suggestion] parameter to specify model in DWD and MeteoFrance APIs

At the moment, the API endpoints for DWD and MeteoFrance combines data from multiple models. Whilst this is very useful, it would also be nice to be able to request data from a specific one of the models, so that you know exactly what data you're getting... and it would be OK if no data is returned for certain variables or even all variables, depending on model and location, because each model has its own geographical coverage and/or parameter set.

Protobuf format

Instead of JSON, return data using protobuf in the same or similar structure.

Heights in feet

Offer an additional unit switch to get elevations in feet:

  • Elevation API
  • Snow height
  • Freezing level height

Mentioned in #76

Last three items in hourly are null

The last three hours of all hourly requests are null for all fields except time.

Request URL: https://api.open-meteo.com/v1/forecast?latitude=38.8921&longitude=-77.0241&hourly=temperature_2m&current_weather=true&timezone=America%2FNew_York

{
  "latitude": 38.875,
  "longitude": -77,
  "generationtime_ms": 0.29289722442626953,
  "utc_offset_seconds": -14400,
  "elevation": 5,
  "current_weather": {
    "temperature": 29.3,
    "windspeed": 6.7,
    "winddirection": 286,
    "weathercode": 0,
    "time": "2022-07-20T10:00"
  },
  "hourly_units": {
    "time": "iso8601",
    "temperature_2m": "°C"
  },
  "hourly": {
    "time": [
      "2022-07-20T00:00",
      "2022-07-20T01:00",
      "2022-07-20T02:00",
      "2022-07-20T03:00",
      "2022-07-20T04:00",
      "2022-07-20T05:00",
      "2022-07-20T06:00",
      "2022-07-20T07:00",
      "2022-07-20T08:00",
      "2022-07-20T09:00",
      "2022-07-20T10:00",
      "2022-07-20T11:00",
      "2022-07-20T12:00",
      "2022-07-20T13:00",
      "2022-07-20T14:00",
      "2022-07-20T15:00",
      "2022-07-20T16:00",
      "2022-07-20T17:00",
      "2022-07-20T18:00",
      "2022-07-20T19:00",
      "2022-07-20T20:00",
      "2022-07-20T21:00",
      "2022-07-20T22:00",
      "2022-07-20T23:00",
      "2022-07-21T00:00",
      "2022-07-21T01:00",
      "2022-07-21T02:00",
      "2022-07-21T03:00",
      "2022-07-21T04:00",
      "2022-07-21T05:00",
      "2022-07-21T06:00",
      "2022-07-21T07:00",
      "2022-07-21T08:00",
      "2022-07-21T09:00",
      "2022-07-21T10:00",
      "2022-07-21T11:00",
      "2022-07-21T12:00",
      "2022-07-21T13:00",
      "2022-07-21T14:00",
      "2022-07-21T15:00",
      "2022-07-21T16:00",
      "2022-07-21T17:00",
      "2022-07-21T18:00",
      "2022-07-21T19:00",
      "2022-07-21T20:00",
      "2022-07-21T21:00",
      "2022-07-21T22:00",
      "2022-07-21T23:00",
      "2022-07-22T00:00",
      "2022-07-22T01:00",
      "2022-07-22T02:00",
      "2022-07-22T03:00",
      "2022-07-22T04:00",
      "2022-07-22T05:00",
      "2022-07-22T06:00",
      "2022-07-22T07:00",
      "2022-07-22T08:00",
      "2022-07-22T09:00",
      "2022-07-22T10:00",
      "2022-07-22T11:00",
      "2022-07-22T12:00",
      "2022-07-22T13:00",
      "2022-07-22T14:00",
      "2022-07-22T15:00",
      "2022-07-22T16:00",
      "2022-07-22T17:00",
      "2022-07-22T18:00",
      "2022-07-22T19:00",
      "2022-07-22T20:00",
      "2022-07-22T21:00",
      "2022-07-22T22:00",
      "2022-07-22T23:00",
      "2022-07-23T00:00",
      "2022-07-23T01:00",
      "2022-07-23T02:00",
      "2022-07-23T03:00",
      "2022-07-23T04:00",
      "2022-07-23T05:00",
      "2022-07-23T06:00",
      "2022-07-23T07:00",
      "2022-07-23T08:00",
      "2022-07-23T09:00",
      "2022-07-23T10:00",
      "2022-07-23T11:00",
      "2022-07-23T12:00",
      "2022-07-23T13:00",
      "2022-07-23T14:00",
      "2022-07-23T15:00",
      "2022-07-23T16:00",
      "2022-07-23T17:00",
      "2022-07-23T18:00",
      "2022-07-23T19:00",
      "2022-07-23T20:00",
      "2022-07-23T21:00",
      "2022-07-23T22:00",
      "2022-07-23T23:00",
      "2022-07-24T00:00",
      "2022-07-24T01:00",
      "2022-07-24T02:00",
      "2022-07-24T03:00",
      "2022-07-24T04:00",
      "2022-07-24T05:00",
      "2022-07-24T06:00",
      "2022-07-24T07:00",
      "2022-07-24T08:00",
      "2022-07-24T09:00",
      "2022-07-24T10:00",
      "2022-07-24T11:00",
      "2022-07-24T12:00",
      "2022-07-24T13:00",
      "2022-07-24T14:00",
      "2022-07-24T15:00",
      "2022-07-24T16:00",
      "2022-07-24T17:00",
      "2022-07-24T18:00",
      "2022-07-24T19:00",
      "2022-07-24T20:00",
      "2022-07-24T21:00",
      "2022-07-24T22:00",
      "2022-07-24T23:00",
      "2022-07-25T00:00",
      "2022-07-25T01:00",
      "2022-07-25T02:00",
      "2022-07-25T03:00",
      "2022-07-25T04:00",
      "2022-07-25T05:00",
      "2022-07-25T06:00",
      "2022-07-25T07:00",
      "2022-07-25T08:00",
      "2022-07-25T09:00",
      "2022-07-25T10:00",
      "2022-07-25T11:00",
      "2022-07-25T12:00",
      "2022-07-25T13:00",
      "2022-07-25T14:00",
      "2022-07-25T15:00",
      "2022-07-25T16:00",
      "2022-07-25T17:00",
      "2022-07-25T18:00",
      "2022-07-25T19:00",
      "2022-07-25T20:00",
      "2022-07-25T21:00",
      "2022-07-25T22:00",
      "2022-07-25T23:00",
      "2022-07-26T00:00",
      "2022-07-26T01:00",
      "2022-07-26T02:00",
      "2022-07-26T03:00",
      "2022-07-26T04:00",
      "2022-07-26T05:00",
      "2022-07-26T06:00",
      "2022-07-26T07:00",
      "2022-07-26T08:00",
      "2022-07-26T09:00",
      "2022-07-26T10:00",
      "2022-07-26T11:00",
      "2022-07-26T12:00",
      "2022-07-26T13:00",
      "2022-07-26T14:00",
      "2022-07-26T15:00",
      "2022-07-26T16:00",
      "2022-07-26T17:00",
      "2022-07-26T18:00",
      "2022-07-26T19:00",
      "2022-07-26T20:00",
      "2022-07-26T21:00",
      "2022-07-26T22:00",
      "2022-07-26T23:00"
    ],
    "temperature_2m": [
      25.6,
      25,
      25,
      24.7,
      24.4,
      24,
      23.7,
      24,
      26.1,
      28,
      29.3,
      30.5,
      31.5,
      32.3,
      33.1,
      33.5,
      33.9,
      33.8,
      33.6,
      33,
      31.5,
      29.3,
      28.3,
      27.4,
      27,
      26.9,
      26.6,
      26.1,
      25.5,
      25.1,
      24.8,
      24.9,
      25.8,
      27.3,
      28.9,
      30.8,
      32.6,
      32.7,
      33.6,
      34.7,
      34.7,
      34.7,
      33.8,
      33,
      31.9,
      30.9,
      30,
      29.3,
      28.3,
      27.3,
      26.6,
      26.1,
      25.6,
      24.9,
      24.4,
      24.5,
      26.3,
      28.1,
      29.6,
      30.9,
      32,
      33,
      33.8,
      34.5,
      34.9,
      35,
      34.7,
      34,
      32.3,
      30.3,
      29.3,
      28.5,
      27.7,
      26.6,
      26.3,
      26.1,
      25.8,
      25.4,
      24.8,
      24.7,
      26.5,
      28.1,
      30.3,
      32.8,
      34,
      34.8,
      35.6,
      36.1,
      36.3,
      36.1,
      35.6,
      34.9,
      33.5,
      32.2,
      30.7,
      28.9,
      28.1,
      27.4,
      26.7,
      26.2,
      25.8,
      25.7,
      25.8,
      26.2,
      27.4,
      29.1,
      31.3,
      33.9,
      35.5,
      36.9,
      38.3,
      38.9,
      39.2,
      39.1,
      38.5,
      37.5,
      35.8,
      34.2,
      32.3,
      30.3,
      29.7,
      29.6,
      29.7,
      28.8,
      28.3,
      27.7,
      27.6,
      27.5,
      28.1,
      29.2,
      30.8,
      32.9,
      34.4,
      36,
      37.1,
      36.7,
      35.5,
      33.9,
      33.3,
      32.8,
      31.9,
      30.6,
      29.2,
      27.5,
      26.9,
      26.6,
      26.2,
      25.9,
      25.7,
      25.3,
      24.7,
      24,
      23.4,
      23.5,
      24,
      24.8,
      25.6,
      26.5,
      27.4,
      27.6,
      27.5,
      27.1,
      26.8,
      26.3,
      25.8,
      null,
      null,
      null
    ]
  }
}

Forecast for `morning`, `afternoon`, `evening` and `night`

Aggregate data to morning, afternoon, evening and night time-intervals

Daily aggregations just went live with the following variables:

  • Weathercode
  • Maximum Temperature (2 m)
  • Minimum Temperature (2 m)
  • Maximum Apparent Temperature (2 m)
  • Minimum Apparent Temperature (2 m)
  • Precipitation Sum
  • Precipitation Hours
  • Maximum Wind Speed (10 m)
  • Maximum Wind Gusts (10 m)
  • Dominant Wind Direction (10 m)
  • Shortwave Radiation Sum

Parameter timezone is required if daily aggregations are used.

[Bug](Geocoding API) Variable "count" not working

Issue description

Different values for count do not change the response. The number of returned search results is always 10 (default)

Steps to reproduce the issue

  1. Make a Geocoding API call with default count
  2. Make another call with value between 1 to 100

What's the expected result?

  • count should be the number of search results to return.

Additional details / screenshot

I was working on the Open-Meteo .NET library and some internal tests failed when changed the default count. After some research I've come to the conclusion that this has to do with the backend.

The requests I used:

To make sure that there aren't only 10 Berlins in the world I also tried just some characters

Error: Cannot initialize ForecastSurfaceVariable from invalid String value cape for key hourly

The following API call:

https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&hourly=temperature_2m,cape&models=jma_seamless,ecmwf_ifs04

returns:

{
  error: true,
  reason: "Cannot initialize ForecastSurfaceVariable from invalid String value cape for key hourly"
}

Of course, the variable cape isn't available for the requested models. But IMHO it would be better if it just didn't return anything for any missing variable, rather than fail completely. That way, we can request all the variables we want, and only expect some back. This fits better with the flexible way in which multiple models can be requested, not all of which will have all variables.

Indeed, it seems inconsistent, because that's what already happens with the following call, where visibility isn't available for the requested models:

https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&hourly=temperature_2m,visibility&models=jma_seamless,ecmwf_ifs04

Despite no visibility, at least we get a response with what is available, which seems better.

Thanks for all your efforts!

Historical Forecast question

Hello- I have a clarifying question about the forecast API.

If I use past_days in my request like so:

https://api.open-meteo.com/v1/forecast?latitude=41.85&longitude=-87.65&hourly=temperature_2m&temperature_unit=fahrenheit&timezone=America%2FChicago&past_days=1

for hours from yesterday, do the values for the temperature_2m key represent actual temperature_2m values at that hour, or are they what was forecasted for that hour. If the latter, when was that forecast made?

Improve 80 and 120 meter wind

Currently the 80 and 120 wind level are not correctly adjusted for terrain. The difference gets more relevant in mountainous terrain.

To correctly adjust, the following formula could be used:

h59 = hhl59 - hsurf
h58 = hhl58 - hsurf
a = log(wind59 / wind58) / log(h59 / h58)
windAdj = wind59 * (hAdj/h59) ** a

Add last update times & meta information as API

Return update times of used datasets for a given coordinate as well as which models are selected for best match with attribution.

Information:

  • Model
  • Source
  • License
  • Attribution / URL
  • Spatial Resolution
  • Temporal Resolution (including step down to 3 or 6 hourly)
  • Last update time
  • Update frequency
  • Optional: List of available weather variables
  • Optional: Estimated time of next update / Current progress in downloading and conversion

[Suggestion] Integrate Geocoding with Weather Forecast API

First of all, thank you very much for providing a free weather API without a need for any registration or API key.

I have two suggestions regarding geocoding, which would make the integration with your Weather Forecast API much easier:

If the Geocoding API is publicly available, I would be happy to prepare a pull request.

OpenWeather OneCallAPI

What about providing a 1:1 copy of the OpenWeather OneCallAPI?
Most open source weather apps could immediately switch to open-meteo

Code for the docs page with the JS chart

Hello,

Is the code for the page https://open-meteo.com/en/docs, specifically with the Javascript code for the generation of the chart, in the Github or somewhere else?

I'd like to do a similar HTML/PHP + JS page with just the chart for a specific latitude + longitude + temperature_min + temperature_max + 7 past days + 7 future days:

image

Thanks!

ECMWF returns null pressure values

According to the docs for the ECMWF API, pressure_msl and surface_air_pressure parameters should be available. But these always seem to return only null values?

Examples:

https://api.open-meteo.com/v1/ecmwf?latitude=52.52&longitude=13.41&hourly=pressure_msl,surface_air_pressure,temperature_2m

https://api.open-meteo.com/v1/ecmwf?latitude=36.71&longitude=4.71&hourly=pressure_msl,surface_air_pressure,temperature_2m

pressure_msl: [
    null,
    null,
    null,
    null,
    null,
    ...

surface_air_pressure: [
    null,
    null,
    null,
    null,
    null,
    ...

Historical API areas

Hi,

From the historical API docs:

data for sea, far north areas and the poles are unavailable in the public API.

Would it make sense to include a static image showing where data is available in order to avoid hitting the server with unnecesary requests?

For instance, in some sea places I see data but not in others, is it based in ERA5 grid point location? Are EEZ included?

The inclusion of the sea EEZ would be interesting as there are a lot of activities related with near shore areas.

In some periods I see data but not in others: E.g., see this in a sea (far from coast) area:
https://archive-api.open-meteo.com/v1/era5?latitude=38&longitude=3&start_date=2021-01-01&end_date=2022-07-10&hourly=temperature_2m

Thanks.

[Bug](Weather API) direct_normal_irradiance[0] is always null

Issue Description

The first index of direct_normal_irradiance is always null which makes type-safe deserializing pretty rough.
As long as values are null you can not deserialize it to a float[].

Steps to reproduce the issue

  1. Set request hourly to hourly=direct_normal_irradiance
  2. Check hourly.direct_normal_irradiance[0]

What's the expected result?

The default value should be 0 to be type-safe (most languages assert that a number [float,int...] is never "null". Like Java, C, C++, C#)
The behavior should be like direct_normal_irradiance_instant.

Additional details / screenshot

Berlin: https://api.open-meteo.com/v1/forecast?latitude=52.5235&longitude=13.4115&hourly=direct_normal_irradiance
London: https://api.open-meteo.com/v1/forecast?latitude=51.5002&longitude=-0.1262&hourly=direct_normal_irradiance
Madrid: https://api.open-meteo.com/v1/forecast?latitude=40.4167&longitude=-3.7033&hourly=direct_normal_irradiance
Tokyo: https://api.open-meteo.com/v1/forecast?latitude=35.6785&longitude=139.6823&hourly=direct_normal_irradiance

Suggestion : Add an autocomplete api for the geocoding Api

Hello, first of all I would like to thank you for your work which allows me to have a free weather api.

I have a suggestion, why not add an auto-completion api for the geocoding api? Indeed, if the spelling of the name of the city is not exact, the api finds nothing. For example, if I write Val d'Isère, the api doesn't find anything, it only finds the city when I write Val-D'Isère, which can be annoying for the user.

If it’s not possible, do you know a free autocomplete api for city’s names ?

Thanks again for your excellent work.

[Suggestion] include model run time in response

It would be great if we can determine what model run the data from a particular response comes from.

For example, for the following call:

https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&hourly=temperature_2m&models=icon_eu

it would be ideal if there was some metadata to tell us whether the data is from the run at 00h or 06h or 12h or 18h (just a single UTC time value representing the model run time would be fine).

I appreciate that it gets more tricky with data from multiple models (either requested explicitly via models or implicitly via the seamless variant) but I do think it's important to know exactly what the data is, and in particular how old it is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.