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

snapshot...

parent a7e1fff7
No related branches found
No related tags found
No related merge requests found
...@@ -44,18 +44,20 @@ def infer_cloud_products(clvrx_path, output_dir, full_disk=True, satellite='GOES ...@@ -44,18 +44,20 @@ def infer_cloud_products(clvrx_path, output_dir, full_disk=True, satellite='GOES
t0 = time.time() t0 = time.time()
if full_disk: if full_disk:
cld_frac = nn_cld_frac.run_inference_full_disk(pname, None) cld_frac = nn_cld_frac.run_inference_full_disk(pname, None)
cld_opd, opd = nn_cld_opd.run_inference_full_disk(pname, None) cld_opd_1, opd = nn_cld_opd.run_inference_full_disk(pname, None)
else: else:
cld_frac = nn_cld_frac.run_inference(pname, None) cld_frac = nn_cld_frac.run_inference(pname, None)
cld_opd, opd = nn_cld_opd.run_inference(pname, None) cld_opd_1, opd = nn_cld_opd.run_inference(pname, None)
cld_opd[np.isnan(opd)] = -1.0
clr_cat = cld_frac == 0 clr_cat = cld_frac == 0
cld_cat = cld_frac == 4 cld_cat = cld_frac == 4
cld_opd[clr_cat] = opd[clr_cat] cld_opd_1[clr_cat] = opd[clr_cat]
cld_opd[cld_cat] = opd[cld_cat] cld_opd_1[cld_cat] = opd[cld_cat]
write_cld_prods_file_nc4(clvrx_str_time, out_file, cld_frac, cld_opd, x_rad, y_rad, None, None, cld_opd_1[np.invert(np.logical_and(cld_opd_1 < 0.0, cld_opd_1 > 160.0))] = -1.0
cld_opd_1[np.isnan(opd)] = -1.0
write_cld_prods_file_nc4(clvrx_str_time, out_file, cld_frac, cld_opd_1, x_rad, y_rad, None, None,
satellite=satellite, domain=domain, has_time=True) satellite=satellite, domain=domain, has_time=True)
t1 = time.time() t1 = time.time()
print('total time: ', (t1 - t0)) print('total time: ', (t1 - t0))
......
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