earthobservations / wetterdienst

Open weather data for humans.
https://wetterdienst.readthedocs.io/
MIT License
339 stars 52 forks source link

Missing `sunshine_duration` values in mosmix forecasts #1297

Open darian-heede opened 1 month ago

darian-heede commented 1 month ago

Describe the bug For a few months now (since 2024-02-23 from my estimate), the parameters sunshine_duration and radiation_global from mosmix forecast requests return no values for around 100 German cities I tested.

To Reproduce Steps to reproduce the behavior:

docker run -i ghcr.io/earthobservations/wetterdienst:0.84.0 wetterdienst values \
  --provider=dwd \
  --network=mosmix \
  --resolution=small \
  --coordinates=51.045,7.019 \
  --rank=10 \
  --si-units=1 \
  --parameter=sunshine_duration

Expected behavior I expect the parameters sunshine_duration and radiation_global to have values.

Additional context The date this issue first started coincides with the release of v0.74.0, which might be related, even though we did not update to that release version until a while later.

gutzbenj commented 1 month ago

My best bet is there's simply no more sunshine_duration data provided for those stations! Maybe it is time to open the interpolation/summary methods to all providers, thereby allowing users to take into account data of multiple stations.

darian-heede commented 1 month ago

@gutzbenj this indeed seems to be the case!

When I compare the station IDs from before missing the sunshine_duration to after, I can't find any same IDs, implying that all stations have changed for a given coordinate pair. When I check the stations, I can see that all are valid (from before and after) and nothing that explains why suddenly another set of stations are chosen for the same coordinate pair. We did update from v0.52.0 to v0.75.0 around the time though.

Anyway, I think your suggestion for opening the interpolation/summary to all providers (especially mosmix in our case) makes sense and will solve our issue here.

gutzbenj commented 1 month ago

Dear @darian-heede ,

with the latest release I opened the interpolation/summary to all providers. Unfortunately for your example I'm not sure it helps. When I run the code with your config, it didn't stop for a while and probably will take a lot of time taking all those stations nearby into consideration. I'm guessing it's kind of a blackout effect, that made an entire bunch of stations in a particular region not return sunshine duration anymore, thus when searching for values of other stations it takes a lot to "get out of this blackout area".

darian-heede commented 1 month ago

Hi @gutzbenj, thank you for adding interpolation to all providers, I'll test to see if it helps with our issue.

gutzbenj commented 1 month ago

We may add some sort parameter that allows the user to go from outside to inside. However in this case the user would have to check and see if the result e.g. the average distance of used stations is of sufficient quality.