@@ -13,7 +13,7 import datetime | |||||
13 |
|
13 | |||
14 | import numpy |
|
14 | import numpy | |
15 |
|
15 | |||
16 | from schainpy.model.proc.jroproc_base import ProcessingUnit |
|
16 | from schainpy.model.proc.jroproc_base import ProcessingUnit, MPDecorator | |
17 | from schainpy.model.data.jrodata import Parameters |
|
17 | from schainpy.model.data.jrodata import Parameters | |
18 | from schainpy.model.io.jroIO_base import JRODataReader, isNumber |
|
18 | from schainpy.model.io.jroIO_base import JRODataReader, isNumber | |
19 | from schainpy.utils import log |
|
19 | from schainpy.utils import log | |
@@ -83,7 +83,7 DATA_STRUCTURE = numpy.dtype([ | |||||
83 | ('sea_algorithm', '<u4') |
|
83 | ('sea_algorithm', '<u4') | |
84 | ]) |
|
84 | ]) | |
85 |
|
85 | |||
86 |
|
86 | @MPDecorator | ||
87 | class BLTRParamReader(JRODataReader, ProcessingUnit): |
|
87 | class BLTRParamReader(JRODataReader, ProcessingUnit): | |
88 | ''' |
|
88 | ''' | |
89 | Boundary Layer and Tropospheric Radar (BLTR) reader, Wind velocities and SNR from *.sswma files |
|
89 | Boundary Layer and Tropospheric Radar (BLTR) reader, Wind velocities and SNR from *.sswma files | |
@@ -185,7 +185,6 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
185 | file_id = self.fileIndex |
|
185 | file_id = self.fileIndex | |
186 |
|
186 | |||
187 | if file_id == len(self.fileList): |
|
187 | if file_id == len(self.fileList): | |
188 | log.success('No more files in the folder', 'BLTRParamReader') |
|
|||
189 | self.flagNoMoreFiles = 1 |
|
188 | self.flagNoMoreFiles = 1 | |
190 | return 0 |
|
189 | return 0 | |
191 |
|
190 | |||
@@ -240,7 +239,7 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
240 |
|
239 | |||
241 | pointer = self.fp.tell() |
|
240 | pointer = self.fp.tell() | |
242 | header_rec = numpy.fromfile(self.fp, REC_HEADER_STRUCTURE, 1) |
|
241 | header_rec = numpy.fromfile(self.fp, REC_HEADER_STRUCTURE, 1) | |
243 | self.nchannels = header_rec['nchan'][0] / 2 |
|
242 | self.nchannels = int(header_rec['nchan'][0] / 2) | |
244 | self.kchan = header_rec['nrxs'][0] |
|
243 | self.kchan = header_rec['nrxs'][0] | |
245 | self.nmodes = header_rec['nmodes'][0] |
|
244 | self.nmodes = header_rec['nmodes'][0] | |
246 | self.nranges = header_rec['nranges'][0] |
|
245 | self.nranges = header_rec['nranges'][0] | |
@@ -357,8 +356,7 class BLTRParamReader(JRODataReader, ProcessingUnit): | |||||
357 | ''' |
|
356 | ''' | |
358 | if self.flagNoMoreFiles: |
|
357 | if self.flagNoMoreFiles: | |
359 | self.dataOut.flagNoData = True |
|
358 | self.dataOut.flagNoData = True | |
360 | log.success('No file left to process', 'BLTRParamReader') |
|
359 | self.dataOut.error = (1, 'No More files to read') | |
361 | return 0 |
|
|||
362 |
|
360 | |||
363 | if not self.readNextBlock(): |
|
361 | if not self.readNextBlock(): | |
364 | self.dataOut.flagNoData = True |
|
362 | self.dataOut.flagNoData = True |
@@ -12,10 +12,10 from time import gmtime | |||||
12 |
|
12 | |||
13 | from numpy import transpose |
|
13 | from numpy import transpose | |
14 |
|
14 | |||
15 | from .jroproc_base import ProcessingUnit, Operation |
|
15 | from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation, MPDecorator | |
16 | from schainpy.model.data.jrodata import Parameters |
|
16 | from schainpy.model.data.jrodata import Parameters | |
17 |
|
17 | |||
18 |
|
18 | @MPDecorator | ||
19 | class BLTRParametersProc(ProcessingUnit): |
|
19 | class BLTRParametersProc(ProcessingUnit): | |
20 | ''' |
|
20 | ''' | |
21 | Processing unit for BLTR parameters data (winds) |
|
21 | Processing unit for BLTR parameters data (winds) | |
@@ -39,13 +39,12 class BLTRParametersProc(ProcessingUnit): | |||||
39 | self.dataOut.year - Experiment year |
|
39 | self.dataOut.year - Experiment year | |
40 | ''' |
|
40 | ''' | |
41 |
|
41 | |||
42 |
def __init__(self |
|
42 | def __init__(self): | |
43 | ''' |
|
43 | ''' | |
44 | Inputs: None |
|
44 | Inputs: None | |
45 | ''' |
|
45 | ''' | |
46 |
ProcessingUnit.__init__(self |
|
46 | ProcessingUnit.__init__(self) | |
47 | self.dataOut = Parameters() |
|
47 | self.dataOut = Parameters() | |
48 | self.isConfig = False |
|
|||
49 |
|
48 | |||
50 | def setup(self, mode): |
|
49 | def setup(self, mode): | |
51 | ''' |
|
50 | ''' |
General Comments 0
You need to be logged in to leave comments.
Login now