Skip to content

Commit

Permalink
Merge pull request #17 from fl0x53/patch-1
Browse files Browse the repository at this point in the history
Unit mismatch and CSV's best match to Rad1h
  • Loading branch information
FL550 authored Oct 17, 2023
2 parents b823332 + adffedf commit 8a01cc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simple_dwd_weatherforecast/dwdforecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class WeatherDataType(Enum):
CLOUD_COVERAGE = ["N", "cloud_cover_total"] # Unit: % (0..100)
VISIBILITY = ["VV", "horizontal_visibility"] # Unit: m
SUN_DURATION = ["SunD1", ""] # Unit: s
SUN_IRRADIANCE = ["Rad1h", "diffuse_solar_radiation_last_hour"] # Unit: kJ/m^2
SUN_IRRADIANCE = ["Rad1h", "global_radiation_last_hour"] # Unit: kJ/m^2
FOG_PROBABILITY = ["wwM", ""] # Unit: % (0..100)
HUMIDITY = ["humidity", "relative_humidity"] # Unit: %

Expand Down Expand Up @@ -744,7 +744,7 @@ def parse_csv_row(self, row: dict):
else None,
WeatherDataType.VISIBILITY.value[0]: float(
row[WeatherDataType.VISIBILITY.value[1]].replace(",", ".")
)
) * 1e3
if row[WeatherDataType.VISIBILITY.value[1]] != self.NOT_AVAILABLE
else None,
WeatherDataType.SUN_IRRADIANCE.value[0]: float(
Expand Down

0 comments on commit 8a01cc4

Please sign in to comment.