Be more tolerant of missing elements of height values

This commit is contained in:
XANTRONIX 2025-03-30 00:29:33 -04:00
parent cc368ad442
commit eee4c781cc

View file

@ -275,12 +275,12 @@ class RAOBObs():
# Ignore tokens where height is not known.
#
if num == '///':
return None
return dict()
pressure = self.code_to_pressure(code)
if pressure is None:
return None
height = None
elif pressure == 1000:
height = self.calc_1000mb_height(float(num))
elif pressure <= 850 and pressure > 700:
@ -641,7 +641,7 @@ class RAOBReader():
timestamp = data['timestamp']
samples = data['samples']
sounding = self.sounding(station, timestamp)
sounding = self.sounding(station, timestamp[0:4])
for data in samples:
pressure = data.get('pressure')