From d5cf0608e64370004f94b2e5413823088a104d2d Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Fri, 16 Sep 2022 10:39:28 -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 a361b6ca..7b817e69 100644 --- a/modules/amv/caliop_clavrx_amv.py +++ b/modules/amv/caliop_clavrx_amv.py @@ -352,6 +352,9 @@ def analyze(filename): return cc_ctp, acha_ctp, amv_press_avg, lats +new_header = ' TARG LAT LON BOX SRCH SPD DIR PW LLCM SPDG DIRG TBALB MAXC TRKM PERR HAMD QINF QIWF QIC HGT' + + 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) @@ -361,7 +364,7 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou prs_s = [] for fname in amv_filenames: - print(fname) + print('Start: ', fname) nom_time = amv_ds.get_datetime(fname).timestamp() amvs_nd = get_amv_nd(fname, delimiter=',') amvs_nd = filter_amvs(amvs_nd) @@ -391,7 +394,8 @@ def compute_and_add_geo_hgt(path_to_amvs, path_to_gfs, amv_source, band='14', ou alt_f = np.array(alt_f) alt_f = np.reshape(alt_f, [num_amvs, 1]) amvs_nd = np.hstack([amvs_nd, alt_f]) - print(amvs_nd.shape) + new_amv_fname = os.path.split(fname) + np.savetxt(new_amv_fname, amvs_nd, header=new_header, delimiter=',') print('Done...') alt_s = np.array(alt_s) -- GitLab