diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index a48f6ca9b720525bd5a47e9d93de01ecfb6909c1..19baeaf66822e609a4cfed3db5076f3cc79c2e30 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -101,7 +101,7 @@ def get_grid_values(h5f, grid_name, j_c, i_c, half_width, scale_factor_name='sca 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 = h5py.File(filename, 'w') @@ -168,6 +168,7 @@ def run(pirep_dct, outfile=None, outfile_l1b=None, dt_str_start=None, dt_str_end lat_c = [] time_s = [] fl_alt_s = [] + ice_int_s = [] for idx, time in enumerate(time_keys): if t_start is not None: if time < t_start: @@ -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]) time_s.append(time) fl_alt_s.append(fl) + ice_int_s.append(I) if len(time_s) == 0: return @@ -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) time_s = np.array(time_s) fl_alt_s = np.array(fl_alt_s) + ice_int_s = np.array(ice_int_s) if outfile is not None: 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 = {} 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 if outfile_l1b is not None: 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):