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

snapshot...

parent 60eb72dd
No related branches found
No related tags found
No related merge requests found
...@@ -593,7 +593,7 @@ def process_1(ice_dct, no_ice_dct, neg_ice_dct): ...@@ -593,7 +593,7 @@ def process_1(ice_dct, no_ice_dct, neg_ice_dct):
return new_ice_dct, new_no_ice_dct, new_neg_ice_dct return new_ice_dct, new_no_ice_dct, new_neg_ice_dct
def run_qc(filename, filename_l1b): def run_qc(filename, filename_l1b, outfile, outfile_l1b):
f = h5py.File(filename, 'r') f = h5py.File(filename, 'r')
icing_alt = f['icing_altitude'][:] icing_alt = f['icing_altitude'][:]
cld_top_hgt = f['cld_height_acha'][:, 10:30, 10:30] cld_top_hgt = f['cld_height_acha'][:, 10:30, 10:30]
...@@ -638,6 +638,26 @@ def run_qc(filename, filename_l1b): ...@@ -638,6 +638,26 @@ def run_qc(filename, filename_l1b):
#print(np.histogram(opd_dc, bins=10)) #print(np.histogram(opd_dc, bins=10))
print(np.histogram(phs, bins=6)) print(np.histogram(phs, bins=6))
keep_idxs = np.array(keep_idxs)
data_dct = {}
for didx, ds_name in enumerate(ds_list):
data_dct[ds_name] = f[ds_name][keep_idxs,]
lon_c = f['longitude'][keep_idxs]
lat_c = f['latitude'][keep_idxs]
time_s = f['time'][keep_idxs]
fl_alt_s = f['icing_altidue'][keep_idxs]
ice_int_s = f['icing_intensity'][keep_idxs]
unq_ids = f['unique_ids'][keep_idxs]
create_file(outfile, data_dct, ds_list, ds_types, lon_c, lat_c, time_s, fl_alt_s, ice_int_s, unq_ids)
data_dct = {}
for didx, ds_name in enumerate(l1b_ds_list):
data_dct[ds_name] = f[ds_name][keep_idxs]
create_file(outfile_l1b, data_dct, l1b_ds_list, l1b_ds_types, lon_c, lat_c, time_s, fl_alt_s, ice_int_s, unq_ids)
return mask return mask
...@@ -651,7 +671,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask, ...@@ -651,7 +671,7 @@ def apply_qc_icing_pireps(icing_alt, cld_top_hgt, cld_phase, cld_opd, cld_mask,
cld_opd = cld_opd.reshape((num_obs, -1)) cld_opd = cld_opd.reshape((num_obs, -1))
bt_11um = bt_11um.reshape((num_obs, -1)) bt_11um = bt_11um.reshape((num_obs, -1))
skip = True skip = False
mask = [] mask = []
for i in range(num_obs): for i in range(num_obs):
keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3) # cloudy keep_0 = np.logical_or(cld_mask[i,] == 2, cld_mask[i,] == 3) # cloudy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment