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

snapshot...

parent a7871bd4
No related branches found
No related tags found
No related merge requests found
......@@ -523,6 +523,42 @@ def get_product_at_locs(raob_to_amv_dct, ts, files, filepath=None):
return m_dct
def get_product_at_locs1x1(raob_to_amv_dct, ts, files, filepath=None):
keys = list(raob_to_amv_dct.keys())
m_dct = {}
nav = files.get_navigation()
the_params = files.get_parameters()
num_params = len(the_params)
if filepath is None:
filepath, ftime, f_idx = files.get_file(ts)
ds = Dataset(filepath)
var_s = []
for pstr in the_params:
var = ds[pstr]
var_s.append(var)
for key in keys:
amvs = raob_to_amv_dct.get(key)
num_amvs = amvs.shape[1]
alons = amvs[0, :]
alats = amvs[1, :]
cc, ll = nav.earth_to_lc_s(alons, alats)
aaa = np.zeros((num_params, num_amvs), dtype=np.float)
for vidx, var in enumerate(var_s):
for k in range(num_amvs):
aaa[vidx, k] = var[ll[k], cc[k]].data
m_dct[key] = aaa
ds.close()
return m_dct
def run_best_fit(raob_to_amv_dct, raob_dct, gfs_filename=None):
keys = list(raob_to_amv_dct.keys())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment