diff --git a/modules/deeplearning/cloud_opd_srcnn_viirs.py b/modules/deeplearning/cloud_opd_srcnn_viirs.py
index e64337f651f49193eac342caba99ad980769630d..98e7806d221a13d3f5588334e882f7053aaf23ca 100644
--- a/modules/deeplearning/cloud_opd_srcnn_viirs.py
+++ b/modules/deeplearning/cloud_opd_srcnn_viirs.py
@@ -685,6 +685,9 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     refl = get_grid_values_all(h5f, 'super/refl_0_65um')
     ylen, xlen = refl.shape
     refl = refl[0:int(ylen/2), :]
+    LEN_Y, LEN_X = refl.shape
+    LEN_Y -= 16
+    LEN_X -= 16
 
     bt = get_grid_values_all(h5f, 'orig/temp_11_0um')
     ylen, xlen = bt.shape
@@ -694,9 +697,6 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     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
     refl = np.where(np.isnan(refl), 0, refl)
     refl = normalize(refl, 'refl_0_65um_nom', mean_std_dct)