From 31ba12ad50471e7385477146916dc8245a0e7a42 Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Thu, 15 Sep 2022 14:06:20 -0500
Subject: [PATCH] snaphot...

---
 modules/amv/caliop_clavrx_amv.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py
index 8759de27..4774de82 100644
--- a/modules/amv/caliop_clavrx_amv.py
+++ b/modules/amv/caliop_clavrx_amv.py
@@ -352,7 +352,7 @@ def analyze(filename):
     return cc_ctp, acha_ctp, amv_press_avg, lats
 
 
-def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14'):
+def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', out_file=None):
     gfs_ds = get_datasource(path_to_gfs, 'GFS')
     amv_ds = get_datasource(path_to_amvs, amv_source, file_time_span=20, band=band)
     amv_filenames = amv_ds.flist
@@ -390,4 +390,8 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14'):
         prs_s = np.array(prs_s)
         print('Done...')
 
-    return prs_s, alt_s
+    if out_file is not None:
+        np.save(out_file, (prs_s, alt_s))
+    else:
+        return prs_s, alt_s
+
-- 
GitLab