diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 9407a65589cb8d98b1f4092d89b5cd4c26e8078c..6efd4149faa00ef53b381fa57e8c68d8d82f9a5d 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -666,7 +666,7 @@ def run_daynight(filename, filename_l1b, day_night='ANY'): f_l1b.close() -def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20): +def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing=True): f = h5py.File(filename, 'r') icing_alt = f['icing_altitude'][:] @@ -693,7 +693,11 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20): keep_idxs = [] for i in range(len(mask)): - if (np.sum(mask[i]) / nx_x_ny) > pass_thresh_frac: + frac = np.sum(mask[i]) / nx_x_ny + if icing: + if frac > pass_thresh_frac: + keep_idxs.append(idxs[i]) + elif frac < 0.05: keep_idxs.append(idxs[i]) print('num valid pireps: ', len(keep_idxs))