diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index d2346629c9487cc0a8e13baa5802512e9b0bb488..f513a1163171a411c3e13ebad10c7a36412c83e2 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -910,7 +910,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, opd_thick_threshold = 2 opd_thin_threshold = 0.1 - closeness = 100.0 # meters + closeness = 50.0 # meters num_obs = len(icing_alt) cld_mask = cld_mask.reshape((num_obs, -1)) cld_top_hgt = cld_top_hgt.reshape((num_obs, -1)) @@ -936,35 +936,39 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3) # cloudy keep_1 = np.invert(np.isnan(cld_top_hgt[i,])) keep_2 = np.invert(np.isnan(bt_11um[i,])) - keep_3 = np.invert(np.isnan(cld_opd[i,])) - keep = keep_0 & keep_1 & keep_2 & keep_3 + # keep_3 = np.invert(np.isnan(cld_opd[i,])) + # keep = keep_0 & keep_1 & keep_2 & keep_3 + keep = keep_0 & keep_1 & keep_2 num_keep = np.sum(keep) if num_keep == 0: continue # Exp - # keep = np.where(keep, (cld_top_hgt[i,] + closeness) > icing_alt[i], False) + keep = np.where(keep, (cld_top_hgt[i,] + closeness) > icing_alt[i], False) + if (np.sum(keep) / num_keep) < 0.50: + continue # Test1 - keep = np.where(keep, cld_top_hgt[i,] > icing_alt[i], False) + # keep = np.where(keep, cld_top_hgt[i,] > icing_alt[i], False) # Test2 - keep = np.where(keep, - np.invert((cld_phase[i,] == 4) & - np.logical_and(cld_top_hgt[i,]+closeness > icing_alt[i], cld_top_hgt[i,]-closeness < icing_alt[i])), - False) - - # Test4 - keep = np.where(keep, np.invert((cld_phase[i,] == 4) & (cld_opd[i,] < opd_thin_threshold) & (cld_top_hgt[i,] > icing_alt[i])), False) + # keep = np.where(keep, + # np.invert((cld_phase[i,] == 4) & + # np.logical_and(cld_top_hgt[i,]+closeness > icing_alt[i], cld_top_hgt[i,]-closeness < icing_alt[i])), + # False) + # + # # Test4 + # keep = np.where(keep, np.invert((cld_phase[i,] == 4) & (cld_opd[i,] < opd_thin_threshold) & (cld_top_hgt[i,] > icing_alt[i])), False) # Test5 - keep = np.where(keep, np.invert(bt_11um[i,] > 270.0), False) + # keep = np.where(keep, (bt_11um[i,] < 270.0), False) # Test6 - keep = np.where(keep, np.invert(bt_11um[i,] < 228.0), False) + # keep = np.where(keep, (bt_11um[i,] > 228.0), False) + keep = np.where(keep, np.logical_and(bt_11um[i,] > 228.0, bt_11um[i,] < 270.0), False) # Test3 - keep = np.where(keep, (cld_opd[i,] >= opd_thick_threshold) & (cld_phase[i,] == 4) & (cld_top_hgt[i,] > icing_alt[i]), False) + # keep = np.where(keep, (cld_opd[i,] >= opd_thick_threshold) & (cld_phase[i,] == 4) & (cld_top_hgt[i,] > icing_alt[i]), False) mask.append(keep) idxs.append(i) @@ -982,7 +986,7 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas opd_thick_threshold = 2 opd_thin_threshold = 0.1 - closeness = 100.0 # meters + closeness = 50.0 # meters num_obs = len(icing_alt) cld_mask = cld_mask.reshape((num_obs, -1)) cld_top_hgt = cld_top_hgt.reshape((num_obs, -1)) @@ -1008,20 +1012,28 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3) # cloudy keep_1 = np.invert(np.isnan(cld_top_hgt[i,])) keep_2 = np.invert(np.isnan(bt_11um[i,])) - keep_3 = np.invert(np.isnan(cld_opd[i,])) - keep = keep_0 & keep_1 & keep_2 & keep_3 + # keep_3 = np.invert(np.isnan(cld_opd[i,])) + # keep = keep_0 & keep_1 & keep_2 & keep_3 + keep = keep_0 & keep_1 & keep_2 num_keep = np.sum(keep) if num_keep == 0: continue # Exp - # keep = np.where(keep, (cld_top_hgt[i,] + closeness) > icing_alt[i], False) + keep = np.where(keep, (cld_top_hgt[i,] + closeness) > icing_alt[i], False) + if (np.sum(keep) / num_keep) < 0.50: + continue + + keep = np.where(keep, np.logical_and(bt_11um[i,] > 228.0, bt_11um[i,] < 273.0), False) + + # Test6 + # keep = np.where(keep, (bt_11um[i,] < 228.0), False) # Test1 - keep = np.where(keep, cld_top_hgt[i,] > icing_alt[i], False) + # keep = np.where(keep, cld_top_hgt[i,] > icing_alt[i], False) # Test3 - keep = np.where(keep, np.invert((cld_opd[i,] >= opd_thick_threshold) & (cld_phase[i,] == 4) & (cld_top_hgt[i,] > icing_alt[i])), False) + # keep = np.where(keep, np.invert((cld_opd[i,] >= opd_thick_threshold) & (cld_phase[i,] == 4) & (cld_top_hgt[i,] > icing_alt[i])), False) mask.append(keep) idxs.append(i)