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

minor stuff

parent 0a714ede
No related branches found
No related tags found
No related merge requests found
......@@ -973,6 +973,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
History:
10/2012 - Steve Wanzong - Created in Fortran
10/2013 - Sharon Nebuda - rewritten for python
10/2021 - Tom Rink - adapted from previous version to leverage more of NumPy
"""
undef = -9999.0
......@@ -1001,7 +1002,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
print('AMV location lat,lon,prs ({0},{1},{2}) failed to find fcst prs around AMV'.format(amv_lat, amv_lon, amv_prs))
return bf_data
# Diagnostic field: Find the model minimum speed and maximum speed within PressDiff of the AMV.
# Diagnostic field: Find the forecast/model minimum speed and maximum speed within PressDiff of the AMV.
if verbose:
SatwindMinSpeed = min(fcst_spd[kk])
SatwindMaxSpeed = max(fcst_spd[kk])
......@@ -1013,7 +1014,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
fcst_uwind = -fcst_spd * np.sin(dr*fcst_dir)
fcst_vwind = -fcst_spd * np.cos(dr*fcst_dir)
# Calculate the vector difference between the AMV and model background at all levels.
# Calculate the vector difference between the AMV and forecast/model background at all levels.
VecDiff = np.sqrt((amv_uwind - fcst_uwind) ** 2 + (amv_vwind - fcst_vwind) ** 2)
# Find the model level of best-fit pressure, from the minimum vector difference.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment