From f49edafe2083204c81d0e14c0e6a326c88b11d7a Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Mon, 12 Jun 2023 13:52:46 -0500
Subject: [PATCH] snapshot...

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

diff --git a/modules/deeplearning/cloud_fraction_fcn_abi.py b/modules/deeplearning/cloud_fraction_fcn_abi.py
index 87e04401..32ea7dbb 100644
--- a/modules/deeplearning/cloud_fraction_fcn_abi.py
+++ b/modules/deeplearning/cloud_fraction_fcn_abi.py
@@ -794,7 +794,9 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
 
     # Use this hack for now.
     off_earth = (bt <= 161.0)
+    night = np.isnan(refl)
     cld_frac_out[off_earth] = -1
+    cld_frac_out[np.invert(off_earth) & night] = -1
 
     # ---  Make a DataArray ----------------------------------------------------
     # var_names = ['cloud_fraction', 'temp_11_0um', 'refl_0_65um']
@@ -857,7 +859,9 @@ def run_evaluate_static_full_disk(in_file, out_file, ckpt_dir):
 
     # Use this hack for now.
     off_earth = (bt <= 161.0)
+    night = np.isnan(refl)
     cld_frac_out[off_earth] = -1
+    cld_frac_out[np.invert(off_earth) & night] = -1
 
     # ---   Make DataArray -------------------------------------------------
     # var_names = ['cloud_fraction', 'temp_11_0um', 'refl_0_65um']
-- 
GitLab