diff --git a/modules/deeplearning/cloud_fraction_fcn_abi.py b/modules/deeplearning/cloud_fraction_fcn_abi.py index 4614aaf6563a4d96dd5fba44aff97fdb1f1cc366..de0778fe4de4735506b2045a2e06bd15658f1189 100644 --- a/modules/deeplearning/cloud_fraction_fcn_abi.py +++ b/modules/deeplearning/cloud_fraction_fcn_abi.py @@ -10,6 +10,7 @@ import pickle import h5py import xarray as xr import gc +import time AUTOTUNE = tf.data.AUTOTUNE @@ -825,6 +826,7 @@ class SRCNN: def run_inference_full_disk(self, in_file, out_file): gc.collect() + t0 = time.time() h5f = h5py.File(in_file, 'r') bt = get_grid_values_all(h5f, 'temp_11_0um_nom') @@ -835,6 +837,8 @@ class SRCNN: refl_hi = get_grid_values_all(h5f, 'refl_0_65um_nom_max_sub') refl_std = get_grid_values_all(h5f, 'refl_0_65um_nom_stddev_sub') cp = get_grid_values_all(h5f, label_param) + t1 = time.time() + print(' read time:', (t1-t0)) # lons = get_grid_values_all(h5f, 'longitude') # lats = get_grid_values_all(h5f, 'latitude') @@ -852,9 +856,11 @@ class SRCNN: refl_std_sh = refl_std[h_y_len - 1:y_len, :] cp_sh = cp[h_y_len - 1:y_len, :] + t0 = time.time() cld_frac_nh = self.run_inference_(bt_nh, refl_nh, refl_lo_nh, refl_hi_nh, refl_std_nh, cp_nh) - cld_frac_sh = self.run_inference_(bt_sh, refl_sh, refl_lo_sh, refl_hi_sh, refl_std_sh, cp_sh) + t1 = time.time() + print(' inference time: ', (t1-t0)) cld_frac_out = np.zeros((y_len, x_len), dtype=np.int8) border = int((KERNEL_SIZE - 1) / 2)