Lurker News

Comments (147) 35 threads

Earlier comments
asaddhamani1 reply#
Does anyone know where I can get accurate weather data from remote locations (in India)?

I've been meaning to do some analysis on historical weather data to try and understand the impact of climate change, and all the open APIs I have tried have inaccurate data.
Data for Manali in India: https://api.open-meteo.com/v1/forecast?latitude=32.2432&long...
When the actual low is 12 celsius and high is 20 celsius, this shows low as 4 and high as 18.
We have https://dsp.imdpune.gov.in/ but they charge thousands of dollars for their records and require a lot of paperwork.

asaddhamani2 replies#
Thanks, this is one of the more accurate ones I've seen, it's still a bit off (3-4 degrees). Do you know where I can get historical data going back at least 10 years?
a_square_peg2 replies#
I run a service (https://oikolab.com) that has hourly data going back 70 years.

Continue this thread — 2 replies

konradx#
yr.no/met.no are using the Arome-model for Scandinavia and Baltic states (It is a cooperation between the states,shearing HPC's and human resources), and the ECMWF model for the rest of the world
filleokus1 reply#
Looks really awesome! Very quick responses.

I would be interested in seeing the implementation of the service, interesting choice going with Swift. I'm guessing your using something like Vapor for hosting the API?
How are the files designed? I'm guessing you have some cheap way of mapping (lat, long) into a file location? Maybe just by truncating the coordinates to your precision and mapping them onto the file? Using some fancy-pants Uber Hexagons[0]. How is the forecast delivered?
Hmm! Many questions :-). I've been thinking lately of similar (but not for weather) "geographical" API's, and how to store/query data cheaply, so this interested me :-)
[0]: https://github.com/uber/h3

meteo-jeff1 reply#
Yes, the API part is using Vapor. But there is not much code that actually relies on Vapor. It is mostly doing request parameter parsing and routing.

I use simple 2D lat lon grids for different regions and resolutions. E.g. the global grid uses 2879x1441 pixel grid. The third dimension is time. All data are stored directly as floating points on disk. Because I know the dimensions of the grid, I can read data exactly at the correct position on disk. I use Float16 as well, which saves me 50% disk space compared to Float32.
Fancy hexagons like H3 are not necessary. They could reduce storage by ~30%, but require much more effort and I have to "modify" the forecast. I keep forecast data from national weather services as untouched as possible.

modeless1 reply#
Very cool! Random weird suggestion: you could get very substantial further space savings (2x-16x) by storing the data in a compressed texture format such as ASTC HDR. What makes compressed textures different from other compressed image formats is that they are designed for random access of the compressed data, with fixed size blocks. Compression is lossy but you can choose the compression level to match your data. I expect that weather data is very suitable for compression so you should be able to get a large benefit with few artifacts.
meteo-jeff2 replies#
Thanks for pointing me towards ASTC HDR. I did not know this one. Compression will be an important part to build a longer historic database. I tested zstd, but it only had a ratio of 30%.

Currently I am using fixed size files, because I update all weather data "in-place". I can calculate which bytes to read for a given geographic location. If data is compressed, this would be very hard to do.

Continue this thread — 2 replies

jxy1 reply#
What is the license of the data from the German weather service you are repackaging? Would that conflict with your ToS?
meteo-jeff#
DWD is quite unrestricted. Data is also processed, mixed with different models and many weather variables are calculated afterwards using other models. It is not showing raw data directly.

As far as I interpret terms correctly, I have to indicate that I am using open-data from DWD, but for value added services, this attribution is not required for all applications using it. I will do some additional research in this regard, whether applications using Open-Meteo should also display a disclaimer.

alin231 reply#
This looks like the API I was looking for to compute the best screen brightness in the absence of a light sensor in Lunar [0]

I would probably do a request per day for each user of this feature, which would amount to about 300-400 requests/day. Would that fit in the non-commercial use tier?
I would be happy to start paying like $5/month if I'll find a way to improve the brightness calculation logic with your API. If you don't yet have a payment processor integrated, maybe we can work it out through something simpler like Patreon or Buy me a coffee recurring payments.
What I'm not sure about is what data would best fit my needs. I was thinking of using Cloud Cover first but I don't know which one would affect the daylight perceived brightness:

    cloudcover
    cloudcover_low
    cloudcover_mid
    cloudcover_high
There's also the (new to me) sun radiation data which seems even more fitting to what I need, but again, not sure which one to use:

    shortwave_radiation
    direct_radiation
    diffuse_radiation
I would guess that direct_radiation is what I need but I thought I should ask first in case you have more insight into what data would most fit my use case.

[0] https://lunar.fyi/#location

meteo-jeff1 reply#
Nice app. Even open source :)

Regular "shortwave_radiation" should fit your needs. This is basically "direct_radiation + diffuse_radiation".
I am not entirely sure, if this effects your users that much, because many will work indoors and only a fraction of sunlight will get in.
You can contact me directly via mail for a non-commercial use waver.

alin23#
Thanks for the insight! I would have probably just chosen direct_radiation not knowing better.

Most users of this "brightness by sun position" feature work in rooms with lots of natural light so they complain about their screens being too bright in cloudy days. I think some improvements will be noticed.
I'll contact you through the email on the Contact Us [0] page when I have something working properly, thanks for this!

Load more comments