Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add heat_index calculation examples #3302

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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