diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index ed30f8c7738390a730e65077c7f4af145d99cd6b..8076038cea1dc20880191e7bd1d36f0ee30e5a9a 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -3,7 +3,8 @@ import numpy as np import pickle import matplotlib.pyplot as plt import os -from util.util import get_time_tuple_utc, GenericException, add_time_range_to_filename, is_night, is_day, get_grid_values_all +from util.util import get_time_tuple_utc, GenericException, add_time_range_to_filename, is_night, is_day, \ + get_grid_values_all, check_oblique from aeolus.datasource import CLAVRx, GOESL1B from util.geos_nav import GEOSNavigation import h5py @@ -705,6 +706,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing 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] + sat_zen = f['sensor_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'][:, y_a:y_b, x_a:x_b] @@ -712,9 +714,9 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing print('num pireps all: ', len(icing_alt)) if icing: - mask, idxs, num_tested = apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, sol_zen, day_night=day_night) + mask, idxs, num_tested = apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, sol_zen, sat_zen, day_night=day_night) else: - mask, idxs, num_tested = apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, sol_zen, day_night=day_night) + mask, idxs, num_tested = apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, sol_zen, sat_zen, day_night=day_night) print('num pireps, day_night: ', len(mask), day_night) keep_idxs = [] @@ -761,7 +763,7 @@ def run_qc(filename, filename_l1b, day_night='ANY', pass_thresh_frac=0.20, icing f_l1b.close() -def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, solzen, day_night='ANY'): +def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY'): opd_thick_threshold = 2 if day_night == 'DAY': opd_thick_threshold = 20 @@ -777,6 +779,8 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, idxs = [] num_tested = [] for i in range(num_obs): + if not check_oblique(satzen[i,]): + continue if day_night == 'NIGHT': if is_day(solzen[i,]): continue @@ -815,7 +819,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, return mask, idxs, num_tested -def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, solzen, day_night='ANY'): +def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, solzen, satzen, day_night='ANY'): opd_thick_threshold = 2 if day_night == 'DAY': opd_thick_threshold = 20 @@ -831,6 +835,8 @@ def apply_qc_no_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mas idxs = [] num_tested = [] for i in range(num_obs): + if not check_oblique(satzen[i,]): + continue if day_night == 'NIGHT': if is_day(solzen[i,]): continue