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

snapshot...

parent 71edacf3
No related branches found
No related tags found
No related merge requests found
...@@ -211,12 +211,12 @@ def pirep_icing_boeing_txt(filename, lon_range=[-180, 180], lat_range=[-63, 63]) ...@@ -211,12 +211,12 @@ def pirep_icing_boeing_txt(filename, lon_range=[-180, 180], lat_range=[-63, 63])
toks = line.split(' ') toks = line.split(' ')
if len(toks) != 12: # Check for line format error if len(toks) != 12: # Check for line format error
continue continue
year = 2000 + toks[0] year = 2000 + int(toks[0])
month = toks[1] month = int(toks[1])
day = toks[2] day = int(toks[2])
hour = toks[3] hour = int(toks[3])
minute = toks[4] minute = int(toks[4])
second = toks[5] second = int(toks[5])
try: try:
lat = float(toks[6]) lat = float(toks[6])
...@@ -238,7 +238,7 @@ def pirep_icing_boeing_txt(filename, lon_range=[-180, 180], lat_range=[-63, 63]) ...@@ -238,7 +238,7 @@ def pirep_icing_boeing_txt(filename, lon_range=[-180, 180], lat_range=[-63, 63])
dto = dto.replace(tzinfo=timezone.utc) dto = dto.replace(tzinfo=timezone.utc)
ts = dto.timestamp() ts = dto.timestamp()
if ice_bool[k] == 1: if ice_bool == 1:
tup = (lat, lon, flt_alt, 1, 0, 'None', degK, spd) tup = (lat, lon, flt_alt, 1, 0, 'None', degK, spd)
rpts = ice_dict.get(ts) rpts = ice_dict.get(ts)
if rpts is None: if rpts is None:
...@@ -259,6 +259,8 @@ def pirep_icing_boeing_txt(filename, lon_range=[-180, 180], lat_range=[-63, 63]) ...@@ -259,6 +259,8 @@ def pirep_icing_boeing_txt(filename, lon_range=[-180, 180], lat_range=[-63, 63])
rpts.append(tup) rpts.append(tup)
cnt_no_ice += 1 cnt_no_ice += 1
return ice_dict, no_ice_dict, None
def pirep_icing_from_boeing_nc(dirname='/ships19/cloud/scratch/ICING/BOEING/icing/2020/', lon_range=[-180, 180], lat_range=[-63, 63]): def pirep_icing_from_boeing_nc(dirname='/ships19/cloud/scratch/ICING/BOEING/icing/2020/', lon_range=[-180, 180], lat_range=[-63, 63]):
flist = [] flist = []
......
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