Skip to content
Snippets Groups Projects
Commit 5290937a authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 5556a4c1
No related branches found
No related tags found
No related merge requests found
......@@ -53,10 +53,8 @@ def pireps(filename):
no_ice_reports = []
ice_reports = []
with open(filename) as file:
all = 0
cnt = 0
for idx, line in enumerate(file):
all += 1
toks = line.split(',')
report = toks[3]
......@@ -91,9 +89,22 @@ def pireps(filename):
continue
if len(re.findall(NO_ICE, s)) != 0:
no_ice_reports.append(idx)
no_ice_reports.append(cnt)
else:
ice_reports.append(idx)
ice_reports.append(cnt)
so = re.search(ICE_LVL, s)
if so is not None:
ia, ib = so.span()
lvl_a, lvl_b = so.group().split('-')
if lvl_a.find('FL') >= 0:
lvl_a = float(lvl_a[2:]) * 100 * 0.3048
lvl_b = float(lvl_b[2:]) * 100 * 0.3048
else:
lvl_a = float(lvl_a) * 100 * 0.3048
lvl_b = float(lvl_b) * 100 * 0.3048
fl = max(lvl_a, lvl_b)
reports.append(s)
lats.append(lat)
......@@ -104,8 +115,6 @@ def pireps(filename):
lats = np.array(lats)
lons = np.array(lons)
print(len(ice_reports), len(no_ice_reports))
def get_amv_nd(filename):
header = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment