Type: | Package |
Title: | Calculate Water Vapor Measures from Temperature and Dew Point |
Version: | 0.1.5 |
Date: | 2019-11-10 |
Maintainer: | Jun Cai <cai-j12@mails.tsinghua.edu.cn> |
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. |
Depends: | R (≥ 2.10) |
Suggests: | dplyr, knitr |
License: | GPL-3 |
URL: | https://github.com/caijun/humidity |
BugReports: | https://github.com/caijun/humidity/issues |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.1.1 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2019-11-10 07:07:02 UTC; tonytsai |
Author: | Jun Cai |
Repository: | CRAN |
Date/Publication: | 2019-11-10 07:20:03 UTC |
calculate absolute humidity
Description
calculate absolute humidity \rho_w
based on partial water vapor pressure e
at temperature t
Usage
AH(e, t, isK = TRUE)
Arguments
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. |
Value
numeric absolute humidity \rho_w
(kg/m^3
)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
t <- 273.15
Es <- SVP(t)
e <- WVP2(70, Es)
AH(e, t)
Celsius to Kelvin conversion
Description
convert temperature in degree Celsius (°C) into Kelvin (K)
Usage
C2K(C)
Arguments
C |
temperature in degree Celsius (°C) |
Value
numeric temperature in Kelvin (K)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
K2C
.
Examples
T0 # absolute zero in Kelvin (K)
C2K(T0)
Saturation vapor pressure at absolute zero (hPa)
Description
e_s(T_0) = 6.11hPa
is the saturation vapor pressure at the absolute zero T_0 = 273.15K
.
Usage
Es.T0
Format
An object of class numeric
of length 1.
See Also
Kelvin to Celsius conversion
Description
convert temperature in Kelvin (K) into degree Celsius (°C)
Usage
K2C(K)
Arguments
K |
temperature in Kelvin (K) |
Value
numeric temperature in degree Celsius (°C)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
C2K
.
Examples
K2C(0)
Latent heat of water vapor
Description
Latent heat of water vapor L = 2.5 \times 10^6J/kg
Usage
L
Format
An object of class numeric
of length 1.
calculate mixing ratio
Description
calculate mixing ratio \omega
based on specific humidity q
Usage
MR(q)
Arguments
q |
specific humidity |
Value
numeric mixing ratio \omega
(kg/kg
)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
SH
.
Examples
t <- 273.15
Es <- SVP(t)
e <- WVP2(70, Es)
q <- SH(e, p = 101325)
MR(q)
Molecular weight of dry air
Description
Molecular weight of dry air M_d = 28.9634g/mol
Usage
Md
Format
An object of class numeric
of length 1.
See Also
Molecular weight of water vapor
Description
Molecular weight of water vapor M_w = 18.01528g/mol
Usage
Mw
Format
An object of class numeric
of length 1.
See Also
calculate relative humidity
Description
calculate relative humidity \psi
based on temperature t
and dew point T_d
Usage
RH(t, Td, isK = TRUE)
Arguments
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. |
Value
numeric relative humidity in
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
RH(30, 15, isK = FALSE)
Specific gas constant of water vapor
Description
Specific gas constant of water vapor R_w = \frac{1000R}{M_w} = 461.52J/(kgK)
, where R = 8.3144621J/(molK)
is the molar gas constant and M_w = 18.01528g/mol
is the molecular weight of water vapor.
Usage
Rw
Format
An object of class numeric
of length 1.
See Also
calculate specific humidity
Description
calculate specific humidity q
based on partial water vapor pressure e
under given atmospheric pressure p
Usage
SH(e, p = 101325)
Arguments
e |
partial water vapor pressure in Pascal (Pa) |
p |
atmospheric pressure in Pascal (Pa). The default is standard atmospheric pressure of 101325Pa. |
Value
numeric specific humidity q
(kg/kg
)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
t <- 273.15
Es <- SVP(t)
e <- WVP2(70, Es)
SH(e, p = 101325)
convert specific humidity into relative humidity
Description
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 q
into relative humidity \psi
at temperature t
and under atmospheric pressure q
.
Usage
SH2RH(q, t, p = 101325, isK = TRUE)
Arguments
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. |
Value
numeric relative humidity in
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
SH2RH(0.005867353, 22.25, p = 101325, isK = FALSE)
calculate saturation vapor pressure
Description
calculate saturation vapor pressure E_s
at temperature t
, using the Clausius-Clapeyron equation or the Murray equation.
Usage
SVP(t, isK = TRUE, formula = c("Clausius-Clapeyron", "Murray"))
Arguments
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. |
Value
numeric saturation vapor pressure in hectopascal (hPa) or millibar (mb)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
SVP(273.15)
calculate saturation vapor pressure using the Clausius-Clapeyron equation
Description
calculate saturation vapor pressure E_s
at temperature t
, using the Clausius-Clapeyron equation.
Usage
SVP.ClaCla(t)
Arguments
t |
temperature in Kelvin (K) |
Value
numeric saturation vapor pressure in hectopascal (hPa) or millibar (mb)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
References
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.
See Also
Examples
T0 # absolute zero in Kelvin (K)
SVP.ClaCla(T0)
calculate saturation vapor pressure using the Murray equation
Description
calculate saturation vapor pressure E_s
at temperature t
, per the equation proposed by Murray (1967).
Usage
SVP.Murray(t)
Arguments
t |
temperature in Kelvin (K) |
Value
numeric saturation vapor pressure in hectopascal (hPa) or millibar (mb)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
References
Murray, F. W. (1967). On the Computation of Saturation Vapor Pressure. Journal of Applied Meteorology, 6(1), 203-204.
See Also
Examples
T0 # absolute zero in Kelvin (K)
SVP.Murray(T0)
Absolute zero
Description
Absolute zero in Kelvin T_0
(K)
Usage
T0
Format
An object of class numeric
of length 1.
calculate partial water vapor pressure given dew point
Description
calculate partial water vapor pressure e
based on dew point T_d
Usage
WVP1(Td, isK = TRUE)
Arguments
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. |
Value
numeric partial vapor pressure in hectopascal (hPa) or millibar (mb)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
T0 # absolute zero in Kelvin (K)
WVP1(T0)
calculate partial water vapor pressure given relative humidity and saturation water vapor pressure
Description
calculate partial water vapor pressure e
based on relative humdity \psi
and saturation water vapor pressure at temperature t
Usage
WVP2(psi, Es)
Arguments
psi |
relative humidity |
Es |
saturation vapor pressure |
Value
numeric partial water vapor pressure in Pascal (Pa)
Author(s)
Jun Cai (cai-j12@mails.tsinghua.edu.cn), PhD candidate from Department of Earth System Science, Tsinghua University
See Also
Examples
Es <- SVP(273.15)
WVP2(70, Es)
Viability of influenza A virus for 1 hour after spraying
Description
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.
Usage
ivs
Format
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)
Source
Harper, G. J. (1961). Airborne micro-organisms: survival tests with four viruses. Journal of Hygiene, 59(04), 479-486.
Aerosol transmission efficiency of influenza A virus from guinea pigs to guinea pigs
Description
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.
Usage
ivt
Format
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
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.