From 07dd380ab9bdb7f6357d1c6c2328856ea00cd20e Mon Sep 17 00:00:00 2001 From: Alexander Vasarab Date: Mon, 15 Feb 2021 21:37:37 -0800 Subject: [PATCH] Round precip accum to 2 decimal places --- infoex-autowx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/infoex-autowx.py b/infoex-autowx.py index 1f25bc5..1844d45 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -294,6 +294,8 @@ def main(): infoex['wx_data'][element_cd] = round(infoex['wx_data'][element_cd]) elif element_cd in ['TOBS', 'air_temp', 'PRES', 'pressure']: infoex['wx_data'][element_cd] = round(infoex['wx_data'][element_cd], 1) + elif element_cd in ['PREC', 'precip_accum']: + infoex['wx_data'][element_cd] = round(infoex['wx_data'][element_cd], 2) # CONSIDER: Casting every value to Float() -- need to investigate if # any possible elementCds we may want are any other data -- 2.30.2