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

snapshot...

parent 3639ae85
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,6 @@ def pireps(filename, lon_range=[-180, 180], lat_range=[-55, 55]):
# HEADER: VALID,URGENT,AIRCRAFT,REPORT,LAT,LON
with open(filename) as file:
cnt = 0
for idx, line in enumerate(file):
toks = line.split(',')
if toks[0] == 'VALID': # Skip headers (concatenated files)
......@@ -110,9 +109,9 @@ def pireps(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(cnt)
no_ice_reports.append(ice_str)
else:
ice_reports.append(cnt)
ice_reports.append(ice_str)
so = re.search(ICE_LVL, ice_str)
if so is not None:
lvl_a, lvl_b = so.group().split('-')
......@@ -125,12 +124,10 @@ def pireps(filename, lon_range=[-180, 180], lat_range=[-55, 55]):
fl = max(lvl_a, lvl_b)
reports.append(ice_str)
lats.append(lat)
lons.append(lon)
alts.append(fl)
times.append(timestmp)
cnt += 1
lats = np.array(lats)
lons = np.array(lons)
......
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