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

snapshot...

parent 51005c6c
No related branches found
No related tags found
No related merge requests found
...@@ -394,6 +394,7 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None): ...@@ -394,6 +394,7 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
gfs_press = None gfs_press = None
gfs_spd = None gfs_spd = None
gfs_dir = None gfs_dir = None
bf_gfs_list = None
if gfs_filename is not None: if gfs_filename is not None:
locs = np.array(keys) locs = np.array(keys)
do_gfs_best_fit = True do_gfs_best_fit = True
...@@ -404,14 +405,13 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None): ...@@ -404,14 +405,13 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
gfs_press = gfs_press[::-1] gfs_press = gfs_press[::-1]
uv_wind = get_vert_profile_s(xr_dataset, ['u-wind', 'v-wind'], locs[:, 1], locs[:, 0], method='nearest') uv_wind = get_vert_profile_s(xr_dataset, ['u-wind', 'v-wind'], locs[:, 1], locs[:, 0], method='nearest')
uv_wind = uv_wind.data uv_wind = uv_wind.values
wspd, wdir = spd_dir_from_uv(uv_wind[0, :, :], uv_wind[1, :, :]) wspd, wdir = spd_dir_from_uv(uv_wind[0, :, :], uv_wind[1, :, :])
wspd = wspd.magnitude wspd = wspd.magnitude
wdir = wdir.magnitude wdir = wdir.magnitude
gfs_spd = wspd[:, ::-1] gfs_spd = wspd[:, ::-1]
gfs_dir = wdir[:, ::-1] gfs_dir = wdir[:, ::-1]
amvs_list = [] amvs_list = []
bf_list = [] bf_list = []
raob_match_list = [] raob_match_list = []
...@@ -450,7 +450,8 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None): ...@@ -450,7 +450,8 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
amvs = np.transpose(amvs, axes=[1, 0]) amvs = np.transpose(amvs, axes=[1, 0])
bfs = np.stack(bf_list, axis=0) bfs = np.stack(bf_list, axis=0)
raob_match = np.stack(raob_match_list, axis=0) raob_match = np.stack(raob_match_list, axis=0)
bfs_gfs = np.stack(bf_gfs_list, axis=0) if len(bf_gfs_list) > 0:
bfs_gfs = np.stack(bf_gfs_list, axis=0)
good_amvs = amvs good_amvs = amvs
num_good = good_amvs.shape[0] num_good = good_amvs.shape[0]
......
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