diff --git a/modules/amv/caliop_clavrx_amv.py b/modules/amv/caliop_clavrx_amv.py index 8759de27d3d1a1b73f50feb7da71a2ea630cd268..4774de82cacfeb7dcfff02ecdec353461c9e809a 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 +