Skip to content
Snippets Groups Projects
Commit ea9b214a authored by rink's avatar rink
Browse files

snapshot..

parent 6c1d528f
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment