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