Nailed it?
This commit is contained in:
parent
b6ec014608
commit
b2cbb3fccd
1 changed files with 7 additions and 2 deletions
|
@ -133,7 +133,10 @@ class RawinsObs():
|
||||||
return 1000.0 + height
|
return 1000.0 + height
|
||||||
|
|
||||||
def calc_500mb_height(self, height: float) -> float:
|
def calc_500mb_height(self, height: float) -> float:
|
||||||
return 10000 + (10 * height)
|
return 10.0 * height
|
||||||
|
|
||||||
|
def calc_200mb_height(self, height: float) -> float:
|
||||||
|
return 10.0 * (1000.0 + height)
|
||||||
|
|
||||||
def parse_height_pressure(self, value: str):
|
def parse_height_pressure(self, value: str):
|
||||||
code = value[0:2]
|
code = value[0:2]
|
||||||
|
@ -159,8 +162,10 @@ class RawinsObs():
|
||||||
height = self.calc_1000mb_height(float(num))
|
height = self.calc_1000mb_height(float(num))
|
||||||
elif pressure <= 850 and pressure > 500:
|
elif pressure <= 850 and pressure > 500:
|
||||||
height = self.calc_850mb_height(float(num))
|
height = self.calc_850mb_height(float(num))
|
||||||
elif pressure <= 500:
|
elif pressure <= 500 and pressure > 200:
|
||||||
height = self.calc_500mb_height(float(num))
|
height = self.calc_500mb_height(float(num))
|
||||||
|
elif pressure <= 200:
|
||||||
|
height = self.calc_200mb_height(float(num))
|
||||||
else:
|
else:
|
||||||
height = float(num)
|
height = float(num)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue