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

snapshot...

parent ef0d0faa
Branches
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ from util.util import get_cartopy_crs, write_cld_frac_file_nc4 ...@@ -7,7 +7,7 @@ from util.util import get_cartopy_crs, write_cld_frac_file_nc4
import numpy as np import numpy as np
def infer_cloud_fraction(clvrx_path, output_dir, full_disk=True, satellite='GOES16', domain='FD'): def infer_cloud_fraction(clvrx_path, output_dir, full_disk=True, satellite='GOES16', domain='FD', pattern=None):
# -- location of the trained model # -- location of the trained model
ckpt_dir_s = os.listdir(model_path) ckpt_dir_s = os.listdir(model_path)
ckpt_dir = model_path + ckpt_dir_s[0] ckpt_dir = model_path + ckpt_dir_s[0]
...@@ -24,7 +24,11 @@ def infer_cloud_fraction(clvrx_path, output_dir, full_disk=True, satellite='GOES ...@@ -24,7 +24,11 @@ def infer_cloud_fraction(clvrx_path, output_dir, full_disk=True, satellite='GOES
nn = SRCNN() nn = SRCNN()
nn.setup_inference(ckpt_dir) nn.setup_inference(ckpt_dir)
if pattern is not None:
clvrx_ds = CLAVRx(clvrx_path, pattern=pattern)
else:
clvrx_ds = CLAVRx(clvrx_path) clvrx_ds = CLAVRx(clvrx_path)
for fname, t_start, t_stop in clvrx_ds: for fname, t_start, t_stop in clvrx_ds:
dto = clvrx_ds.get_datetime(fname) dto = clvrx_ds.get_datetime(fname)
clvrx_str_time = dto.strftime('%Y-%m-%d_%H:%M') clvrx_str_time = dto.strftime('%Y-%m-%d_%H:%M')
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment