Weather.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:astk 作者: openalea-incubator 项目源码 文件源码
def __init__(self, data_file='', reader=septo3d_reader, wind_screen=2,
                 temperature_screen=2,
                 localisation={'city': 'Montpellier', 'latitude': 43.61,
                               'longitude': 3.87},
                 timezone='UTC'):
        self.data_path = data_file
        self.models = {'global_radiation': PPFD_to_global,
                       'vapor_pressure': humidity_to_vapor_pressure,
                       'PPFD': global_to_PPFD,
                       'degree_days': linear_degree_days}

        self.timezone = pytz.timezone(timezone)
        if data_file is '':
            self.data = None
        else:
            self.data = reader(data_file)
            date = self.data['date']
            date = map(lambda x: self.timezone.localize(x), date)
            utc = map(lambda x: x.astimezone(pytz.utc), date)
            self.data.index = utc
            self.data.index.name = 'date_utc'

        self.wind_screen = wind_screen
        self.temperature_screen = temperature_screen
        self.localisation = localisation
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号