Skip to content

Commit

Permalink
Merge pull request #3302 from palewire/patch-1
Browse files Browse the repository at this point in the history
Add heat_index calculation examples
  • Loading branch information
dopplershift committed Dec 4, 2023
2 parents 09d5fe2 + 29bf180 commit 338e4e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/metpy/calc/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ def heat_index(temperature, relative_humidity, mask_undefined=True):
A flag indicating whether a masked array should be returned with
values masked where the temperature < 80F. Defaults to `True`.
Examples
--------
>>> from metpy.calc import heat_index
>>> from metpy.units import units
>>> heat_index(30 * units.degC, 90 * units.percent)
<Quantity([105.3943646], 'degree_Fahrenheit')>
>>> heat_index(90 * units.degF, 90 * units.percent)
<Quantity([121.901204], 'degree_Fahrenheit')>
>>> heat_index(60 * units.degF, 90 * units.percent)
<Quantity([--], 'degree_Fahrenheit')>
>>> heat_index(60 * units.degF, 90 * units.percent, mask_undefined=False)
<Quantity([59.93], 'degree_Fahrenheit')>
.. versionchanged:: 1.0
Renamed ``rh`` parameter to ``relative_humidity``
Expand Down

0 comments on commit 338e4e6

Please sign in to comment.