diff --git a/modules/amv/intercompare.py b/modules/amv/intercompare.py index e4f282ee2d8ee0cd66b00fa05ef4e2cbace40cc5..c45a14a077a14352628d471d28de25bc38212809 100644 --- a/modules/amv/intercompare.py +++ b/modules/amv/intercompare.py @@ -947,7 +947,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc v3 = VecDiff[imin+1] v1 = VecDiff[imin-1] - if p3 < TopPress and v1 != v2 and v2 != v3: # check not collinear, above allowed region + if p3 > TopPress and v1 != v2 and v2 != v3: # check not collinear, above allowed region SatwindBestFitPress = p2 - (0.5 * ((((p2 - p1) * (p2 - p1) * (v2 - v3)) - ((p2 - p3) * (p2 - p3) * (v2 - v1))) / (((p2 - p1) * (v2 - v3)) - ((p2 - p3) * (v2 - v1)))))