ciao.py

Sun, 23 Nov 2014 23:24:32 +0200

author
Iannis <ulalume3@yahoo.com>
date
Sun, 23 Nov 2014 23:24:32 +0200
changeset 27
74f7617f5356
parent 0
9d2b98ecf23d
permissions
-rw-r--r--

New plots for alex.

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

mercurial