Compare commits
No commits in common. "af666f9c9842328c772e4f94400b812ed89d9b17" and "ee801726a8ed487a807ca4624c2a5e6175efe795" have entirely different histories.
af666f9c98
...
ee801726a8
2 changed files with 9 additions and 9 deletions
|
@ -168,9 +168,6 @@ class Hodograph():
|
|||
|
||||
def each_significant_sample(self, sounding: Sounding):
|
||||
for sample in sounding.hodograph_samples():
|
||||
if sample.wind_speed is None or sample.wind_dir is None:
|
||||
continue
|
||||
|
||||
if self.color(sample.height) is None:
|
||||
break
|
||||
|
||||
|
|
|
@ -302,8 +302,8 @@ class RAOBObs():
|
|||
}
|
||||
|
||||
PRESSURE_CODES = {
|
||||
'11': True, '22': True, '33': True, '44': True,
|
||||
'55': True, '66': True, '77': True, '88': True, '99': True
|
||||
'11': True, '22': True, '33': True, '44': True, '55': True,
|
||||
'66': True, '77': True, '88': True, '99': True
|
||||
}
|
||||
|
||||
def parse_pressure(self, token: str):
|
||||
|
@ -360,6 +360,12 @@ class RAOBObs():
|
|||
}
|
||||
|
||||
def parse_ttaa(self) -> dict:
|
||||
#
|
||||
# Return None if there is no height data up to 100mb.
|
||||
#
|
||||
if self.tokens[0][4] != '1':
|
||||
return None
|
||||
|
||||
#
|
||||
# Return None if there is no station identifier.
|
||||
#
|
||||
|
@ -370,9 +376,6 @@ class RAOBObs():
|
|||
station = self.tokens[1]
|
||||
samples = list()
|
||||
|
||||
sample = self.parse_ttaa_sample(self.tokens[2:5])
|
||||
samples.append(sample)
|
||||
|
||||
i = 2
|
||||
|
||||
while i < len(self.tokens):
|
||||
|
@ -387,7 +390,7 @@ class RAOBObs():
|
|||
if prefix == '88':
|
||||
break
|
||||
|
||||
if prefix in self.TTAA_PRESSURES:
|
||||
if prefix in self.PRESSURE_CODES:
|
||||
sample = self.parse_ttaa_sample(self.tokens[i:i+3])
|
||||
|
||||
if sample is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue