@@ -82,6 +82,7 DATA_STRUCTURE = numpy.dtype([ | |||||
82 | ('sea_algorithm', '<u4') |
|
82 | ('sea_algorithm', '<u4') | |
83 | ]) |
|
83 | ]) | |
84 |
|
84 | |||
|
85 | ||||
85 | class BLTRParamReader(JRODataReader, ProcessingUnit): |
|
86 | class BLTRParamReader(JRODataReader, ProcessingUnit): | |
86 | ''' |
|
87 | ''' | |
87 | Boundary Layer and Tropospheric Radar (BLTR) reader, Wind velocities and SNR from *.sswma files |
|
88 | Boundary Layer and Tropospheric Radar (BLTR) reader, Wind velocities and SNR from *.sswma files | |
@@ -107,8 +108,7 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
107 | startTime=datetime.time(0, 0, 0), |
|
108 | startTime=datetime.time(0, 0, 0), | |
108 | endTime=datetime.time(23, 59, 59), |
|
109 | endTime=datetime.time(23, 59, 59), | |
109 | timezone=0, |
|
110 | timezone=0, | |
110 | status_value=0, |
|
111 | status_value=0, **kwargs): | |
111 | **kwargs): |
|
|||
112 |
|
112 | |||
113 | self.path = path |
|
113 | self.path = path | |
114 | self.startTime = startTime |
|
114 | self.startTime = startTime | |
@@ -126,7 +126,8 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
126 | self.fileIndex = 0 |
|
126 | self.fileIndex = 0 | |
127 |
|
127 | |||
128 | if not self.fileList: |
|
128 | if not self.fileList: | |
129 |
raise |
|
129 | raise Warning, "There is no files matching these date in the folder: %s. \n Check 'startDate' and 'endDate' " % ( | |
|
130 | path) | |||
130 |
|
131 | |||
131 | self.setNextFile() |
|
132 | self.setNextFile() | |
132 |
|
133 | |||
@@ -189,7 +190,8 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
189 | filename = os.path.join(self.path, self.fileList[file_id]) |
|
190 | filename = os.path.join(self.path, self.fileList[file_id]) | |
190 |
|
191 | |||
191 | dirname, name = os.path.split(filename) |
|
192 | dirname, name = os.path.split(filename) | |
192 |
|
|
193 | # 'peru2' ---> Piura - 'peru1' ---> Huancayo or Porcuya | |
|
194 | self.siteFile = name.split('.')[0] | |||
193 | if self.filename is not None: |
|
195 | if self.filename is not None: | |
194 | self.fp.close() |
|
196 | self.fp.close() | |
195 | self.filename = filename |
|
197 | self.filename = filename | |
@@ -304,7 +306,8 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
304 | data = numpy.fromfile(self.fp, data_structure, self.nranges) |
|
306 | data = numpy.fromfile(self.fp, data_structure, self.nranges) | |
305 |
|
307 | |||
306 | height = data['range'] |
|
308 | height = data['range'] | |
307 | winds = numpy.array((data['zonal'], data['meridional'], data['vertical'])) |
|
309 | winds = numpy.array( | |
|
310 | (data['zonal'], data['meridional'], data['vertical'])) | |||
308 | snr = data['rx_snr'].T |
|
311 | snr = data['rx_snr'].T | |
309 |
|
312 | |||
310 |
winds[numpy.where(winds == -9999.)] = numpy.nan |
|
313 | winds[numpy.where(winds == -9999.)] = numpy.nan |
General Comments 0
You need to be logged in to leave comments.
Login now