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

snapshot...

parent a4d4c987
No related branches found
No related tags found
No related merge requests found
...@@ -220,9 +220,6 @@ def time_dict_to_nd(time_dict): ...@@ -220,9 +220,6 @@ def time_dict_to_nd(time_dict):
if vals is not None: if vals is not None:
nda = np.array(vals[0]) # only take one profile per second nda = np.array(vals[0]) # only take one profile per second
time_dict[key] = nda time_dict[key] = nda
# for i in range(len(vals)):
# nda = np.array(vals[i])
# vals[i] = nda
return time_dict return time_dict
...@@ -266,7 +263,6 @@ def get_aeolus_time_dict_s(files_path, lon360=False, do_sort=True, chan='mie'): ...@@ -266,7 +263,6 @@ def get_aeolus_time_dict_s(files_path, lon360=False, do_sort=True, chan='mie'):
dct_s = [] dct_s = []
for fname in sorted_filenames: for fname in sorted_filenames:
a_dct = get_aeolus_time_dict(fname, lon360=lon360, do_sort=do_sort) a_dct = get_aeolus_time_dict(fname, lon360=lon360, do_sort=do_sort)
# t_dct = time_dict_to_nd(a_dct)
dct_s.append(a_dct) dct_s.append(a_dct)
t_dct = dct_s[0] t_dct = dct_s[0]
...@@ -389,8 +385,6 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14 ...@@ -389,8 +385,6 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14
continue continue
layers = profs layers = profs
# if isinstance(profs, list):
# layers = profs[0]
lat = layers[0, 0] lat = layers[0, 0]
lon = layers[0, 1] lon = layers[0, 1]
...@@ -456,10 +450,7 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals ...@@ -456,10 +450,7 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
num_amvs.append(param_nd.shape[1]) num_amvs.append(param_nd.shape[1])
namvs += param_nd.shape[1] namvs += param_nd.shape[1]
prof_s = aeolus_dct.get(key) prof = aeolus_dct.get(key)
prof = prof_s
# if isinstance(prof, list):
# prof = prof_s[0]
num_levs.append(prof.shape[0]) num_levs.append(prof.shape[0])
nlevs += prof.shape[0] nlevs += prof.shape[0]
...@@ -514,10 +505,7 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals ...@@ -514,10 +505,7 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
i_b = i_a + namvs i_b = i_a + namvs
i_d = i_c + nlevs i_d = i_c + nlevs
prof_s = aeolus_dct.get(key) prof = aeolus_dct.get(key)
prof = prof_s
# if isinstance(prof_s, list):
# prof = prof_s[0]
if not cld_lyr: if not cld_lyr:
prf_hht[i_c:i_d] = prof[:, 3] prf_hht[i_c:i_d] = prof[:, 3]
prf_hhb[i_c:i_d] = prof[:, 4] prf_hhb[i_c:i_d] = prof[:, 4]
...@@ -551,10 +539,10 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals ...@@ -551,10 +539,10 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
# outfile: pathname for the Netcdf match file # outfile: pathname for the Netcdf match file
def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=None, amv_source='OPS', band='14', chan='mie'): def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=None, amv_source='OPS', band='14', chan='mie'):
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) if chan == 'mie':
#---------------------------------- a_d = time_dict_to_cld_layers(a_d)
#a_d = time_dict_to_cld_layers(a_d)
# a_d = time_dict_to_nd_2(a_d) # a_d = time_dict_to_nd_2(a_d)
a_d = time_dict_to_nd(a_d)
amv_files = None amv_files = None
if amv_source == 'CARR': if amv_source == 'CARR':
...@@ -565,7 +553,7 @@ def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=Non ...@@ -565,7 +553,7 @@ def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=Non
if outfile is not None: if outfile is not None:
cld_lyr = False cld_lyr = False
if chan == 'mie': if chan == 'mie':
cld_lyr = False cld_lyr = True
create_file(outfile, m_d, a_d, amv_files, cld_lyr=cld_lyr) create_file(outfile, m_d, a_d, amv_files, cld_lyr=cld_lyr)
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment