diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py
index 4774de82cacfeb7dcfff02ecdec353461c9e809a..b53f5f29b8ea617a18427edb5b211f39e65fe83c 100644
--- a/modules/amv/caliop_clavrx_amv.py
+++ b/modules/amv/caliop_clavrx_amv.py
@@ -386,10 +386,11 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou
             alt = pressure_to_altitude(amv_press, None, gfs_press, temp_prof_s[k, :])
             alt_s.append(alt.magnitude)
             prs_s.append(amv_press)
-        alt_s = np.array(alt_s)
-        prs_s = np.array(prs_s)
         print('Done...')
 
+    alt_s = np.array(alt_s)
+    prs_s = np.array(prs_s)
+
     if out_file is not None:
         np.save(out_file, (prs_s, alt_s))
     else: