From 3e8bfbf7be59dceefa60cb9789cc6cc1bddb41ad Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 17 Mar 2021 17:14:14 -0500
Subject: [PATCH] updates for icing intensity

---
 modules/icing/pireps.py | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/modules/icing/pireps.py b/modules/icing/pireps.py
index 6b46115a..8d68bfde 100644
--- a/modules/icing/pireps.py
+++ b/modules/icing/pireps.py
@@ -17,15 +17,13 @@ ATYPE = '/TP'
 RMK = '/RM'
 
 
-# Returns icing/non-icing
+# Returns icing/neg-icing
 def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-55, 55]):
-    no_ice_reports = []
-    ice_reports = []
 
     # HEADER: VALID,URGENT,AIRCRAFT,REPORT,LAT,LON
 
     ice_dict = {}
-    no_ice_dict = {}
+    neg_ice_dict = {}
 
     with open(filename) as file:
         for idx, line in enumerate(file):
@@ -76,17 +74,15 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-55, 55]):
                 timestmp = dto.timestamp()
 
                 if len(re.findall(NO_ICE, ice_str)) != 0:
-                    no_ice_reports.append(ice_str)
-                    rpts = no_ice_dict.get(timestmp)
+                    rpts = neg_ice_dict.get(timestmp)
                     tup = (lat, lon, fl, ice_str)
                     if rpts is None:
                         rpts = []
                         rpts.append(tup)
-                        no_ice_dict[timestmp] = rpts
+                        neg_ice_dict[timestmp] = rpts
                     else:
                         rpts.append(tup)
                 else:
-                    ice_reports.append(ice_str)
                     so = re.search(ICE_LVL, ice_str)
                     if so is not None:
                         lvl_a, lvl_b = so.group().split('-')
@@ -137,4 +133,4 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-55, 55]):
                     else:
                         rpts.append(tup)
 
-    return ice_dict, no_ice_dict
+    return ice_dict, neg_ice_dict
-- 
GitLab