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

minor

parent 631916d5
No related branches found
No related tags found
No related merge requests found
......@@ -1284,7 +1284,7 @@ def get_aeolus_time_dict(filename, lon360=False, do_sort=True):
# 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())
for key in keys:
vals = time_dict[key]
......@@ -1295,16 +1295,25 @@ def time_dict_to_nd(time_dict):
return time_dict
# # make each profile at a timestamp a numpy array
# def time_dict_to_nd(time_dict):
# keys = list(time_dict.keys())
# for key in keys:
# vals = time_dict[key]
# if vals is not None:
# for i in range(len(vals)):
# nda = np.array(vals[i])
# vals[i] = nda
#
# return time_dict
def time_dict_to_nd(time_dict):
keys = list(time_dict.keys())
for key in keys:
prof_s = time_dict[key]
if prof_s is not None:
for i in range(len(prof_s)):
nda = np.stack(prof_s[i])
prof_s[i] = nda
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):
keys_0 = list(t_dct_0.keys())
......@@ -1393,16 +1402,6 @@ def time_dict_to_cld_layers(time_dict):
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):
a_d = get_aeolus_time_dict(filename, lon360=lon360)
c_d = time_dict_to_cld_layers(a_d)
......@@ -1417,20 +1416,6 @@ def get_cloud_layers_dict_s(aeolus_files_dir, lon360=False):
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):
cc, ll = nav.earth_to_lc(lon, lat)
if cc is None:
......@@ -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)
else:
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
if amv_source == 'CARR':
......
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