From b297a0fca7161b16cab5618fa05f739bd7f842c6 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Thu, 7 Apr 2022 13:32:32 -0500 Subject: [PATCH] snapshot... --- modules/aeolus/aeolus_amv.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index 4fedced4..bc931211 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -263,7 +263,7 @@ def run_best_fit_driver(output_path, amv_dir, source, raob_path, gfs_path, produ bfs_gfs_list = [] prd_list = [] - ts_first = None + ts_first, tf_last = None, None for k, raob_filename in enumerate(raob_files): raob_dct = get_raob_dict_cdf(raob_filename) @@ -272,13 +272,15 @@ def run_best_fit_driver(output_path, amv_dir, source, raob_path, gfs_path, produ m_d, amv_filename = match_amvs_to_raobs(raob_dct, ts, amv_ds) if m_d is None: continue - if ts_first is None: - ts_first = ts gfs_file = gfs_files.get_file(ts)[0] if gfs_file is None: continue + if ts_first is None: + ts_first = ts + ts_last = ts + if gfs_file is not None: locs = np.array(keys) xr_dataset = xr.open_dataset(gfs_file) @@ -317,8 +319,7 @@ def run_best_fit_driver(output_path, amv_dir, source, raob_path, gfs_path, produ out_list.append((bf_dct, prd_dct)) - ts_last = ts - + # aggregate and dump to a pickle file for tup in out_list: ab_dct = tup[0] pr_dct = tup[1] -- GitLab