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