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

snapshot...

parent 96a6c94b
No related branches found
No related tags found
No related merge requests found
......@@ -121,9 +121,20 @@ def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s):
h5f.close()
def run(pirep_dct, outfile=None, outfile_l1b=None):
def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end=None):
time_keys = list(pirep_dct.keys())
t_start = None
t_end = None
if (dt_str_start is not None) and (dt_str_end is not None):
dto = datetime.datetime.strptime(dt_str_start, '%Y-%m-%d_%H:%M').replace(tzinfo=timezone.utc)
dto.replace(tzinfo=timezone.utc)
t_start = dto.timestamp()
dto = datetime.datetime.strptime(dt_str_end, '%Y-%m-%d_%H:%M').replace(tzinfo=timezone.utc)
dto.replace(tzinfo=timezone.utc)
t_end = dto.timestamp()
nav = GEOSNavigation(sub_lon=-75.0, CFAC=5.6E-05, COFF=-0.101332, LFAC=-5.6E-05, LOFF=0.128212, num_elems=2500, num_lines=1500)
lon_s = np.zeros(1)
......@@ -136,6 +147,12 @@ def run(pirep_dct, outfile=None, outfile_l1b=None):
time_s = []
fl_alt_s = []
for idx, time in enumerate(time_keys):
if t_start is not None:
if time < t_start:
continue
if time > t_end:
continue
reports = pirep_dct[time]
for tup in reports:
lat, lon, fl, rpt_str = tup
......
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