Basic Calculations¶
metpy.calc.basic
¶
-
metpy.calc.basic.
get_speed_dir
(u, v)¶ Compute the wind speed and wind direction.
Parameters: - u (array_like) – Wind component in the X (East-West) direction
- v (array_like) – Wind component in the Y (North-South) direction
Returns: speed, direction – The speed and direction of the wind, respectively
Return type: tuple of array_like
See also
-
metpy.calc.basic.
get_wind_components
(speed, wdir)¶ Calculate the U, V wind vector components from the speed and direction.
Parameters: - speed (array_like) – The wind speed (magnitude)
- wdir (array_like) – The wind direction in degrees, specified as the direction from which the wind is blowing.
Returns: u, v – The wind components in the X (East-West) and Y (North-South) directions, respectively.
Return type: tuple of array_like
See also
-
metpy.calc.basic.
windchill
(temperature, speed, face_level_winds=False, mask_undefined=True)¶ Calculate the Wind Chill Temperature Index (WCTI) from the current temperature and wind speed.
Specifically, these formulas assume that wind speed is measured at 10m. If, instead, the speeds are measured at face level, the winds need to be multiplied by a factor of 1.5 (this can be done by specifying face_level_winds as True.)
Parameters: - temp (array_like) – The air temperature in degrees Celsius
- speed (array_like) – The wind speed at 10m. If instead the winds are at face level, face_level_winds should be set to True and the 1.5 multiplicative correction will be applied automatically. Wind speed should be given in units of meters per second.
Returns: The corresponding Wind Chill Temperature Index value(s)
Return type: array_like
Other Parameters: - face_level_winds (bool, optional) – A flag indicating whether the wind speeds were measured at facial level instead of 10m, thus requiring a correction. Defaults to False.
- mask_undefined (bool, optional) – A flag indicating whether a masked array should be returned with values where wind chill is undefined masked. These are values where the temperature > 50F or wind speed <= 3 miles per hour. Defaults to True.
See also
References
[4] http://www.ofcm.gov/jagti/r19-ti-plan/pdf/03_chap3.pdf
-
metpy.calc.basic.
heat_index
(temperature, rh, mask_undefined=True)¶ Calculate the Heat Index from the current temperature and relative humidity.
The implementation uses the formula outlined in [6].
Parameters: - temp (array_like) – Air temperature in degrees Celsuis
- rh (array_like) – The relative humidity expressed as an integer percentage.
- Returns (array_like) – The corresponding Heat Index value(s) in degrees Celsuis
Other Parameters: mask_undefined (bool, optional) – A flag indicating whether a masked array should be returned with values where heat index is undefined masked. These are values where the temperature < 80F or relative humidity < 40 percent. Defaults to True.
See also
References
[5] Steadman, R.G., 1979: The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. J. Appl. Meteor., 18, 861-873. [6] http://www.srh.noaa.gov/ffc/html/studies/ta_htindx.PDF