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

minor...

parent df2d2c12
No related branches found
No related tags found
No related merge requests found
......@@ -969,15 +969,16 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
10/2012 - Steve Wanzong - Created in Fortran
10/2013 - Sharon Nebuda - rewritten for python
"""
undef = -9999.0
flag = 3
bf_data = (undef, undef, undef, flag)
fcst_num_levels = fcst_spd.shape[0]
fcst_num_levels = fcst_prs.shape[0]
PressDiff = 150. # pressure above and below AMV to look for fit
TopPress = 50. # highest level to allow search
PressDiff = 150.0 # pressure above and below AMV to look for fit
TopPress = 50.0 # highest level to allow search
flag = 3
bf_data = (undef, undef, undef, flag)
if amv_prs < TopPress:
if verbose:
print('AMV location lat,lon,prs ({0},{1},{2}) is higher than pressure {3}'.format(amv_lat,amv_lon,amv_prs,TopPress))
......@@ -985,7 +986,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
# Calculate the pressure +/- 150 hPa from the AMV pressure.
PressMax = amv_prs + PressDiff
PressMin = max((amv_prs-PressDiff), TopPress)
PressMin = max((amv_prs - PressDiff), TopPress)
# 1d array of indicies to consider for best fit location
kk = np.where((fcst_prs < PressMax) & (fcst_prs > PressMin))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment