From 7d7e1cb9c7d81c8ae7e91e0dc4fdfda4103f837a Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Fri, 28 Apr 2023 12:57:19 -0500
Subject: [PATCH] snapshot...

---
 modules/deeplearning/cloud_opd_srcnn_viirs.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/deeplearning/cloud_opd_srcnn_viirs.py b/modules/deeplearning/cloud_opd_srcnn_viirs.py
index 29521abb..fde9fd6d 100644
--- a/modules/deeplearning/cloud_opd_srcnn_viirs.py
+++ b/modules/deeplearning/cloud_opd_srcnn_viirs.py
@@ -683,6 +683,15 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     h5f = h5py.File(in_file, 'r')
 
     refl = get_grid_values_all(h5f, 'super/refl_0_65um')
+    ylen, xlen = refl.shape
+    refl = refl[0:int(ylen/2), :]
+    bt = get_grid_values_all(h5f, 'orig/temp_11_0um')
+    ylen, xlen = bt.shape
+    bt = bt[0:int(ylen/2), :]
+    cld_opd = get_grid_values_all(h5f, 'super/' + label_param)
+    ylen, xlen = cld_opd.shape
+    cld_opd = cld_opd[0:int(ylen/2), :]
+
     LEN_Y, LEN_X = refl.shape
     LEN_Y -= 16
     LEN_X -= 16
@@ -694,7 +703,6 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     refl = refl[nn.slc_y, nn.slc_x]
     refl = np.expand_dims(refl, axis=0)
 
-    bt = get_grid_values_all(h5f, 'orig/temp_11_0um')
     bt = np.where(np.isnan(bt), 0, bt)
     bt = bt[nn.slc_y_m, nn.slc_x_m]
     bt = np.expand_dims(bt, axis=0)
@@ -712,7 +720,6 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     # refl_hi = np.squeeze(refl_hi)
     # refl_avg = np.squeeze(refl_avg)
 
-    cld_opd = get_grid_values_all(h5f, 'super/'+label_param)
     cld_opd = np.where(np.isnan(cld_opd), 0, cld_opd)
     cld_opd = cld_opd[nn.slc_y_2, nn.slc_x_2]
     cld_opd = np.expand_dims(cld_opd, axis=0)
-- 
GitLab