diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index 7d419e3f55e0f9f32ef466a5fc598c82ee8a584e..54c4a11411321dd00a763c2abce3ada786d083c3 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -376,15 +376,17 @@ sub_lon = -137.0 # GOES-17 # aeolus_dict: time -> profiles # amv_files_path: directory containing AMVs, '/home/user/amvdir/' # return dict: aeolus time -> tuple (amv_lon, amv_lat, amv_pres, amv_spd, amv_dir) -def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14'): - nav = GEOSNavigation(sub_lon=sub_lon) +def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14', amv_files=None): + nav = amv_files.get_navigation() + #nav = GEOSNavigation(sub_lon=sub_lon) match_dict = {} keys = list(aeolus_dict.keys()) last_f_idx = -1 for key in keys: - fname, ftime, f_idx = get_file_containing_time(key, amv_files_path, amv_file_duration, amv_source, band) + #fname, ftime, f_idx = get_file_containing_time(key, amv_files_path, amv_file_duration, amv_source, band) + fname, ftime, f_idx = get_file_containing_time(key) if f_idx is None: continue profs = aeolus_dict.get(key) @@ -527,7 +529,13 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct): 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) + + amv_files = None + if amv_source == 'CARR': + amv_files = CarrStereo(amv_files_dir, 60, band) + + #m_d = match_amvs_to_aeolus(a_d, amv_files_dir, amv_source, band) + m_d = match_amvs_to_aeolus(a_d, amv_files_dir, amv_source, band, amv_files) if outfile is not None: create_file(outfile, m_d, a_d)