From 3b45c83f36de9f7af0af80a90355f89e09064a9f Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Thu, 15 Sep 2022 13:58:28 -0500
Subject: [PATCH] snaphot...

---
 modules/amv/caliop_clavrx_amv.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py
index e52c1ddd..8759de27 100644
--- a/modules/amv/caliop_clavrx_amv.py
+++ b/modules/amv/caliop_clavrx_amv.py
@@ -357,6 +357,9 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14'):
     amv_ds = get_datasource(path_to_amvs, amv_source, file_time_span=20, band=band)
     amv_filenames = amv_ds.flist
 
+    alt_s = []
+    prs_s = []
+
     for fname in amv_filenames:
         print(fname)
         nom_time = amv_ds.get_datetime(fname).timestamp()
@@ -378,8 +381,13 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14'):
         temp_prof = temp_prof.values
         temp_prof_s = temp_prof[0, :, :]
 
-        alt_s = []
         for k in range(num_amvs):
-            alt = pressure_to_altitude(amvs_nd[k, amv_pres_idx], None, gfs_press, temp_prof_s[k, :])
+            amv_press = amvs_nd[k, amv_pres_idx]
+            alt = pressure_to_altitude(amv_press, None, gfs_press, temp_prof_s[k, :])
             alt_s.append(alt.magnitude)
-        alt_s = np.array(alt_s)
\ No newline at end of file
+            prs_s.append(amv_press)
+        alt_s = np.array(alt_s)
+        prs_s = np.array(prs_s)
+        print('Done...')
+
+    return prs_s, alt_s
-- 
GitLab