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

minor

parent 631916d5
Branches
No related tags found
No related merge requests found
...@@ -1284,7 +1284,7 @@ def get_aeolus_time_dict(filename, lon360=False, do_sort=True): ...@@ -1284,7 +1284,7 @@ def get_aeolus_time_dict(filename, lon360=False, do_sort=True):
# make each profile at a timestamp a numpy array # make each profile at a timestamp a numpy array
def time_dict_to_nd(time_dict): def time_dict_to_nd_0(time_dict):
keys = list(time_dict.keys()) keys = list(time_dict.keys())
for key in keys: for key in keys:
vals = time_dict[key] vals = time_dict[key]
...@@ -1295,16 +1295,25 @@ def time_dict_to_nd(time_dict): ...@@ -1295,16 +1295,25 @@ def time_dict_to_nd(time_dict):
return time_dict return time_dict
# # make each profile at a timestamp a numpy array # # make each profile at a timestamp a numpy array
# def time_dict_to_nd(time_dict): def time_dict_to_nd(time_dict):
# keys = list(time_dict.keys()) keys = list(time_dict.keys())
# for key in keys: for key in keys:
# vals = time_dict[key] prof_s = time_dict[key]
# if vals is not None: if prof_s is not None:
# for i in range(len(vals)): for i in range(len(prof_s)):
# nda = np.array(vals[i]) nda = np.stack(prof_s[i])
# vals[i] = nda prof_s[i] = nda
#
# return time_dict return time_dict
def time_dict_to_nd_2(time_dict):
keys = list(time_dict.keys())
for key in keys:
vals = time_dict[key]
if vals is not None:
time_dict[key] = np.stack(vals)
return time_dict
def concat(t_dct_0, t_dct_1): def concat(t_dct_0, t_dct_1):
keys_0 = list(t_dct_0.keys()) keys_0 = list(t_dct_0.keys())
...@@ -1393,16 +1402,6 @@ def time_dict_to_cld_layers(time_dict): ...@@ -1393,16 +1402,6 @@ def time_dict_to_cld_layers(time_dict):
return time_dict_layers return time_dict_layers
def time_dict_to_nd_2(time_dict):
keys = list(time_dict.keys())
for key in keys:
vals = time_dict[key]
if vals is not None:
time_dict[key] = np.stack(vals)
return time_dict
def get_cloud_layers_dict(filename, lon360=False): def get_cloud_layers_dict(filename, lon360=False):
a_d = get_aeolus_time_dict(filename, lon360=lon360) a_d = get_aeolus_time_dict(filename, lon360=lon360)
c_d = time_dict_to_cld_layers(a_d) c_d = time_dict_to_cld_layers(a_d)
...@@ -1417,20 +1416,6 @@ def get_cloud_layers_dict_s(aeolus_files_dir, lon360=False): ...@@ -1417,20 +1416,6 @@ def get_cloud_layers_dict_s(aeolus_files_dir, lon360=False):
return cld_lyr_dct return cld_lyr_dct
# def run_amv_aeolus_best_fit(match_dict, aeolus_dict):
# keys = list(match_dict.keys())
#
# for key in keys:
# profs = aeolus_dict.get(key)
# layers = profs[0]
# if layers is None:
# continue
# lat = layers[0, 0]
# lon = layers[0, 1]
#
# return None
def get_search_box(nav, lon, lat): def get_search_box(nav, lon, lat):
cc, ll = nav.earth_to_lc(lon, lat) cc, ll = nav.earth_to_lc(lon, lat)
if cc is None: if cc is None:
...@@ -1631,7 +1616,7 @@ def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=Non ...@@ -1631,7 +1616,7 @@ def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=Non
a_d = get_cloud_layers_dict_s(aeolus_files_dir) a_d = get_cloud_layers_dict_s(aeolus_files_dir)
else: else:
a_d = get_aeolus_time_dict_s(aeolus_files_dir, chan=chan) a_d = get_aeolus_time_dict_s(aeolus_files_dir, chan=chan)
a_d = time_dict_to_nd(a_d) a_d = time_dict_to_nd_0(a_d)
amv_files = None amv_files = None
if amv_source == 'CARR': if amv_source == 'CARR':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment