rh2shum {aiRthermo}R Documentation

Specific Humidity from relative humidity

Description

This function calculates the specific humidity from a given relative humidity.

Usage

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

Arguments

P

A vector with pressure values (Pa).

Temp

A vector with temperature values (Kelvin).

rh

A vector with relative humidity values (%).

consts

The constants defined in aiRthermoConstants data are necessary.

Value

This function returns a vector with specific humidity (kg/kg).

See Also

rh2shum

Examples

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

[Package aiRthermo version 1.2.1 Index]