From 34c71a08baa04dffda50be47eed7589c66097e9e Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Wed, 30 Dec 2020 09:38:49 -0600
Subject: [PATCH] snapshot...

---
 modules/aeolus/aeolus_amv.py | 29 ++++++++++++++---------------
 1 file changed, 14 insertions(+), 15 deletions(-)

diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py
index 2745eab2..7b039c80 100644
--- a/modules/aeolus/aeolus_amv.py
+++ b/modules/aeolus/aeolus_amv.py
@@ -280,6 +280,15 @@ def run_best_fit_all(full_domain=False):
             keys = list(pr_dct.keys())
             for key in keys:
                 prd_list.append(pr_dct.get(key))
+
+            amvs = np.concatenate(amvs_list)
+            bfs = np.concatenate(bfs_list)
+            rbm = np.concatenate(rb_list)
+            bfs_gfs = np.concatenate(bfs_gfs_list)
+            prd = np.concatenate(prd_list)
+
+            tup = (amvs, bfs, prd, bfs_gfs, rbm)
+            return tup
     else:
         for k, file in enumerate(raob_files):
             raob_dct, ts = get_raob_dict_cdf(raob_dir+file)
@@ -291,27 +300,17 @@ def run_best_fit_all(full_domain=False):
 
             out_list.append((amvs, np.array(bfs), prds))
 
-        # for dct in out_list:
-        #     keys = list(dct.keys())
-        #     for key in keys:
-        #         tup = dct.get(key)
-        #         amvs_list.append(tup[0])
-        #         bfs_list.append(tup[1])
-
         for tup in out_list:
             amvs_list.append(tup[0])
             bfs_list.append(tup[1])
             prd_list.append(tup[2])
 
-    amvs = np.concatenate(amvs_list)
-    bfs = np.concatenate(bfs_list)
-    rbm = np.concatenate(rb_list)
-    bfs_gfs = np.concatenate(bfs_gfs_list)
-    prd = np.concatenate(prd_list)
-
-    tup = (amvs, bfs, prd, bfs_gfs, rbm)
+        amvs = np.concatenate(amvs_list)
+        bfs = np.concatenate(bfs_list)
+        prd = np.concatenate(prd_list)
 
-    return tup
+        tup = (amvs, bfs, prd)
+        return tup
 
 
 def get_product_at_locs(raob_to_amv_dct, ts, files, filepath=None):
-- 
GitLab