atmospheric_lidar/systems/ciao.py

Thu, 14 Dec 2017 22:47:33 +0200

author
Iannis <i.binietoglou@impworks.gr>
date
Thu, 14 Dec 2017 22:47:33 +0200
changeset 108
b5a0a2d2ce81
parent 91
f9d9d3ea8edb
permissions
-rwxr-xr-x

Adding files to be used for diva format development. Nothing working yet.

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