Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've investigated and tried several (free) weather API's for my web app: https://uw.leftium.com.

Open-Meteo looks pretty good! The only thing that seems to be missing for me is precipitation probability. The weathercode is sort of a proxy for this... I'm also interested in sunrise/sunset times; direct_radiation is kind of a proxy for this.

Kudos for providing optional historical data with the same API call for the forecast. Many weather API's don't provide historical data, and even if they do, it requires extra calls. My weather app charts the previous two days of weather with the forecast for comparison. I feel this gives a more intuitive sense of the weather vs. raw numbers because weather is very relative. ("Warm" vs "cool" depends on your location and season.)

In addition, I am in the process of adding AQI forecasts, which requires even more network calls. It seems like this is on the roadmap for open-meteo. I was surprised to find there are so many different standards for AQI. Curious to know which one you plan to use.

One possible suggestion for optimizing the output format: sending seconds since the Unix epoch would save a few bytes per timestamp. I'm not sure if this would make any noticeable difference with gzip compression. The current datetime format is much more human-readable and may save a conversion before displaying.

These were the best (free) weather API's I could find. It's interesting how the three different weather forecasts can disagree so much:

- https://openweathermap.org/api

- https://www.visualcrossing.com/weather-api

- https://darksky.net/dev (deprecated)

When I find the time, I will add open-meteo as to my app! I'll probably have more feedback then.



Thanks for your suggestions!

I will add precipitation probability as soon as I include 14-day ensemble weather models. Deterministic whether models usually do not offer this directly.

I also really like the 2 days historical access :) At some point I would like to add more, but the storage requirements skyrocket quickly. Not only in space, but also disk IO to perform in-place updates.

For air quality data I want to add first all variables individually. AQI can be calculated afterwards on-the-fly. Some AQI indices require data from the previous hours, but it should work well with 2 days past data. For sure I will directly integrate the European and US AQI.

I considered unix-timestamp instead of ISO9601 string timestamps. Working with unix-timestamps is a bit trickier if you also want to use timezones. For the start, i settled with ISO8601 timestamps. I might consider adding unix timestamps as an `&timeformat=unix` parameter to the API. Regarding saving bytes in the output: I would like to implement protobuf as a format and also use it to build some SDKs. Especially with large floating point arrays, this saves a lot of parsing time and preserves precision.

All your suggestions are now kept in the Open-Meteo backlog https://github.com/open-meteo/open-meteo/issues


Hi Geoff,

I currently build ensemble based modelling solutions for bushfire/wildfire. Weather is a significant component in how fire behaves and is forecast. Whilst I have access commercially to several models and meteorologists through work I'd be keen on chatting with you a little further about the possibility of including fire weather metrics in your forecasts, or at least using the data in bulk if possible to include in my own public facing project.


Sure, what kind of fire weather metrics could be added? Can they be derived from soil moisture, temperature, wind, humidity? Or are you referring to gridded fire indices from a different source?

For now I would refrain to include data that is non-date or has restrictive licences.

You can find my email on the open-meteo site and drop me some information


Just to give you a quick reply here, because its late here:

Yes, the basic fire weather metrics are derived from the factors you mentioned. Different places globally have some different measures, but I can speak to Australia, Greece, Portugal, California style setups. Northern US and Canadian pine forests are a little more outside my area of knowledge, but could locate more info easily enough.

I wouldn't wish to pursue a project using commercial IP or introduce additional costs where none should exist.


Cool! I think unix timestamps should always be in UTC (no timezone). But the timezone may affect the exact time range of the results.

What does "starts at 0:00 today" mean? Ideally, it is 0:00 of the local timezone. (Some other weather API's mess this up!)


At whatever time of day you call the API, data always starts at 0:00. Either UTC or the time zone you selected.

Many weather APIs follow weather model runs. Therefore in the evening, data suddenly starts at 12:00 UTC regardless of the timezone. It is quite a pain, if you want to build an app displaying todays data, but in the evening you do not get data from the morning anymore.

With Open-Meteo multiple weather model runs are merged together and partly overwritten. At around 4:00 UTC, the first weather model with data starting at 0:00 UTC arrived (usually called 0z run). 3 hours later, the 3z run arrives with data starting at 3:00 UTC. After a couple or model runs arrive, it is quite a mix out of different weather model runs. If done right, you notice nothing of this behaviour ;)

    < 0z run >
      < 3z run>
        < 6z run>
          < 9z run>
Data is constantly merged into a time-series. The API then selects the appropriate start time, which is set to 0:00 UTC (or if a timezone is set, local-time at 0:00, which could be 4:00 UTC depending on the utc offset).

