Skip to content

Commit

Permalink
Merge pull request #1869 from dopplershift/heat-index-units
Browse files Browse the repository at this point in the history
BUG: Fix unit-handling in heat_index (Fixes #1867)
  • Loading branch information
dcamron committed May 12, 2021
2 parents 1ef746e + bebfa19 commit 25f9fbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/metpy/calc/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ def heat_index(temperature, relative_humidity, mask_undefined=True):
rh15adj = ((13. - relative_humidity[sel] * 100.) / 4.
* np.sqrt((units.Quantity(17., 'delta_degF')
- np.abs(delta[sel] - units.Quantity(95., 'delta_degF')))
/ units.Quantity(17., 'delta_degF')))
hi[sel] = hi[sel] - units.Quantity(rh15adj, 'delta_degF')
/ units.Quantity(17., '1/delta_degF')))
hi[sel] = hi[sel] - rh15adj

# Adjustment for RH > 85% and 80F <= T <= 87F
sel = ((relative_humidity > units.Quantity(85., 'percent'))
Expand Down

0 comments on commit 25f9fbe

Please sign in to comment.