Function to calculate mixing ratio (g/kg) from temperature (°C) and relative humidity (%).
Mixing Ratio is the ratio of water vapour mass to the mass of dry gas.
Arguments
- Temp
Temperature (°Celsius)
- RH
Relative Humidity (0-100%)
- P_atm
Atmospheric pressure = 1013.25 (hPa)
- B
B = 621.9907 g/kg for air
- ...
Additional arguments to supply to
calcPws
Details
X Mixing ratio (mass of water vapour / mass of dry gas)
Pw = Pws(40°C) = 73.75 hPa
X = 621.9907 x 73.75 / (998 - 73.75) = 49.63 g/kg
Examples
calcMR(20, 50)
#> [1] 7.263496
head(mydata) |> dplyr::mutate(MixingRatio = calcMR(Temp, RH))
#> # A tibble: 6 × 6
#> Site Sensor Date Temp RH MixingRatio
#> <chr> <chr> <dttm> <dbl> <dbl> <dbl>
#> 1 London Room 1 2024-01-01 00:00:00 21.8 36.8 5.96
#> 2 London Room 1 2024-01-01 00:15:00 21.8 36.7 5.94
#> 3 London Room 1 2024-01-01 00:29:59 21.8 36.6 5.93
#> 4 London Room 1 2024-01-01 00:44:59 21.7 36.6 5.89
#> 5 London Room 1 2024-01-01 00:59:59 21.7 36.5 5.87
#> 6 London Room 1 2024-01-01 01:14:59 21.7 36.2 5.83