From 9a9155b4cebe1b5c52bf212caba99a0210aaca34 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 27 Oct 2020 16:23:01 -0500 Subject: [PATCH] snapshot... --- modules/aeolus/aeolus_amv.py | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/modules/aeolus/aeolus_amv.py b/modules/aeolus/aeolus_amv.py index 61a0f816..d50258c8 100644 --- a/modules/aeolus/aeolus_amv.py +++ b/modules/aeolus/aeolus_amv.py @@ -220,9 +220,6 @@ def time_dict_to_nd(time_dict): if vals is not None: nda = np.array(vals[0]) # only take one profile per second time_dict[key] = nda - # for i in range(len(vals)): - # nda = np.array(vals[i]) - # vals[i] = nda return time_dict @@ -266,7 +263,6 @@ def get_aeolus_time_dict_s(files_path, lon360=False, do_sort=True, chan='mie'): dct_s = [] for fname in sorted_filenames: 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) t_dct = dct_s[0] @@ -389,8 +385,6 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14 continue layers = profs - # if isinstance(profs, list): - # layers = profs[0] lat = layers[0, 0] lon = layers[0, 1] @@ -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]) namvs += param_nd.shape[1] - prof_s = aeolus_dct.get(key) - prof = prof_s - # if isinstance(prof, list): - # prof = prof_s[0] + prof = aeolus_dct.get(key) num_levs.append(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 i_b = i_a + namvs i_d = i_c + nlevs - prof_s = aeolus_dct.get(key) - prof = prof_s - # if isinstance(prof_s, list): - # prof = prof_s[0] + prof = aeolus_dct.get(key) if not cld_lyr: prf_hht[i_c:i_d] = prof[:, 3] 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 # 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'): a_d = get_aeolus_time_dict_s(aeolus_files_dir, chan=chan) + if chan == 'mie': + a_d = time_dict_to_cld_layers(a_d) + # a_d = time_dict_to_nd_2(a_d) a_d = time_dict_to_nd(a_d) - #---------------------------------- - #a_d = time_dict_to_cld_layers(a_d) - #a_d = time_dict_to_nd_2(a_d) amv_files = None if amv_source == 'CARR': @@ -565,7 +553,7 @@ def create_amv_to_aeolus_match_file(aeolus_files_dir, amv_files_dir, outfile=Non if outfile is not None: cld_lyr = False if chan == 'mie': - cld_lyr = False + cld_lyr = True create_file(outfile, m_d, a_d, amv_files, cld_lyr=cld_lyr) -- GitLab