Mon, 22 Feb 2016 16:44:55 +0200
Adding new files.
ioannis@22 | 1 | import radiometer |
ioannis@22 | 2 | |
ioannis@22 | 3 | from licel import LicelLidarMeasurement |
ioannis@22 | 4 | |
ioannis@22 | 5 | import rali_netcdf_parameters |
ioannis@20 | 6 | |
ioannis@22 | 7 | class RaliLidarMeasurement(LicelLidarMeasurement): |
ioannis@22 | 8 | extra_netcdf_parameters = rali_netcdf_parameters |
ioannis@22 | 9 | |
ioannis@22 | 10 | def get_PT(self): |
ioannis@22 | 11 | ''' Gets the pressure and temperature from Radiometer data. |
ioannis@22 | 12 | If no data file is found, mean values from past measurements are |
ioannis@22 | 13 | used. |
ioannis@22 | 14 | ''' |
ioannis@22 | 15 | |
ioannis@22 | 16 | start_time = self.info['start_time'] |
ioannis@22 | 17 | stop_time = self.info['stop_time'] |
ioannis@22 | 18 | dt = stop_time - start_time |
ioannis@22 | 19 | mean_time = start_time + dt/2 |
ioannis@22 | 20 | |
ioannis@22 | 21 | meteo_triplet = radiometer.get_mean_PT(mean_time) |
ioannis@22 | 22 | |
ioannis@22 | 23 | if meteo_triplet: |
ioannis@22 | 24 | pressure, temperature, humidity = meteo_triplet |
ioannis@22 | 25 | else: |
ioannis@22 | 26 | print "Radiometer meteo data not available. Using past values." |
ioannis@22 | 27 | pressure = radiometer.P_mean[mean_time.month - 1, mean_time.hour] |
ioannis@22 | 28 | temperature = radiometer.T_mean[mean_time.month - 1, mean_time.hour] |
ioannis@22 | 29 | |
ioannis@22 | 30 | self.info['Temperature'] = temperature - 273.15 |
ioannis@22 | 31 | self.info['Pressure'] = pressure |
ioannis@20 | 32 | |
ioannis@22 | 33 |