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

take out explicit GOES-16 range check, shouldn't need now.

parent 19bc4c19
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@ first_time = True
ftimes = []
flist = None
G16_lon_range = [-130.0, -30.0]
G16_lat_range = [-64.0, 64.0]
# G16_lon_range = [-130.0, -30.0]
# G16_lat_range = [-64.0, 64.0]
class MyGenericException(Exception):
......@@ -212,6 +212,8 @@ def get_aeolus_time_dict_s(filenames, lon360=False, do_sort=True):
def get_search_box(nav, lon, lat):
cc, ll = nav.earth_to_lc(lon, lat)
if cc is None:
return None, None
c_rng = [cc - half_width, cc + half_width]
l_rng = [ll - half_width, ll + half_width]
......@@ -231,6 +233,7 @@ def get_search_box(nav, lon, lat):
return c_rng, l_rng
# Framework
amv_dir_name = 'Wind_Dir'
amv_spd_name = 'Wind_Speed'
amv_lon_name = 'Longitude'
......@@ -238,6 +241,12 @@ amv_lat_name = 'Latitude'
amv_elem_name = 'Element'
amv_line_name = 'Line'
amv_press_name = 'MedianPress'
# -------------------------------
# Carr stereo
amv_lon_name = 'Lon'
amv_lat_name = 'Lat'
amv_press_name = 'pres'
# -------------------------------
# aeolus_dict: time -> profiles
......@@ -262,12 +271,16 @@ def match_amvs_to_aelous(aeolus_dict, amv_files_path, amv_source='OPS', band='14
lat = layers[0, 0]
lon = layers[0, 1]
# check range
if lat > G16_lat_range[1] or lat < G16_lat_range[0]:
continue
if lon > G16_lon_range[1] or lon < G16_lon_range[0]:
continue
# if lat > G16_lat_range[1] or lat < G16_lat_range[0]:
# continue
# if lon > G16_lon_range[1] or lon < G16_lon_range[0]:
# continue
# ------------------------------------------------
c_rng, l_rng = get_search_box(nav, lon, lat)
if c_rng is None:
continue
if f_idx != last_f_idx:
last_f_idx = f_idx
ds = Dataset(fname)
......@@ -281,8 +294,6 @@ def match_amvs_to_aelous(aeolus_dict, amv_files_path, amv_source='OPS', band='14
# cc, ll = nav.earth_to_lc_s(amv_lons, amv_lats)
ds.close()
c_rng, l_rng = get_search_box(nav, lon, lat)
in_cc = np.logical_and(cc > c_rng[0], cc < c_rng[1])
in_ll = np.logical_and(ll > l_rng[0], ll < l_rng[1])
in_box = np.logical_and(in_cc, in_ll)
......
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