diff --git a/modules/util/infer_cloud_fraction.py b/modules/util/infer_cloud_fraction.py index b55a50e0fa170e6f43d94a4530169cae1ebb654c..fe40f96aca3ac82bc9eb3a9d59d4697231600fb9 100644 --- a/modules/util/infer_cloud_fraction.py +++ b/modules/util/infer_cloud_fraction.py @@ -2,27 +2,12 @@ from util.geos_nav import get_navigation from util.setup_cloud_fraction import model_path from aeolus.datasource import CLAVRx import os -from deeplearning.cloud_fraction_fcn_abi import SRCNN, run_evaluate_static, run_evaluate_static_full_disk +from deeplearning.cloud_fraction_fcn_abi import SRCNN from util.util import get_cartopy_crs, write_cld_frac_file_nc4 import numpy as np -def infer_cloud_fraction(clvrx_path, output_dir, full_disk=True): - ckpt_dir_s = os.listdir(model_path) - ckpt_dir = model_path + ckpt_dir_s[0] - - clvrx_ds = CLAVRx(clvrx_path) - for fname, t_start, t_stop in clvrx_ds: - dto = clvrx_ds.get_datetime(fname) - clvrx_str_time = dto.strftime('%Y-%m-%d_%H:%M') - out_file = output_dir + 'cloud_fraction_' + clvrx_str_time - if full_disk: - run_evaluate_static_full_disk(fname, out_file, ckpt_dir) - else: - run_evaluate_static(fname, out_file, ckpt_dir) - - -def infer_cloud_fraction_new(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'): # location of the trained model ckpt_dir_s = os.listdir(model_path) ckpt_dir = model_path + ckpt_dir_s[0]