I think this might be better?
This commit is contained in:
parent
bca617b318
commit
c9f667301e
1 changed files with 9 additions and 1 deletions
|
@ -124,6 +124,12 @@ class RAOBObs():
|
|||
return 10.0 * height
|
||||
|
||||
def calc_250mb_height(self, height: float) -> float:
|
||||
if height >= 500:
|
||||
return height * 10
|
||||
else:
|
||||
return 10.0 * (1000.0 + height)
|
||||
|
||||
def calc_100mb_height(self, height: float) -> float:
|
||||
return 10.0 * (1000.0 + height)
|
||||
|
||||
def parse_height_pressure(self, token: str):
|
||||
|
@ -152,8 +158,10 @@ class RAOBObs():
|
|||
height = self.calc_850mb_height(float(num))
|
||||
elif pressure <= 500 and pressure > 250:
|
||||
height = self.calc_500mb_height(float(num))
|
||||
elif pressure <= 250:
|
||||
elif pressure <= 250 and pressure > 100:
|
||||
height = self.calc_250mb_height(float(num))
|
||||
elif pressure <= 100:
|
||||
height = self.calc_100mb_height(float(num))
|
||||
else:
|
||||
height = float(num)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue