binietoglou@0: import milos binietoglou@0: binietoglou@0: class CiaoMixin: binietoglou@0: binietoglou@0: def get_PT(self): binietoglou@0: ''' Gets the pressure and temperature at station level from the Milos station. binietoglou@0: The results are stored in the info dictionary. binietoglou@0: ''' binietoglou@0: binietoglou@0: start_time = self.info['start_time'] binietoglou@0: stop_time = self.info['stop_time'] binietoglou@0: dt = stop_time - start_time binietoglou@0: mean_time = start_time + dt/2 binietoglou@0: binietoglou@0: # this guarantees that more that half the measurement period is taken into account binietoglou@0: atm = milos.Atmospheric_condition(mean_time) binietoglou@0: temperature = atm.get_mean('Air_Temperature', start_time, stop_time) binietoglou@0: pressure = atm.get_mean('Air_Pressure', start_time, stop_time) binietoglou@0: self.info['Temperature'] = temperature binietoglou@0: self.info['Pressure'] = pressure