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

snapshot...

parent 9cbf8911
No related branches found
No related tags found
No related merge requests found
...@@ -101,7 +101,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca ...@@ -101,7 +101,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca
return grd_vals return grd_vals
def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s, icing_intensity=None): def create_file(filename, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s, icing_intensity):
h5f_expl = h5py.File(a_clvr_file, 'r') h5f_expl = h5py.File(a_clvr_file, 'r')
h5f = h5py.File(filename, 'w') h5f = h5py.File(filename, 'w')
...@@ -168,6 +168,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end ...@@ -168,6 +168,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end
lat_c = [] lat_c = []
time_s = [] time_s = []
fl_alt_s = [] fl_alt_s = []
ice_int_s = []
for idx, time in enumerate(time_keys): for idx, time in enumerate(time_keys):
if t_start is not None: if t_start is not None:
if time < t_start: if time < t_start:
...@@ -233,6 +234,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end ...@@ -233,6 +234,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end
lat_c.append(lat_s[0]) lat_c.append(lat_s[0])
time_s.append(time) time_s.append(time)
fl_alt_s.append(fl) fl_alt_s.append(fl)
ice_int_s.append(I)
if len(time_s) == 0: if len(time_s) == 0:
return return
...@@ -247,10 +249,11 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end ...@@ -247,10 +249,11 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end
lat_c = np.array(lat_c) lat_c = np.array(lat_c)
time_s = np.array(time_s) time_s = np.array(time_s)
fl_alt_s = np.array(fl_alt_s) fl_alt_s = np.array(fl_alt_s)
ice_int_s = np.array(ice_int_s)
if outfile is not None: if outfile is not None:
outfile = add_time_range_to_filename(outfile, t_start, t_end) outfile = add_time_range_to_filename(outfile, t_start, t_end)
create_file(outfile, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s) create_file(outfile, data_dct, ds_list, lon_c, lat_c, time_s, fl_alt_s, ice_int_s)
data_dct = {} data_dct = {}
for ds_name in l1b_ds_list: for ds_name in l1b_ds_list:
...@@ -258,7 +261,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end ...@@ -258,7 +261,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end
if outfile_l1b is not None: if outfile_l1b is not None:
outfile_l1b = add_time_range_to_filename(outfile_l1b, t_start, t_end) outfile_l1b = add_time_range_to_filename(outfile_l1b, t_start, t_end)
create_file(outfile_l1b, data_dct, l1b_ds_list, lon_c, lat_c, time_s, fl_alt_s) create_file(outfile_l1b, data_dct, l1b_ds_list, lon_c, lat_c, time_s, fl_alt_s, ice_int_s)
def analyze2(ice_dct): def analyze2(ice_dct):
......
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