powered by
This function calculates the specific humidity from a given relative humidity.
rh2shum(P, Temp, rh, consts = export_constants())
A vector with pressure values (Pa).
A vector with temperature values (Kelvin).
A vector with relative humidity values (%).
The constants defined in aiRthermoConstants data are necessary.
This function returns a vector with specific humidity (kg/kg).
rh2shum
# NOT RUN { 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) # }
Run the code above in your browser using DataLab