Learn R Programming

heatindex (version 0.0.2)

rh_from_wetbulb: Relative humidity from wet-bulb temperature

Description

rh_from_wetbulb calculates the relative humidity from the thermodynamic (or psychrometric) wet-bulb (or ice-bulb) temperature using the Rankine-Kirchhoff approximations.

Usage

rh_from_wetbulb(
  p,
  T,
  Tw,
  psychrometric = FALSE,
  icebulb = FALSE,
  verbose = TRUE,
  lewis = 0.85
)

Value

Relative humidity in the same shape as p, T, and Tw. The relative humidity is reported with respect to liquid water if T is greater than or equal to 273.16 K and with respect to ice if T is less than 273.16 K.

Arguments

p

The total air pressuire in Pa. This can be a single number, a vector, a matrix, or an array.

T

The absolute air temperature in Kelvin. This can be a single number, a vector, a matrix, or an array.

Tw

The thermodynamic (or psychrometric) wet-bulb (or ice-bulb) temperature in Kelving. This can be a single number, a vector, a matrix, or an array.

psychrometric

A logical indicating whether to interpret Tw as the psychrometric (if TRUE) or thermodynamic (if FALSE) version. Default is FALSE.

icebulb

A logical indicating whether to interpret Tw as the ice-bulb (if TRUE) or wet-bulb (if FALSE) version. Default is FALSE.

verbose

A logical indicating whether or not to print warning messages. Default is TRUE.

lewis

The Lewis number for moist air. Default is 0.85.

Author

David M. Romps romps@berkeley.edu

References

Romps, D. M. (2025). Wet-bulb temperature from pressure, relative humidity, and air temperature. In review.

Examples

Run this code
rh_from_wetbulb(1e5,300,290)
rh_from_wetbulb(1e5,301:310,290)
rh_from_wetbulb(1e5,301:310,291:300)
rh_from_wetbulb(1:10*1e4,301:310,291:300)

Run the code above in your browser using DataLab