diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index ceed7a6598f6762d6fdbac30dca108ed1087a4a3..00112f7151eb5217a524fd70ad9b2d7b27716c6f 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -692,21 +692,28 @@ def run_daynight(filename, filename_l1b, day_night='ANY'): def run_qc(filename, filename_l1b, day_night='ANY'): + x_a = 10 + x_b = 30 + y_a = x_a + y_b = x_b + nx = ny = (x_b - x_a) + nx_x_ny = nx * ny + f = h5py.File(filename, 'r') icing_alt = f['icing_altitude'][:] - cld_top_hgt = f['cld_height_acha'][:, 10:30, 10:30] - cld_phase = f['cloud_phase'][:, 10:30, 10:30] + cld_top_hgt = f['cld_height_acha'][:, y_a:y_b, x_a:x_b] + cld_phase = f['cloud_phase'][:, y_a:y_b, x_a:x_b] if day_night == 'DAY': - cld_opd = f['cld_opd_dcomp'][:, 10:30, 10:30] + cld_opd = f['cld_opd_dcomp'][:, y_a:y_b, x_a:x_b] else: - cld_opd = f['cld_opd_acha'][:, 10:30, 10:30] + cld_opd = f['cld_opd_acha'][:, y_a:y_b, x_a:x_b] - cld_mask = f['cloud_mask'][:, 10:30, 10:30] - sol_zen = f['solar_zenith_angle'][:, 10:30, 10:30] + cld_mask = f['cloud_mask'][:, y_a:y_b, x_a:x_b] + sol_zen = f['solar_zenith_angle'][:, y_a:y_b, x_a:x_b] f_l1b = h5py.File(filename_l1b, 'r') - bt_11um = f_l1b['temp_11_0um_nom'][:, 10:30, 10:30] + bt_11um = f_l1b['temp_11_0um_nom'][:, y_a:y_b, x_a:x_b] print('num pireps all: ', len(icing_alt)) @@ -717,7 +724,7 @@ def run_qc(filename, filename_l1b, day_night='ANY'): keep_idxs = [] for i in range(len(mask)): - if (np.sum(mask[i]) / 400) > 0.20: + if (np.sum(mask[i]) / nx_x_ny) > 0.20: keep_idxs.append(idxs[i]) print('num valid pireps: ', len(keep_idxs))