From 01f21349dcd37422a751ce61a6ed098a6c97ea06 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Sat, 19 Dec 2020 14:45:52 -0600
Subject: [PATCH] snapshot...

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

diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py
index 668ccd58..1c08d43e 100644
--- a/modules/aeolus/aeolus_amv.py
+++ b/modules/aeolus/aeolus_amv.py
@@ -1038,12 +1038,22 @@ def analyze2(amvs_list, bf_list, raob_match_list, bf_gfs_list, amv_prod_list):
     #return bin_ranges, bin_pres, bin_spd, bin_dir
 
 
-def compare_amvs_bestfit_all(amvs_list, bfs_list, bin_size=200):
-    amvs = np.concatenate(amvs_list, axis=1)
-    amvs = np.transpose(amvs, axes=[1, 0])
-    bfs = np.stack(bfs_list, axis=0)
+def compare_amvs_bestfit_all(all_list, bin_size=200):
+    ntimes = len(all_list)
+
+    amvs_list = []
+    bfs_list = []
+    for dct in all_list:
+        keys = list(dct.keys())
+        for key in keys:
+            tup = dct.get(key)
+            amvs_list.append(tup[0])
+            bfs_list.append(tup[1])
+
+    amvs = np.concatenate(amvs_list)
+    bfs = np.concatenate(bfs_list)
 
-    return compare_amvs_bestfit(amvs, bfs, bin_size=bin_size)
+    bin_ranges, bin_pres, bin_spd, bin_dir = compare_amvs_bestfit(amvs, bfs, bin_size=bin_size)
 
 
 def compare_amvs_bestfit(amvs, bfs, bin_size=200):
-- 
GitLab