饱和水汽压:
按照精度需求,选取修正后Tetens公式
这里还有个公式,但是时间太久远了,想起来再放
function[rh]=SHUM2RH(temp,pres,qs)
% temp:unit(℃) pres:Pa q:kg/kg
% coefficient
coe(1:4,1)=[6.112,17.67,243.5,0.622]; %这个系数可以改的
% Saturated vapor pressure
[n2,~,~,~]=size(temp);
for i=1:n2
E = coe(1,1).*exp(coe(2,1).*temp(i,:)/(coe(3,1)+temp(i,:)));
es=pres(i,:).*qs(i,:)./coe(4);
rh(i,:)=es./E.*10000;
end