def dewp(temp,relh): if temp>=0: a=17.62 b=243.12 else: a=22.46 b=272.62 gamma=math.log(relh/100)+(a*temp)/(b+temp) dewp=(b*gamma)/(a-gamma) return dewp