Skip to content

Commit

Permalink
Add heat_index calculation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire authored Dec 4, 2023
1 parent 09d5fe2 commit 29bf180
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 29bf180

Please sign in to comment.