Skip to content
Snippets Groups Projects
Commit d77a866c authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 78c72ca8
Branches
No related tags found
No related merge requests found
......@@ -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))
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment