dewpoint.to.humidity {weathermetrics} | R Documentation |
Calculate relative humidity.
Description
dewpoint.to.humidity
creates a numeric vector of relative humidity
from numerical vectors of air temperature and dew point temperature.
Usage
dewpoint.to.humidity(dp = NA, t = NA, temperature.metric = "fahrenheit")
Arguments
dp |
Numeric vector of dew point temperatures. |
t |
Numeric vector of air temperatures. |
temperature.metric |
Character string indicating the temperature
metric of air temperature and dew point temperature. Possible values
are |
Details
Dew point temperature and temperature must be in the same
metric (i.e., either both in Celsius or both in Fahrenheit). If
necessary, use convert_temperature
to convert before
using this function.
Value
A numeric vector of relative humidity (in %)
Note
Equations are from the source code for the US National Weather Service's online heat index calculator.
Author(s)
Brooke Anderson brooke.anderson@colostate.edu, Roger Peng rdpeng@gmail.com
References
National Weather Service Hydrometeorological Prediction Center Web Team. Heat Index Calculator. 30 Jan 2015. http://www.wpc.ncep.noaa.gov/html/heatindex.shtml. Accessed 18 Dec 2015.
See Also
humidity.to.dewpoint,
fahrenheit.to.celsius,
celsius.to.fahrenheit
,
convert_temperature
Examples
# Calculate relative humidity from air temperature and
# dew point temperature.
data(lyon)
lyon$RH <- dewpoint.to.humidity(t = lyon$TemperatureC,
dp = lyon$DewpointC,
temperature.metric = 'celsius')
lyon