rh2w {aiRthermo}R Documentation

Mixing Ratio from relative humidity

Description

This function gets the mixing ratio (kg/kg) from a given relative humidity (%), pressure (Pa) and temperature (K).

Usage

rh2w(P, Temp, rh, consts = export_constants())

Arguments

P

A vector with pressure values in Pa.

Temp

A vector with temperature values in Kelvin.

rh

A vector with relative humidity values in (%).

consts

The constants defined in aiRthermoConstants data are necessary.

Value

This function returns a vector with mixing ratio values (kg/kg).

See Also

saturation_mixing_ratio

Examples

data(RadiosondeD)
dPs<-RadiosondeD[,1]*100
dTs<-C2K(RadiosondeD[,3])
dws<-RadiosondeD[,6]/1000
dTds<-w2Td(dPs,dws)
rhs<-TTdP2rh(dTs,dTds,dPs)
wfromrh<-rh2w(dPs,dTs,rhs)

[Package aiRthermo version 1.2.1 Index]