Skip to content

Commit

Permalink
Merge pull request #8 from sotpapathe/main
Browse files Browse the repository at this point in the history
Fix wind speed conversion
  • Loading branch information
ways authored Oct 15, 2024
2 parents ee7d10b + 7e5d287 commit 98428a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fingr.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,13 @@ def format_meteogram(
for interval in forecast.data.intervals:
temperature = int(interval.variables["air_temperature"].value)
wind_from_direction = int(interval.variables["wind_from_direction"].value)
wind_speed = int(interval.variables["wind_speed"].value)
if wind_chill:
temperature = calculate_wind_chill(temperature, wind_speed)
if beaufort:
interval.variables["wind_speed"].convert_to("beaufort")
elif imperial:
interval.variables["wind_speed"].convert_to("mph")
wind_speed = int(interval.variables["wind_speed"].value)
precipitation = 0
try:
rain = math.ceil(float(interval.variables["precipitation_amount"].value))
Expand Down

0 comments on commit 98428a5

Please sign in to comment.