Skip to content
Snippets Groups Projects
Commit db7749cd authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 998bc290
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,8 @@ num_lines = 5424
def get_amvs(amv_ds, timestamp, filepath=None):
if filepath is None:
filepath, ftime, f_idx = amv_ds.get_file(timestamp)
if filepath is None:
return None
amv_params = amv_ds.get_parameters()
# TODO: Need to generalize this better
amv_params = [amv_ds.lat_name, amv_ds.lon_name, amv_ds.elem_name, amv_ds.line_name] + amv_params
......@@ -73,6 +75,8 @@ def match_amvs_to_raobs(raob_dict, raob_time, amv_ds, filepath=None):
if filepath is None:
filepath, ftime, f_idx = amv_ds.get_file(raob_time)
if filepath is None:
return None
ds = Dataset(filepath)
......@@ -254,6 +258,8 @@ def run_best_fit_all(amv_dir, source, product_dir, product, raob_path, gfs_path,
for k, file in enumerate(raob_files):
raob_dct, ts = get_raob_dict_cdf(file)
m_d = match_amvs_to_raobs(raob_dct, ts, amv_files)
if m_d is None:
continue
gfs_file = gfs_files.get_file(ts)[0]
if gfs_file is None:
continue
......@@ -289,6 +295,8 @@ def run_best_fit_all(amv_dir, source, product_dir, product, raob_path, gfs_path,
for k, file in enumerate(raob_files):
raob_dct, ts = get_raob_dict_cdf(file)
amvs = get_amvs(amv_files, ts)
if amvs is None:
continue
gfs_file = gfs_files.get_file(ts)[0]
if gfs_file is None:
continue
......
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