modified: .gitignore
modified: app.py
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -30,3 +30,5 @@ Dockerfile
|
|||||||
.dockerignore
|
.dockerignore
|
||||||
package.json
|
package.json
|
||||||
create-minecraft-server.sh
|
create-minecraft-server.sh
|
||||||
|
|
||||||
|
__pycache__/
|
||||||
Binary file not shown.
4
app.py
4
app.py
@@ -106,9 +106,9 @@ def get_mosmix_forecast(lat, lon, hours=72):
|
|||||||
precip_raw = rr1c if not _isnan(rr1c) else (rr1 if not _isnan(rr1) else None)
|
precip_raw = rr1c if not _isnan(rr1c) else (rr1 if not _isnan(rr1) else None)
|
||||||
precip = round(float(precip_raw), 1) if precip_raw is not None else 0.0
|
precip = round(float(precip_raw), 1) if precip_raw is not None else 0.0
|
||||||
|
|
||||||
# Regenwahrscheinlichkeit
|
# Regenwahrscheinlichkeit (Wert kommt als Bruchteil 0.0–1.0)
|
||||||
rprob_raw = params.get("probability_precipitation_height_gt_0_1mm_last_1h")
|
rprob_raw = params.get("probability_precipitation_height_gt_0_1mm_last_1h")
|
||||||
rain_prob = round(float(rprob_raw)) if not _isnan(rprob_raw) else None
|
rain_prob = round(float(rprob_raw) * 100) if not _isnan(rprob_raw) else None
|
||||||
|
|
||||||
n = params.get("cloud_cover_total")
|
n = params.get("cloud_cover_total")
|
||||||
clouds = round(float(n)) if not _isnan(n) else None
|
clouds = round(float(n)) if not _isnan(n) else None
|
||||||
|
|||||||
Reference in New Issue
Block a user