我试图使一个天气模拟器使用文章互动中尺度模拟天空景观。它给出了计算平均静态能量的公式:
$$MSE_i = C_p \cdot T_i + g \cdot \Theta_i + L_v \cdot Q_i$$
但我不明白如何计算比湿度,文章说它可以用绝对湿度($H_i$)和离地高度($\Theta_i$)来计算(引用:$Q_i$为空气层的比湿度(可由$H_i$和$\Theta_i$导出)。有没有计算比湿度的公式,还是我漏了什么?
更新1。< / p >
So I have implemented a function to calculate specific humidity in python. Here AH is the absolute humidity in $g/m^3$, p is the pressure in pascals at the calculation point and t is temperature in Celsius.
def get_specific_humidity(AH, t, p): e = (AH / 1000) * 461.5 * (t + 273.15) r = (0.622 * e) / (p - e) return r / (1 + r)
First I calculated the vapor pressure e using the formula: $$\frac{m}{V} = \frac{e}{R_vT}$$ The calculation assumes that the dry air is evenly mixed with water. Also $R_v=461.5$ is specific gas constant for water vapor. Next, I calculated the mixing ratio using this equation:
$$r=\frac{0.622e}{p-e}$$
And finally using the mixing ratio it is possible to calculate the specific humidity: $$q=\frac{r}{1+r}$$
Did I do everything right?
比湿度是水蒸气的质量与空气块总质量的比值。绝对湿度是水蒸气的质量与空气的体积之比。要将两者联系起来,你只需要空气密度,你可以通过假设一些标准大气,从地面的高度估算出空气密度。< / p >
So, you can not, without further assumptions calculate the specific humidity by using absolute humidity and height above ground, but you can get a fair estimate using some standard assumption.