Understanding the mixing ratio and specific humidity calculator — concept and principle
Relative humidity tells you how close air is to saturation, but not how much water vapour it actually holds. Mixing ratio and specific humidity do: they give grams of water vapour per kilogram of air. This calculator also gives the virtual temperature, used to account for the fact that moist air is lighter than dry air.
How it is calculated
- Saturation vapour pressure (Magnus formula): e_s = 6.112 × exp(17.62 T / (243.12 + T)) hPa, with T in °C.
- Actual vapour pressure: e = (RH / 100) × e_s.
- Mixing ratio: w = 622 × e / (p − e) g/kg, where 622 comes from 0.622 (the ratio of the molar masses of water and dry air) × 1,000.
- Specific humidity: q = 622 × e / (p − 0.378 e) g/kg.
- Virtual temperature: T_v = T_K × (1 + 0.61 w), with w in kg/kg and T_K in kelvin, then converted back to °C.
The principle
By Dalton's law, the total pressure p is the sum of the dry-air pressure p − e and the vapour pressure e. In the ideal-gas law, the mass of each gas in a given volume is proportional to its partial pressure times its molar mass. Dividing the vapour mass by the dry-air mass gives w = ε e / (p − e), with ε = 18.015/28.96 ≈ 0.622. Specific humidity divides by the total mass instead, which leads to the p − 0.378e form. Because a water molecule is lighter than an average air molecule, adding vapour lowers the density; T_v is the temperature dry air would need to have the same density.
Worked example
- Inputs: T = 25 °C, RH = 70%, p = 1013.25 hPa.
- e_s = 6.112 × exp(17.62 × 25 / 268.12) = 31.6006 hPa.
- e = 0.70 × 31.6006 = 22.1204 hPa.
- w = 622 × 22.1204 / (1013.25 − 22.1204) = 13.88202692 g/kg.
- q = 622 × 22.1204 / (1013.25 − 0.378 × 22.1204) = 13.69195484 g/kg.
- T_v = 298.15 × (1 + 0.61 × 0.0138820) − 273.15 = 27.52474506 °C, about 2.5 °C above the actual temperature.
| Temperature (°C) | Mixing ratio (g/kg) |
|---|---|
| 6.25 | 4.111558983 |
| 12.5 | 6.279412211 |
| 18.8 | 9.414228547 |
| 25 | 13.88202692 |
| 31.2 | 20.17391201 |
| 37.5 | 28.9539731 |
| 50 | 57.99401511 |
How to read the result
Mixing ratios near the surface range from below 1 g/kg in very cold, dry air to around 20 g/kg in humid tropical air. Around 14 g/kg, as here, feels muggy. Because w is conserved in unsaturated vertical motion, it is the quantity meteorologists use to track air masses.
Common mistakes
- Comparing relative humidities at different temperatures; the same RH holds much more water in warm air.
- Mixing up mixing ratio (per kg of dry air) and specific humidity (per kg of moist air).
- Using T_v as the real air temperature; it is a density-equivalent temperature only.
Frequently asked questions
What is a typical dew point for 14 g/kg?
At sea-level pressure, about 19 °C, consistent with 25 °C and 70% relative humidity.
Why does pressure matter?
The same vapour pressure is a larger share of the total at lower pressure, so the same e gives a higher mixing ratio at altitude.
Sources: World Meteorological Organization, Guide to Instruments and Methods of Observation (WMO-No. 8) · J. M. Wallace and P. V. Hobbs, Atmospheric Science: An Introductory Survey, Academic Press