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

snapshot...

parent bd586536
No related branches found
No related tags found
No related merge requests found
...@@ -948,10 +948,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc ...@@ -948,10 +948,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
v3 = VecDiff[imin+1] v3 = VecDiff[imin+1]
v1 = VecDiff[imin-1] v1 = VecDiff[imin-1]
# if top of allowed region if p3 < TopPress and v1 != v2 and v2 != v3: # check not collinear, above allowed region
if p3 < TopPress:
SatwindBestFitPress = p2
elif v1 != v2 and v2 != v3: # check not collinear
SatwindBestFitPress = p2 - (0.5 * SatwindBestFitPress = p2 - (0.5 *
((((p2 - p1) * (p2 - p1) * (v2 - v3)) - ((p2 - p3) * (p2 - p3) * (v2 - v1))) / ((((p2 - p1) * (p2 - p1) * (v2 - v3)) - ((p2 - p3) * (p2 - p3) * (v2 - v1))) /
(((p2 - p1) * (v2 - v3)) - ((p2 - p3) * (v2 - v1))))) (((p2 - p1) * (v2 - v3)) - ((p2 - p3) * (v2 - v1)))))
...@@ -1094,7 +1091,7 @@ def best_fit_altitude(amv_spd, amv_dir, amv_alt, amv_lat, amv_lon, fcst_spd, fcs ...@@ -1094,7 +1091,7 @@ def best_fit_altitude(amv_spd, amv_dir, amv_alt, amv_lat, amv_lon, fcst_spd, fcs
v3 = vec_diff[imin+1] v3 = vec_diff[imin+1]
# check not co-linear and below alt_max # check not co-linear and below alt_max
if a3 < alt_max and a1 != a2 and a2 != a3: if a3 < alt_max and v1 != v2 and v2 != v3:
sat_wind_best_fit_alt = minimize_quadratic(a1, a2, a3, v1, v2, v3) sat_wind_best_fit_alt = minimize_quadratic(a1, a2, a3, v1, v2, v3)
if sat_wind_best_fit_alt < a1 or sat_wind_best_fit_alt > a3: if sat_wind_best_fit_alt < a1 or sat_wind_best_fit_alt > a3:
sat_wind_best_fit_alt = a2 sat_wind_best_fit_alt = a2
......
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