气象变量计算函数。
meteocalc的Python项目详细描述
气象警报
气象变量计算的几个函数。
计算是基于公开可用的公式实现的。
实施计算:
- 露点是露水形成的温度。
- heat index是一个结合了空气温度和相对温度的指数 试图确定人类感知当量的湿度 温度。
- 风寒是由于 低温空气通过流量。
- 感觉温度或者表观温度就是温度 由空气的综合作用而引起的人类感知到的等效物 温度、相对湿度和风速。
此外,temp类可用于在摄氏度之间转换温度, 华氏度和开尔文。它也可以与浮点数混合用于基本数学 操作。
要求
- python 2.7或3.2+
安装
$ pip install meteocalc
使用量
- 。注意:
- 可以以不同的单位提供任何输入温度值: Temp(20, 'c') # c - celsius, f - fahrenheit, k - kelvin
frommeteocalcimportTemp,dew_point,heat_index,wind_chill,feels_like# create input temperature in different unitst=Temp(20,'c')# c - celsius, f - fahrenheit, k - kelvint2=Temp(60,'f')# calculate Dew Pointdp=dew_point(temperature=t,humidity=56)# calculate Heat Indexhi=heat_index(temperature=t2,humidity=42)print('Dew Point in celsius:',dp.c)print('Dew Point in fahrenheit:',dp.f)print('Heat Index in kelvin:',hi.k)# calculate Wind Chillwc=wind_chill(temperature=15,wind_speed=25)print('Wind Chill in fahrenheit:',wc.f)# calculate Feels Like temperaturefl=feels_like(temperature=40,humidity=40,wind_speed=5)print('Feels Like in fahrenheit:',fl.f)
历史记录
V 1.1.0-2019年4月30日
添加:
- 风寒,感觉像温度(感谢@curryhurst)
V 1.0.0-2016年4月3日
添加:
- 第一个版本