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

snapshot...

parent 6b116eea
No related branches found
No related tags found
No related merge requests found
......@@ -475,8 +475,8 @@ def run_best_fit_all():
amvs = get_amvs(amv_files, ts)
bfs = run_best_fit_gfs(amvs, gfs_dir+gfs_files[k], amv_lat_idx=0, amv_lon_idx=1, amv_prs_idx=4, amv_spd_idx=5, amv_dir_idx=6)
alons = amvs[0, :]
alats = amvs[1, :]
alons = amvs[:, 0]
alats = amvs[:, 1]
prds = get_product_at_lat_lons(prd_files, ts, alons, alats, filepath=None)
out_list.append((amvs, np.array(bfs), prds))
......@@ -1070,21 +1070,21 @@ def compare_amvs_bestfit_driver(all_list, bin_size=200):
rb_list = []
bfs_gfs_list = []
prd_list = []
for tup in all_list:
ab_dct = tup[0]
pr_dct = tup[1]
keys = list(ab_dct.keys())
for key in keys:
tup = ab_dct.get(key)
amvs_list.append(tup[0])
bfs_list.append(tup[1])
rb_list.append(tup[2])
bfs_gfs_list.append(tup[3])
keys = list(pr_dct.keys())
for key in keys:
prd_list.append(pr_dct.get(key))
# for tup in all_list:
# ab_dct = tup[0]
# pr_dct = tup[1]
#
# keys = list(ab_dct.keys())
# for key in keys:
# tup = ab_dct.get(key)
# amvs_list.append(tup[0])
# bfs_list.append(tup[1])
# rb_list.append(tup[2])
# bfs_gfs_list.append(tup[3])
#
# keys = list(pr_dct.keys())
# for key in keys:
# prd_list.append(pr_dct.get(key))
# amvs_list = []
......@@ -1096,19 +1096,18 @@ def compare_amvs_bestfit_driver(all_list, bin_size=200):
# amvs_list.append(tup[0])
# bfs_list.append(tup[1])
# for tup in all_list:
# amvs_list.append(tup[0])
# bfs_list.append(tup[1])
# amvs = np.concatenate(amvs_list)
# bfs = np.concatenate(bfs_list)
for tup in all_list:
amvs_list.append(tup[0])
bfs_list.append(tup[1])
prd_list.append(tup[2])
amvs = np.concatenate(amvs_list)
bfs = np.concatenate(bfs_list)
rbm = np.concatenate(rb_list)
bfs_gfs = np.concatenate(bfs_gfs_list)
#rbm = np.concatenate(rb_list)
#bfs_gfs = np.concatenate(bfs_gfs_list)
prd = np.concatenate(prd_list)
thin = np.logical_and(prd[:, 2] > 0, prd[:, 2] < 1)
thick = np.logical_and(prd[:, 2] >= 1, prd[:, 2] < 6)
deep = np.logical_and(prd[:, 2] >= 6, prd[:, 2] <= 20)
......@@ -1121,9 +1120,9 @@ def compare_amvs_bestfit_driver(all_list, bin_size=200):
bfs_thick = bfs[thick, :]
bfs_deep = bfs[deep, :]
bfs_gfs_thin = bfs_gfs[thin, :]
bfs_gfs_thick = bfs_gfs[thick, :]
bfs_gfs_deep = bfs_gfs[deep, :]
#bfs_gfs_thin = bfs_gfs[thin, :]
#bfs_gfs_thick = bfs_gfs[thick, :]
#bfs_gfs_deep = bfs_gfs[deep, :]
values = []
bin_ranges, bin_pres, bin_spd, bin_dir = compare_amvs_bestfit(amvs_thin, bfs_thin, bin_size=bin_size)
......@@ -1296,7 +1295,7 @@ def make_plot(bin_ranges, bin_values):
bias.append(np.average(bin_vals[i]))
do_plot(x_values, [bias_r, bias_g, bias], ['THIN', 'THICK', 'ALL'], ['blue', 'red', 'black'], title='ACHA - BestFit (RAOB)', x_axis_label='BIAS', y_axis_label='hPa', invert=True, flip=True)
do_plot(x_values, [mad_r, mad_g, mad], ['THIN', 'THICK', 'ALL'], ['blue', 'red', 'black'], title='ACHA - BestFit Full Domain (GFS)', x_axis_label='MAD', y_axis_label='hPa', invert=True, flip=True)
#do_plot(x_values, [pres_mad_r, pres_mad_g], ['RAOB', 'GFS'], ['blue', 'red'], title='ACHA - BestFit', x_axis_label='MAD', y_axis_label='hPa', invert=True, flip=True)
#do_plot(x_values, [spd_mad_r, spd_mad_g], ['RAOB', 'GFS'], ['blue', 'red'], title='ACHA - BestFit', x_axis_label='MAE (m/s)', y_axis_label='hPa', invert=True, flip=True)
#do_plot(x_values, [pres_bias_r, pres_bias_g], ['RAOB', 'GFS'], ['blue', 'red'], title='ACHA - BestFit', x_axis_label='BIAS', y_axis_label='hPa', invert=True, flip=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment