diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index de2e837aecc2ca029417359a0774d2910a8411d3..6c302944e0a3cc9fc581fdf48ac16effe18fbd64 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -1690,7 +1690,6 @@ def match_amvs_to_aeolus_fast(aeolus_dict, amv_files_path, amv_source='OPS', ban keys = list(aeolus_dict.keys()) - last_f_idx = -1 for key in keys: fname, ftime, f_idx = amv_files.get_file_containing_time(key) @@ -1730,6 +1729,11 @@ def match_amvs_to_aeolus_fast(aeolus_dict, amv_files_path, amv_source='OPS', ban for prof in profs: lat = prof[0, 0] lon = prof[0, 1] + + cc_prf, ll_prf = nav.earth_to_lc(lon, lat) + if cc_prf is None or ll_prf is None: + continue + c_rng, l_rng = get_search_box(nav, lon, lat) if c_rng is None: continue @@ -1744,7 +1748,7 @@ def match_amvs_to_aeolus_fast(aeolus_dict, amv_files_path, amv_source='OPS', ban # dist = haversine_np(lon, lat, amv_lons[in_box], amv_lats[in_box]) param_nd = np.vstack(param_s) param_nd = param_nd[:, in_box] - match_dict[key].append((cc, ll, f_idx, prof, param_nd)) + match_dict[key].append((cc_prf, ll_prf, f_idx, prof, param_nd)) return match_dict