From 8b4b3e2e6432bd42997cd35cc93c59025f4dcd13 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Sun, 16 Oct 2022 17:23:00 -0500
Subject: [PATCH] snapshot...

---
 modules/deeplearning/srcnn_l1b_l2.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py
index f0df6282..b963d5f2 100644
--- a/modules/deeplearning/srcnn_l1b_l2.py
+++ b/modules/deeplearning/srcnn_l1b_l2.py
@@ -698,6 +698,10 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     grd_b = normalize(grd_b, 'refl_0_65um_nom', mean_std_dct)
 
     grd_c = resample_2d_linear_one(x, y, grd_c, x_up, y_up)
+    if label_param == 'cloud_fraction':
+        grd_c = np.where(np.isnan(grd_c), 0, grd_c)
+    else:
+        grd_c = normalize(grd_c, label_param, mean_std_dct)
 
     data = np.stack([grd_a, grd_b, grd_c], axis=2)
     data = np.expand_dims(data, axis=0)
-- 
GitLab