Title: | Calculate Water Vapor Measures from Temperature and Dew Point |
---|---|
Description: | Vapor pressure, relative humidity, absolute humidity, specific humidity, and mixing ratio are commonly used water vapor measures in meteorology. This R package provides functions for calculating saturation vapor pressure (hPa), partial water vapor pressure (Pa), relative humidity (%), absolute humidity (kg/m^3), specific humidity (kg/kg), and mixing ratio (kg/kg) from temperature (K) and dew point (K). Conversion functions between humidity measures are also provided. |
Authors: | Jun Cai [aut, cre] |
Maintainer: | Jun Cai <[email protected]> |
License: | GPL-3 |
Version: | 0.1.5 |
Built: | 2024-11-19 04:55:26 UTC |
Source: | https://github.com/caijun/humidity |
calculate absolute humidity based on partial water vapor pressure
at temperature
AH(e, t, isK = TRUE)
AH(e, t, isK = TRUE)
e |
partial water vapor pressure in Pascal (Pa) |
t |
temperature in Kelvin (K) or in degree Celsius (°C) |
isK |
logical indicator whether temperature is in Kelvin (K). The default value is TRUE. |
numeric absolute humidity (
)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
t <- 273.15 Es <- SVP(t) e <- WVP2(70, Es) AH(e, t)
t <- 273.15 Es <- SVP(t) e <- WVP2(70, Es) AH(e, t)
convert temperature in degree Celsius (°C) into Kelvin (K)
C2K(C)
C2K(C)
C |
temperature in degree Celsius (°C) |
numeric temperature in Kelvin (K)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
K2C
.
T0 # absolute zero in Kelvin (K) C2K(T0)
T0 # absolute zero in Kelvin (K) C2K(T0)
is the saturation vapor pressure at the absolute zero
.
Es.T0
Es.T0
An object of class numeric
of length 1.
A dataset containing airborne virus particles of influenza A for viable survival in the dark at controlled temperature and relative humidity for 1 hour after spraying.
ivs
ivs
A data frame with 11 rows and 3 variables:
T: temperature in degree Celsius (7.5–32.0)
RH: relative humidity in percentage (20–82)
PV: percentage of viable virus (6.6–78.0)
Harper, G. J. (1961). Airborne micro-organisms: survival tests with four viruses. Journal of Hygiene, 59(04), 479-486.
A dataset containing aerosol transmission efficiency of influenza A virus from four infected guinea pigs to four exposed guinea pigs under conditions of controlled temperature and relative humidity.
ivt
ivt
A data frame with 24 rows and 4 variables:
T: temperature in degree Celsius (5–30)
RH: relative humidity in percentage (20–80)
PT: transmission efficiency in percentage (0–100)
source: data source
Lowen, A. C., Mubareka, S., Steel, J., & Palese, P. (2007). Influenza virus transmission is dependent on relative humidity and temperature. PLoS pathogens, 3(10), e151.
Lowen, A. C., Steel, J., Mubareka, S., & Palese, P. (2008). High temperature (30℃) blocks aerosol but not contact transmission of influenza virus. Journal of virology, 82(11), 5650-5652.
convert temperature in Kelvin (K) into degree Celsius (°C)
K2C(K)
K2C(K)
K |
temperature in Kelvin (K) |
numeric temperature in degree Celsius (°C)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
C2K
.
K2C(0)
K2C(0)
Latent heat of water vapor
L
L
An object of class numeric
of length 1.
Molecular weight of dry air
Md
Md
An object of class numeric
of length 1.
calculate mixing ratio based on specific humidity
MR(q)
MR(q)
q |
specific humidity |
numeric mixing ratio (
)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
SH
.
t <- 273.15 Es <- SVP(t) e <- WVP2(70, Es) q <- SH(e, p = 101325) MR(q)
t <- 273.15 Es <- SVP(t) e <- WVP2(70, Es) q <- SH(e, p = 101325) MR(q)
Molecular weight of water vapor
Mw
Mw
An object of class numeric
of length 1.
calculate relative humidity based on temperature
and dew point
RH(t, Td, isK = TRUE)
RH(t, Td, isK = TRUE)
t |
temperature in Kelvin (K) or in degree Celsius (°C) |
Td |
dew point in Kelvin (K) or in degree Celsius (°C) |
isK |
logical indicator whether temperature is in Kelvin (K). The default value is TRUE. |
numeric relative humidity in
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
RH(30, 15, isK = FALSE)
RH(30, 15, isK = FALSE)
Specific gas constant of water vapor , where
is the molar gas constant and
is the molecular weight of water vapor.
Rw
Rw
An object of class numeric
of length 1.
calculate specific humidity based on partial water vapor pressure
under given atmospheric pressure
SH(e, p = 101325)
SH(e, p = 101325)
e |
partial water vapor pressure in Pascal (Pa) |
p |
atmospheric pressure in Pascal (Pa). The default is standard atmospheric pressure of 101325Pa. |
numeric specific humidity (
)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
t <- 273.15 Es <- SVP(t) e <- WVP2(70, Es) SH(e, p = 101325)
t <- 273.15 Es <- SVP(t) e <- WVP2(70, Es) SH(e, p = 101325)
Climate models usually provide specific humidity only; however, relative humidity is used to compute heat index that is really useful for health impacts studies. This function converts specific humidity into relative humidity
at temperature
and under atmospheric pressure
.
SH2RH(q, t, p = 101325, isK = TRUE)
SH2RH(q, t, p = 101325, isK = TRUE)
q |
specific humidity |
t |
temperature in Kelvin (K) or in degree Celsius (°C) |
p |
atmospheric pressure in Pascal (Pa). The default is standard atmospheric pressure of 101325Pa. |
isK |
logical indicator whether temperature is in Kelvin (K). The default value is TRUE. |
numeric relative humidity in
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
SH2RH(0.005867353, 22.25, p = 101325, isK = FALSE)
SH2RH(0.005867353, 22.25, p = 101325, isK = FALSE)
calculate saturation vapor pressure at temperature
, using the Clausius-Clapeyron equation or the Murray equation.
SVP(t, isK = TRUE, formula = c("Clausius-Clapeyron", "Murray"))
SVP(t, isK = TRUE, formula = c("Clausius-Clapeyron", "Murray"))
t |
temperature in Kelvin (K) or in degree Celsius (°C) |
isK |
logical indicator whether temperature is in Kelvin (K). The default value is TRUE. |
formula |
the formula is used for calculating saturation vapor pressure. By default the Clausius-Clapeyron equation is used. |
numeric saturation vapor pressure in hectopascal (hPa) or millibar (mb)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
SVP(273.15)
SVP(273.15)
calculate saturation vapor pressure at temperature
, using the Clausius-Clapeyron equation.
SVP.ClaCla(t)
SVP.ClaCla(t)
t |
temperature in Kelvin (K) |
numeric saturation vapor pressure in hectopascal (hPa) or millibar (mb)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
Shaman, J., & Kohn, M. (2009). Absolute humidity modulates influenza survival, transmission, and seasonality. Proceedings of the National Academy of Sciences, 106(9), 3243-3248.
Wallace, J. M., & Hobbs, P. V. (2006). Atmospheric science: an introductory survey (Vol. 92). Academic press.
T0 # absolute zero in Kelvin (K) SVP.ClaCla(T0)
T0 # absolute zero in Kelvin (K) SVP.ClaCla(T0)
calculate saturation vapor pressure at temperature
, per the equation proposed by Murray (1967).
SVP.Murray(t)
SVP.Murray(t)
t |
temperature in Kelvin (K) |
numeric saturation vapor pressure in hectopascal (hPa) or millibar (mb)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
Murray, F. W. (1967). On the Computation of Saturation Vapor Pressure. Journal of Applied Meteorology, 6(1), 203-204.
T0 # absolute zero in Kelvin (K) SVP.Murray(T0)
T0 # absolute zero in Kelvin (K) SVP.Murray(T0)
Absolute zero in Kelvin (K)
T0
T0
An object of class numeric
of length 1.
calculate partial water vapor pressure based on dew point
WVP1(Td, isK = TRUE)
WVP1(Td, isK = TRUE)
Td |
dew point in Kelvin (K) or in degree Celsius (°C) |
isK |
logical indicator whether temperature is in Kelvin (K). The default value is TRUE. |
numeric partial vapor pressure in hectopascal (hPa) or millibar (mb)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
T0 # absolute zero in Kelvin (K) WVP1(T0)
T0 # absolute zero in Kelvin (K) WVP1(T0)
calculate partial water vapor pressure based on relative humdity
and saturation water vapor pressure at temperature
WVP2(psi, Es)
WVP2(psi, Es)
psi |
relative humidity |
Es |
saturation vapor pressure |
numeric partial water vapor pressure in Pascal (Pa)
Jun Cai ([email protected]), PhD candidate from Department of Earth System Science, Tsinghua University
Es <- SVP(273.15) WVP2(70, Es)
Es <- SVP(273.15) WVP2(70, Es)