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 |
|