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

snapshot...

parent 4c779399
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
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