From 752decda1e194b644c7c32207c719610a1e27f5b Mon Sep 17 00:00:00 2001 From: rink <rink@ssec.wisc.edu> Date: Tue, 29 Sep 2020 15:24:10 -0500 Subject: [PATCH] minor --- modules/aeolus/aeolus_amv.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index 34e80d6c..249b256b 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -225,9 +225,18 @@ def get_aeolus_time_dict_s(files_path, lon360=False, do_sort=True): return t_dct -def run_amv_aeolus_best_fit(match_dict): - return None +def run_amv_aeolus_best_fit(match_dict, aeolus_dict): + keys = list(match_dict.keys()) + + for key in keys: + profs = aeolus_dict.get(key) + layers = profs[0] + if layers is None: + continue + lat = layers[0, 0] + lon = layers[0, 1] + return None def get_search_box(nav, lon, lat): cc, ll = nav.earth_to_lc(lon, lat) @@ -411,11 +420,11 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): rootgrp.close() -# aeolus_file: S4 NOAA txt output -# amv_files_dir: G16/17 AMV product file +# aeolus_files_dir: S4 NOAA txt output files +# amv_files_dir: G16/17 AMV product files # outfile: pathname for the Netcdf match file -def run(aeolus_file, amv_files_dir, outfile=None, amv_source='OPS', band='14'): - a_d = get_aeolus_time_dict(aeolus_file) +def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=None, amv_source='OPS', band='14'): + a_d = get_aeolus_time_dict_s(aeolus_files_dir) a_d = time_dict_to_nd(a_d) m_d = match_amvs_to_aeolus(a_d, amv_files_dir, amv_source, band) -- GitLab