From 9f93bb2f8c11480ee76afbea9f5417fa90edd2da Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Mon, 10 Jul 2023 15:20:23 -0500
Subject: [PATCH] snapshot...

---
 modules/icing/pirep_goes.py | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/icing/pirep_goes.py b/modules/icing/pirep_goes.py
index bcbe090e..0d14f719 100644
--- a/modules/icing/pirep_goes.py
+++ b/modules/icing/pirep_goes.py
@@ -330,7 +330,6 @@ def run(pirep_dct, platform, outfile=None, outfile_l1b=None, dt_str_start=None,
             for didx, ds_name in enumerate(ds_list):
                 gvals = get_grid_values(h5f, ds_name, ll_a[0], cc_a[0], 20, fill_value_name=None, range_name=ds_range[didx], fill_value=ds_fill[didx])
                 if gvals is not None:
-                    #ds_grd_dct[ds_name].append(gvals)
                     ds_lst.append(gvals)
                     cnt_a += 1
 
@@ -339,16 +338,14 @@ def run(pirep_dct, platform, outfile=None, outfile_l1b=None, dt_str_start=None,
             for didx, ds_name in enumerate(l1b_ds_list):
                 gvals = get_grid_values(h5f, ds_name, ll_a[0], cc_a[0], 20, fill_value_name=None, range_name=l1b_ds_range[didx], fill_value=l1b_ds_fill[didx])
                 if gvals is not None:
-                    #l1b_grd_dct[ds_name].append(gvals)
                     l1b_lst.append(gvals)
                     cnt_b += 1
 
             if cnt_a > 0 and cnt_a != len(ds_list):
                 continue
-                #raise GenericException('weirdness')
+
             if cnt_b > 0 and cnt_b != len(l1b_ds_list):
                 continue
-                #raise GenericException('weirdness')
 
             if cnt_a == len(ds_list) and cnt_b == len(l1b_ds_list):
                 for didx, ds_name in enumerate(ds_list):
@@ -370,9 +367,6 @@ def run(pirep_dct, platform, outfile=None, outfile_l1b=None, dt_str_start=None,
     t_start = time_s[0]
     t_end = time_s[len(time_s)-1]
 
-    data_dct = {}
-    for ds_name in ds_list:
-        data_dct[ds_name] = np.array(ds_grd_dct[ds_name])
     lon_c = np.array(lon_c)
     lat_c = np.array(lat_c)
     time_s = np.array(time_s)
@@ -380,6 +374,10 @@ def run(pirep_dct, platform, outfile=None, outfile_l1b=None, dt_str_start=None,
     ice_int_s = np.array(ice_int_s)
     unq_ids = np.array(unq_ids)
 
+    data_dct = {}
+    for ds_name in ds_list:
+        data_dct[ds_name] = np.array(ds_grd_dct[ds_name])
+
     if outfile is not None:
         outfile = add_time_range_to_filename(outfile, t_start, t_end)
         create_file(outfile, data_dct, ds_list, ds_types, lon_c, lat_c, time_s, fl_alt_s, ice_int_s, unq_ids)
-- 
GitLab