根据比湿计算相对湿度

从比湿 (specific humidity )计算相对湿度(RH):
公式(formula ):
E = 6.112 ∗ e 17.67 ∗ t / ( t + 243.5 ) E=6.112*e^{17.67*t/(t+243.5)} E=6.112e17.67t/(t+243.5)
q = 0.622 e / ( p − 0.378 e ) q=0.622e/(p-0.378e) q=0.622e/(p0.378e)
其中:
t:温度,单位为摄氏度deg C
p:水气压,单位为百帕,hpa或者mbar
q:比湿,单位为kg/kg
下面是calc_RH_from_Shum的R代码:

##' Convert specific humidity to relative humidity
##'
##' converting specific humidity into relative humidity
##' NCEP surface flux data does not have RH
##' from Bolton 1980 The computation of Equivalent Potential Temperature 
##' \url{http://www.eol.ucar.edu/projects/ceop/dm/documents/refdata_report/eqns.html}
##' @title qair2rh
##' @param qair specific humidity, dimensionless (e.g. kg/kg) ratio of water mass / total air mass
##' @param temp degrees C
##' @param press pressure in mb
##' @return rh relative humidity, ratio of actual water mixing ratio to saturation mixing ratio
##' @export
##' @author David LeBauer
qair2rh <- function(qair, temp, press = 1013.25){
    es <-  6.112 * exp((17.67 * temp)/(temp + 243.5))
    e <- qair * press / (0.378 * qair + 0.622)
    rh <- e / es
    return(rh)
}

引自:
How do I convert specific humidity to relative humidity?

你可能感兴趣的:(根据比湿计算相对湿度)