Yes, unix-timestamps must be in UTC+0. If a timezone is set, data still starts at "2021-09-13T00:00", but this is now local-time. With a 4 hour UTC offset, I would have to set the unix-timestamp to "2021-09-12T20:00" and the developer has to correctly reapply the UTC offset again to get local time. This can be done, but is prone to errors.


I wrote my top-level comment about missing ensemble forecasts[1] before I saw this answer of yours. Is the German weather service offering the public access to ensemble forecasts?

And, more critically, since I like your API: will you offer public access to ensemble forecasts? That would make my life better.

[1]: https://news.ycombinator.com/item?id=28520616


German weather service does offer ensemble weather forecast. You can find it here - https://opendata.dwd.de/weather/nwp/icon-eps/grib/. DWD also has excellent documentation.


Thank you for that. I run a home dashboard for my family that includes weather forecast from openweathermap.

This morning I decided to change the provider because the forecast is really unstable.

I will be glad to try yours and give feedback if you are interested. I am near Paris.


Just as a note regarding extra calls for weather APIs for historical, there is generally a good reason (coming from someone who built a global weather/energy API).

A) Using Numeric Weather Prediction models (NWP) data as 'historical' data is highly dependent on use case. For some application, this is totally fine and the best available data but with more rapid observation satellites becoming quite low latency, using a +2hour NWP forecast as 'historical' could be quite wrong and source of the data should be clear. For a lot of parameters this is the only choice but certain models have different biases for different areas of the world, limiting the use case further unless your backend is willing to apply improvements based on these known biases.

B) A lot of use cases really are only interested in future predictions and they can also store forecasts at +0 and keep a their own record for performance tracking. Yes it is handy for some, its wasteful for others.

C) This separation allows you to separate your infrastructure as keeping even a relatively short historical record at high geospatial/temporal resolution with good query time gets expensive quickly. Eg, satellite data (I dealt with cloud detection) is commonly at 0.5-2km resolution at update every 5-15 minutes you start having to sub sample locations quickly if you want to store even only weeks of data that is low latency available, if you track 1-2M points at 30 minutes even 2 weeks is 1.3B rows ignoring the number of parameters you might be storing. Where as forecast data can be moved to 'cold' (high latency) cheaper storage more quickly since the latest forecast is the more valuable, quickly losing its value over time. This means you can use storage like Redis to store latest forecasts for rapid ingestion and fetching. Storing historical forecast data per model at +N hours/minutes ahead and you start multiplying your historical data costs again.

Massive kudos meteo-jeff for building this service, accessibility of public data can be extremely frustrating and while GRIB/NetCDF make looking at data over an area through time somewhat more manageable, a lot of use cases are just interested in a single point. My contact is in my bio if you ever want to chat, great public service you are doing, well done!


I have never engineered a weather api, but also wondered why historical data is so sparse. Thank you for clearing it up!


Mind sharing what location service you are using ? You nailed both my wired and 4g location, and I live in a small village here in Spain.



That worked very well for my very rural Cornwall location too, impressive. As with most of these services was completely mislead by the VPN on my work machine.


thanks


Nice app! Could you please include Celsius as option?


Celsius is already the default temperature unit. You can optionally switch to Fahrenheit.

For wind speeds, all typical units are available as well. Let me know if I missed one.


If you're referring to https://uw.leftium.com/, tap the temperature in landscape mode ;)

The app defaults to F because it gives the more "human" temperature range.


This doesn't seem to work on desktop?

I've never heard of F as the more 'human' temperature range. Don't you either use C or F. Since I've never used F it doesn't seem more human to me.


Temperatures in °F always feel to me like climate change is donne for good and the atmosphere is now able to boil water in summer.


I found the exact timestamp in the video, but MKBDH actually didn't explain it very well.

So I found some other articles that articulate why F is better for weather: https://news.ycombinator.com/item?id=28524505


On desktop you may need to adjust the browser window size until it's portrait aspect ratio. On windows I snap it to half the screen. In landscape the app shows the extended forecast.

Sorry I'm on mobile and can't link directly to the relevant part of the video: https://youtu.be/BMGrsOawKac

Basically F gives more precise info/digit for the temperature ranges humans experience. 99F is near the top of the range, while 99C is unheard of for weather on Earth. So F gives approximately twice the precision. To get the same precision in C you have to add decimals


> Basically F gives more precise info/digit for the temperature ranges humans experience. 99F is near the top of the range, while 99C is unheard of for weather on Earth. So F gives approximately twice the precision. To get the same precision in C you have to add decimals

