So close to complete TTAA parsing
This commit is contained in:
parent
d1269d0e2f
commit
b6ec014608
1 changed files with 6 additions and 4 deletions
|
@ -133,13 +133,15 @@ class RawinsObs():
|
|||
return 1000.0 + height
|
||||
|
||||
def calc_500mb_height(self, height: float) -> float:
|
||||
print(f"Calculating 500mb height")
|
||||
return 10 * height
|
||||
return 10000 + (10 * height)
|
||||
|
||||
def parse_height_pressure(self, value: str):
|
||||
code = value[0:2]
|
||||
num = value[2:5]
|
||||
|
||||
#
|
||||
# Ignore values where height is not known.
|
||||
#
|
||||
if num == '///':
|
||||
return None
|
||||
|
||||
|
@ -155,10 +157,10 @@ class RawinsObs():
|
|||
return None
|
||||
elif pressure == 1000:
|
||||
height = self.calc_1000mb_height(float(num))
|
||||
elif pressure <= 850 and pressure > 500:
|
||||
height = self.calc_850mb_height(float(num))
|
||||
elif pressure <= 500:
|
||||
height = self.calc_500mb_height(float(num))
|
||||
elif pressure <= 850:
|
||||
height = self.calc_850mb_height(float(num))
|
||||
else:
|
||||
height = float(num)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue