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
评论列表
文章目录