From 4d254c046a8c566dbf62b7fc3e7efb5f5d12b051 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Wed, 5 Jan 2022 19:58:55 -0600 Subject: [PATCH] snapshot... --- modules/icing/pirep_goes.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py index 1a94aa97..b416b51c 100644 --- a/modules/icing/pirep_goes.py +++ b/modules/icing/pirep_goes.py @@ -710,18 +710,20 @@ def run_daynight(filename, filename_l1b, day_night='ANY'): f_l1b = h5py.File(filename_l1b, 'r') solzen = f['solar_zenith_angle'][:, y_a:y_b, x_a:x_b] + satzen = f['sensor_zenith_angle'][:, y_a:y_b, x_a:x_b] num_obs = solzen.shape[0] idxs = [] for i in range(num_obs): - if day_night == 'NIGHT': - if is_night(solzen[i,]): - idxs.append(i) - elif day_night == 'DAY': - if is_day(solzen[i,]): - idxs.append(i) - else: + if not check_oblique(satzen[i,]): + continue + if day_night == 'NIGHT' and is_night(solzen[i,]): + idxs.append(i) + elif day_night == 'DAY' and is_day(solzen[i,]): idxs.append(i) + elif day_night == 'ANY': + if is_day(solzen[i,]) or is_night(solzen[i,]): + idxs.append(i) keep_idxs = np.array(idxs) -- GitLab