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

snapshot...

parent de5dd52d
Branches
No related tags found
No related merge requests found
...@@ -779,6 +779,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -779,6 +779,7 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
bt = get_grid_values_all(h5f, 'temp_11_0um_nom') bt = get_grid_values_all(h5f, 'temp_11_0um_nom')
y_len, x_len = bt.shape y_len, x_len = bt.shape
print(y_len, x_len) print(y_len, x_len)
h_y_len = int(y_len/2)
refl = get_grid_values_all(h5f, 'refl_0_65um_nom') refl = get_grid_values_all(h5f, 'refl_0_65um_nom')
refl_lo = get_grid_values_all(h5f, 'refl_0_65um_nom_min_sub') refl_lo = get_grid_values_all(h5f, 'refl_0_65um_nom_min_sub')
refl_hi = get_grid_values_all(h5f, 'refl_0_65um_nom_max_sub') refl_hi = get_grid_values_all(h5f, 'refl_0_65um_nom_max_sub')
...@@ -787,33 +788,34 @@ def run_evaluate_static(in_file, out_file, ckpt_dir): ...@@ -787,33 +788,34 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
lons = get_grid_values_all(h5f, 'longitude') lons = get_grid_values_all(h5f, 'longitude')
lats = get_grid_values_all(h5f, 'latitude') lats = get_grid_values_all(h5f, 'latitude')
bt_nh = bt[0:2712+1, :] bt_nh = bt[0:h_y_len+1, :]
refl_nh = refl[0:2712+1, :] refl_nh = refl[0:h_y_len+1, :]
refl_lo_nh = refl_lo[0:2712+1, :] refl_lo_nh = refl_lo[0:h_y_len+1, :]
refl_hi_nh = refl_hi[0:2712+1, :] refl_hi_nh = refl_hi[0:h_y_len+1, :]
refl_std_nh = refl_std[0:2712+1, :] refl_std_nh = refl_std[0:h_y_len+1, :]
cp_nh = cp[0:2712+1, :] cp_nh = cp[0:h_y_len+1, :]
print(cp_nh.shape) print(cp_nh.shape)
bt_sh = bt[2712-1:y_len, :] bt_sh = bt[h_y_len-1:y_len, :]
refl_sh = refl[2712-1:y_len, :] refl_sh = refl[h_y_len-1:y_len, :]
refl_lo_sh = refl_lo[2712-1:y_len, :] refl_lo_sh = refl_lo[h_y_len-1:y_len, :]
refl_hi_sh = refl_hi[2712-1:y_len, :] refl_hi_sh = refl_hi[h_y_len-1:y_len, :]
refl_std_sh = refl_std[2712-1:y_len, :] refl_std_sh = refl_std[h_y_len-1:y_len, :]
cp_sh = cp[2712-1:y_len, :] cp_sh = cp[h_y_len-1:y_len, :]
print(bt_sh.shape) print(bt_sh.shape)
h5f.close() h5f.close()
cld_frac_nh = run_evaluate_static_(bt_nh, refl_nh, refl_lo_nh, refl_hi_nh, refl_std_nh, cp_nh, ckpt_dir) cld_frac_nh = run_evaluate_static_(bt_nh, refl_nh, refl_lo_nh, refl_hi_nh, refl_std_nh, cp_nh, ckpt_dir)
print(cld_frac_nh.shape) print(cld_frac_nh.shape)
cld_frac_sh = run_evaluate_static_(bt_sh, refl_sh, refl_lo_sh, refl_hi_sh, refl_std_sh, cp_sh, ckpt_dir) cld_frac_sh = run_evaluate_static_(bt_sh, refl_sh, refl_lo_sh, refl_hi_sh, refl_std_sh, cp_sh, ckpt_dir)
print(cld_frac_sh.shape) print(cld_frac_sh.shape)
cld_frac_out = np.zeros((y_len, x_len), dtype=np.int8) cld_frac_out = np.zeros((y_len, x_len), dtype=np.int8)
border = int((KERNEL_SIZE - 1)/2) border = int((KERNEL_SIZE - 1)/2)
cld_frac_out[border:2712, border:x_len - border] = cld_frac_nh[0, :, :] cld_frac_out[border:h_y_len, border:x_len - border] = cld_frac_nh[0, :, :]
cld_frac_out[2712:y_len - border, border:x_len - border] = cld_frac_sh[0, :, :] cld_frac_out[h_y_len:y_len - border, border:x_len - border] = cld_frac_sh[0, 1::, :]
bt = denormalize(bt, 'temp_11_0um_nom', mean_std_dct) bt = denormalize(bt, 'temp_11_0um_nom', mean_std_dct)
refl = denormalize(refl, 'refl_0_65um_nom', mean_std_dct) refl = denormalize(refl, 'refl_0_65um_nom', mean_std_dct)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment