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

snapshot...

parent 71679618
No related branches found
No related tags found
No related merge requests found
......@@ -629,10 +629,12 @@ def run_qc(filename, filename_l1b, day_night='ANY'):
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]
if day_night == 'DAY':
cld_opd = f['cld_opd_dcomp'][:, 10:30, 10:30]
else:
cld_opd = f['cld_opd_acha'][:, 10:30, 10:30]
cld_mask = f['cloud_mask'][:, 10:30, 10:30]
sol_zen = f['solar_zenith_angle'][:, 10:30, 10:30]
......@@ -645,24 +647,11 @@ def run_qc(filename, filename_l1b, day_night='ANY'):
print('num pireps day_night: ', len(mask), day_night)
bts_pass = []
phs_pass = []
opd_pass = []
keep_idxs = []
bts_reject = []
phs_reject = []
opd_reject = []
for i in range(len(mask)):
if (np.sum(mask[i]) / 400) > 0.20:
bts_pass.append((bt_11um[idxs[i],].flatten())[mask[i]])
phs_pass.append((cld_phase[idxs[i],].flatten())[mask[i]])
opd_pass.append((cld_opd[idxs[i],].flatten())[mask[i]])
keep_idxs.append(idxs[i])
else:
bts_reject.append((bt_11um[idxs[i],].flatten())[mask[i]])
phs_reject.append((cld_phase[idxs[i],].flatten())[mask[i]])
opd_reject.append((cld_opd[idxs[i],].flatten())[mask[i]])
print('num valid pireps: ', len(keep_idxs))
keep_idxs = np.array(keep_idxs)
......@@ -697,24 +686,6 @@ def run_qc(filename, filename_l1b, day_night='ANY'):
f.close()
f_l1b.close()
bts = np.concatenate(bts_pass)
phs = np.concatenate(phs_pass)
opd = np.concatenate(opd_pass)
print(np.histogram(bts, bins=10))
print(np.histogram(opd, bins=10))
print(np.histogram(phs, bins=6))
bts_r = np.concatenate(bts_reject)
phs_r = np.concatenate(phs_reject)
opd_r = np.concatenate(opd_reject)
print(np.histogram(bts_r, bins=10))
print(np.histogram(opd_r, bins=10))
print(np.histogram(phs_r, bins=6))
return bts, bts_r, phs, phs_r, opd, opd_r
def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, bt_11um, solzen, day_night='ANY'):
opd_threshold = 2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment