ciao.py

changeset 36
a281a26f4626
parent 35
b1146c96f727
child 37
7c76fdbdf1a3
equal deleted inserted replaced
35:b1146c96f727 36:a281a26f4626
1 import milos
2
3 class CiaoMixin:
4
5 def get_PT(self):
6 ''' Gets the pressure and temperature at station level from the Milos station.
7 The results are stored in the info dictionary.
8 '''
9
10 start_time = self.info['start_time']
11 stop_time = self.info['stop_time']
12 dt = stop_time - start_time
13 mean_time = start_time + dt/2
14
15 # this guarantees that more that half the measurement period is taken into account
16 atm = milos.Atmospheric_condition(mean_time)
17 temperature = atm.get_mean('Air_Temperature', start_time, stop_time)
18 pressure = atm.get_mean('Air_Pressure', start_time, stop_time)
19 self.info['Temperature'] = temperature
20 self.info['Pressure'] = pressure

mercurial