Same amount of bits used either way, i.e., you can also use dezi-Celsius, e.g. 22.5 °C = 225° dC, while not commonly used when displaying it, it gives just the same info and is often used in µC; so that's really not an argument for Fahrenheit.

The top-range being 100 °F is just nonsense, there are lots of places with 110° F (~43° C) and also some with 120°F (~50° C) and some places that top out at 70° F (~21° C) in summer. Also, that would imply that bottom is 0° F (~ -17° C) and mid-range is 50° F (~ 10° C), both aren't true for either observed temperatures in most parts of the world nor would 50° F be a good level for human comfort, which is subjective anyhow.

The single thing that could make one think that a temperature scale is a better fit for human consumption is being used to that scale. If one grows up with °F then naturally °F is the scale than one can better relate to, similar with Celsius.

The actual benefits of Celsius are relation to freezing and boiling point (combined with barometric pressure) of water, something that is daily used by a lot of people (cook pasta, make ice cubes, know not to lick metal poles at <0°C, ...) and more importantly, can actually be objectively related too.

In addition to that it scales 1:1 with Kelvin, a scale that actually has a defined lower end that matters a lot in our universe.


Yes, same amount of bits, but different number of digits and thus screen real estate.

I was speaking from personal experience. One of the reasons I made it easy to toggle between F and C in my app was so I could adjust from F to C (in Korea). I think it worked and I am comfortable using both C and F now (although I admit I am more accustomed to F).

However, one thing I noticed when I switch to C in my app is I get less information. I have seen systems that double the C reading to get a similar precision as F, but then it is no longer really C.

My point was not that temperatures don't go over 100F, but that F uses the entire range of 2-digit readings. C only uses half of the positive 2-digit range.

Also because freezing in F is above 0, you can show a useful range of temperatures below freezing before having to add a negative sign.

So I still argue F is more information-dense than C given a 2-digit temperature reading for weather.


> The app defaults to F because it gives the more "human" temperature range.

It because you are american. For europeans using celsius this is more like hieroglyphs (but I understand it works same other way around).


I've learned to use both C/F (although I admit I am more accustomed to F).

More detailed arguments for F for weather here: https://news.ycombinator.com/item?id=28524505

Merits of Metric vs. Imperial generalized:

- Metric: science-based, regular (powers of 10)

- Imperial: human-scaled, divisible (many divisors, including 3) An inch is about the breadth of a human thumb, and a foot is 12 inches. (Also about the length of a human foot.)

For example, a surfer says "if you measure wave height in metres or cm it is not as accurate compared to the human body (a 6ft wave is under 2 m and we would not call a wave 182.88 cm high)"

edit: length -> breadth


possibily one of the worst arguments in favor of something I've ever heard. "human-scaled" just because you grew up in a culture that uses them. In my mind, a foot doesn't mean anything since my foot, my wife's and my daughter's are quite different in lenght, while 30cm is 30cm for everyone - and once you start using meters as unity of measure you can easily envision it in your mind. So, please stop saying "it's clearer", it's NOT.


Yes I was referring to leftum. Can't you just check the IP? Or introduce a toggle on desktop?


The app's main use case was for mobile, where you can easily toggle between portrait and landscape.

And I am using it fine on desktop by toggling with the Windows snap feature.

But yes, a toggle on desktop would be nice and more user-friendly...


Is it possible to pass a query string parameter, for choosing either C or F? That would be fantastic for bookmarking, to save that extra click. :)

... and I'll add, awesome work. I love simple sites like this that are built well and are actually useful. Well done.


Great idea. It should be simple to add. Just need to connect the variable that controls C/F display with the logic that handles other query string parameters.

https://github.com/Leftium/ultra-weather


does your app believe today is Thursday?


The app hit the DarkSky API free tier limit, so it's displaying mock data. There is a little message at the bottom. (Probably didn't snow two days ago, either...)

This API still works: https://uw.leftium.com/?api=openweather


OK, I don't see the message here and my localization is correctly recognized so I didn't think it could be mock data. Snow two days ago? Let me think... probably not ;)


Ah, probably because you were viewing in landscape mode. The message only appears in portrait mode.

The app's main use case was for mobile, where you're likely to start in portrait orientation.

I'll have to make the landscape mode more usable, especially on desktop.


Wasn't DarkSky scheduled for closure by the end of the year?


Yes, I thought my project would die with the DarkSky API, but then I found some other free API's:

- https://uw.leftium.com/?api=openweather

- https://uw.leftium.com/?api=visualcrossing

I kept DarkSky the default API because it tends to be the fastest. (And it used to be the most accurate? These days openweather seems to predict the rain better.)

However, soon Open-Meteo will be the default API!




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: