Allow full parsing of Current.rawins from UCAR
This commit is contained in:
parent
9bde5a77a0
commit
ae57b24954
1 changed files with 10 additions and 1 deletions
|
@ -46,6 +46,9 @@ class RAOBSounding():
|
||||||
def finish(self) -> Sounding:
|
def finish(self) -> Sounding:
|
||||||
timestamp = self.parse_timestamp(self.timestamp)
|
timestamp = self.parse_timestamp(self.timestamp)
|
||||||
|
|
||||||
|
if timestamp is None:
|
||||||
|
return
|
||||||
|
|
||||||
sounding = Sounding()
|
sounding = Sounding()
|
||||||
sounding.samples = list()
|
sounding.samples = list()
|
||||||
sounding.station = self.station
|
sounding.station = self.station
|
||||||
|
@ -519,6 +522,9 @@ class RAOBReader():
|
||||||
for data in samples:
|
for data in samples:
|
||||||
pressure = data['pressure']
|
pressure = data['pressure']
|
||||||
|
|
||||||
|
if pressure is None:
|
||||||
|
continue
|
||||||
|
|
||||||
sounding.record_height(pressure, data.get('height'))
|
sounding.record_height(pressure, data.get('height'))
|
||||||
|
|
||||||
sounding.record_temp_dewpoint(pressure,
|
sounding.record_temp_dewpoint(pressure,
|
||||||
|
@ -530,7 +536,10 @@ class RAOBReader():
|
||||||
data.get('wind_dir'))
|
data.get('wind_dir'))
|
||||||
|
|
||||||
for key in self.soundings:
|
for key in self.soundings:
|
||||||
yield self.soundings[key].finish()
|
sounding = self.soundings[key].finish()
|
||||||
|
|
||||||
|
if sounding is not None:
|
||||||
|
yield sounding
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def each_sounding_from_fh(fh: io.TextIOBase):
|
def each_sounding_from_fh(fh: io.TextIOBase):
|
||||||
|
|
Loading…
Add table
Reference in a new issue