diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 6e90718dfd2759ea72b886fb86e9cbacba17e82f..31ec0e11f559c8a730c1d749d3a7e63aaf4ec4e5 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -1220,7 +1220,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing # return mask, idxs, num_tested -def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY'): +def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY', cloud_fraction=0.5): if day_night == 'DAY': opd_thick_threshold = 20 @@ -1231,7 +1231,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd closeness_top = 100.0 # meters max_cld_depth = 3000.0 - max_altitude = 4000.0 + max_altitude = 5000.0 max_cld_altitude = 6000.0 num_obs = len(icing_alt) @@ -1266,6 +1266,8 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd num_keep = np.sum(keep) if num_keep == 0: continue + if num_keep / nx_x_ny < cloud_fraction: # At least this fraction cloudy + continue # Test 1 keep = np.where(keep, (cld_top_hgt[i,] + closeness_top) > icing_alt[i], False) @@ -1282,7 +1284,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd return mask, idxs, num_tested -def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY'): +def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY', cloudy_frac=0.5): if day_night == 'DAY': opd_thick_threshold = 20 @@ -1293,7 +1295,7 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_ closeness_top = 100.0 # meters max_cld_depth = 3000.0 - max_altitude = 4000.0 + max_altitude = 5000.0 max_cld_altitude = 6000.0 num_obs = len(icing_alt) @@ -1328,10 +1330,12 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_geo_dz, cld_phase, cld_ num_keep = np.sum(keep) if num_keep == 0: continue + if num_keep / nx_x_ny < cloudy_frac: # At least this fraction cloudy + continue keep = np.where(keep, (cld_top_hgt[i,] + closeness_top) > icing_alt[i], False) - # keep = np.where(keep, cld_top_hgt[i,] < max_altitude, False) - # keep = np.where(keep, (cld_top_hgt[i,] - max_depth) < icing_alt[i], False) + # keep = np.where(keep, cld_top_hgt[i,] < max_cld_altitude, False) + # keep = np.where(keep, (cld_top_hgt[i,] - max_cld_depth) < icing_alt[i], False) # keep = np.where(keep, np.logical_and(bt_11um[i,] > 228.0, bt_11um[i,] < 270.0), False) keep = np.where(keep, bt_11um[i,] < 275.0, False)