ioannis@22: import radiometer ioannis@22: ioannis@22: from licel import LicelLidarMeasurement ioannis@22: ioannis@22: import rali_netcdf_parameters ioannis@20: ioannis@22: class RaliLidarMeasurement(LicelLidarMeasurement): ioannis@22: extra_netcdf_parameters = rali_netcdf_parameters ioannis@22: ioannis@22: def get_PT(self): ioannis@22: ''' Gets the pressure and temperature from Radiometer data. ioannis@22: If no data file is found, mean values from past measurements are ioannis@22: used. ioannis@22: ''' ioannis@22: ioannis@22: start_time = self.info['start_time'] ioannis@22: stop_time = self.info['stop_time'] ioannis@22: dt = stop_time - start_time ioannis@22: mean_time = start_time + dt/2 ioannis@22: ioannis@22: meteo_triplet = radiometer.get_mean_PT(mean_time) ioannis@22: ioannis@22: if meteo_triplet: ioannis@22: pressure, temperature, humidity = meteo_triplet ioannis@22: else: ioannis@22: print "Radiometer meteo data not available. Using past values." ioannis@22: pressure = radiometer.P_mean[mean_time.month - 1, mean_time.hour] ioannis@22: temperature = radiometer.T_mean[mean_time.month - 1, mean_time.hour] ioannis@22: ioannis@22: self.info['Temperature'] = temperature - 273.15 ioannis@22: self.info['Pressure'] = pressure ioannis@20: ioannis@22: