powered by
This function gets the mixing ratio (kg/kg) from a given relative humidity (%), pressure (Pa) and temperature (K).
rh2w(P, Temp, rh, consts = export_constants())
A vector with pressure values in Pa.
A vector with temperature values in Kelvin.
A vector with relative humidity values in (%).
The constants defined in aiRthermoConstants data are necessary.
This function returns a vector with mixing ratio values (kg/kg).
saturation_mixing_ratio
# 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) wfromrh<-rh2w(dPs,dTs,rhs) # }
Run the code above in your browser using DataLab