From 6af5207756454d9d82e791753efe2d8139927e0c Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Sun, 11 Jun 2023 20:53:06 -0500
Subject: [PATCH] snapshot...

---
 .../deeplearning/cloud_fraction_fcn_abi.py    | 27 ++++++++++---------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/modules/deeplearning/cloud_fraction_fcn_abi.py b/modules/deeplearning/cloud_fraction_fcn_abi.py
index 014210e3..8f23e996 100644
--- a/modules/deeplearning/cloud_fraction_fcn_abi.py
+++ b/modules/deeplearning/cloud_fraction_fcn_abi.py
@@ -783,10 +783,8 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     refl_hi = get_grid_values_all(h5f, 'refl_0_65um_nom_max_sub')
     refl_std = get_grid_values_all(h5f, 'refl_0_65um_nom_stddev_sub')
     cp = get_grid_values_all(h5f, label_param)
-    lons = get_grid_values_all(h5f, 'longitude')
-    lats = get_grid_values_all(h5f, 'latitude')
-
-    h5f.close()
+    # lons = get_grid_values_all(h5f, 'longitude')
+    # lats = get_grid_values_all(h5f, 'latitude')
 
     cld_frac = run_evaluate_static_(bt, refl, refl_lo, refl_hi, refl_std, cp, ckpt_dir)
 
@@ -794,17 +792,20 @@ def run_evaluate_static(in_file, out_file, ckpt_dir):
     border = int((KERNEL_SIZE - 1)/2)
     cld_frac_out[border:y_len-border, border:x_len - border] = cld_frac[0, :, :]
 
-    var_names = ['cloud_fraction', 'temp_11_0um', 'refl_0_65um']
-    dims = ['num_params', 'y', 'x']
-    da = xr.DataArray(np.stack([cld_frac_out, bt, refl], axis=0), dims=dims)
-    da.assign_coords({
-        'num_params': var_names,
-        'lat': (['y', 'x'], lats),
-        'lon': (['y', 'x'], lons)
-    })
+    # make a DataArray
+    # var_names = ['cloud_fraction', 'temp_11_0um', 'refl_0_65um']
+    # dims = ['num_params', 'y', 'x']
+    # da = xr.DataArray(np.stack([cld_frac_out, bt, refl], axis=0), dims=dims)
+    # da.assign_coords({
+    #     'num_params': var_names,
+    #     'lat': (['y', 'x'], lats),
+    #     'lon': (['y', 'x'], lons)
+    # })
+
+    h5f.close()
 
     if out_file is not None:
-        np.save(out_file, (cld_frac_out, bt, refl, cp, lons, lats))
+        np.save(out_file, (cld_frac_out, bt, refl, cp))
     else:
         # return [cld_frac_out, bt, refl, cp, lons, lats]
         return cld_frac_out
-- 
GitLab