Be more tolerant of missing elements of height values
This commit is contained in:
parent
cc368ad442
commit
eee4c781cc
1 changed files with 3 additions and 3 deletions
|
@ -275,12 +275,12 @@ class RAOBObs():
|
||||||
# Ignore tokens where height is not known.
|
# Ignore tokens where height is not known.
|
||||||
#
|
#
|
||||||
if num == '///':
|
if num == '///':
|
||||||
return None
|
return dict()
|
||||||
|
|
||||||
pressure = self.code_to_pressure(code)
|
pressure = self.code_to_pressure(code)
|
||||||
|
|
||||||
if pressure is None:
|
if pressure is None:
|
||||||
return None
|
height = None
|
||||||
elif pressure == 1000:
|
elif pressure == 1000:
|
||||||
height = self.calc_1000mb_height(float(num))
|
height = self.calc_1000mb_height(float(num))
|
||||||
elif pressure <= 850 and pressure > 700:
|
elif pressure <= 850 and pressure > 700:
|
||||||
|
@ -641,7 +641,7 @@ class RAOBReader():
|
||||||
timestamp = data['timestamp']
|
timestamp = data['timestamp']
|
||||||
samples = data['samples']
|
samples = data['samples']
|
||||||
|
|
||||||
sounding = self.sounding(station, timestamp)
|
sounding = self.sounding(station, timestamp[0:4])
|
||||||
|
|
||||||
for data in samples:
|
for data in samples:
|
||||||
pressure = data.get('pressure')
|
pressure = data.get('pressure')
|
||||||
|
|
Loading…
Add table
Reference in a new issue