diff --git a/modules/icing/pireps.py b/modules/icing/pireps.py index 8d68bfde2764e65381899ae39e124ff3027e45fc..498dbe63a846b906b0c23bf10f36c2dc6405b722 100644 --- a/modules/icing/pireps.py +++ b/modules/icing/pireps.py @@ -24,6 +24,7 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-55, 55]): ice_dict = {} neg_ice_dict = {} + no_ice_dict = {} with open(filename) as file: for idx, line in enumerate(file): @@ -75,7 +76,7 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-55, 55]): if len(re.findall(NO_ICE, ice_str)) != 0: rpts = neg_ice_dict.get(timestmp) - tup = (lat, lon, fl, ice_str) + tup = (lat, lon, fl, 0, ice_str) if rpts is None: rpts = [] rpts.append(tup) @@ -133,4 +134,13 @@ def pirep_icing(filename, lon_range=[-180, 180], lat_range=[-55, 55]): else: rpts.append(tup) - return ice_dict, neg_ice_dict + rpts = no_ice_dict.get(timestmp) + tup = (lat, lon, fl, 0, 'no observed icing') + if rpts is None: + rpts = [] + rpts.append(tup) + no_ice_dict[timestmp] = rpts + else: + rpts.append(tup) + + return ice_dict, no_ice_dict, neg_ice_dict