diff --git a/lib/xmet/raob.py b/lib/xmet/raob.py index 047c401..9ad1921 100644 --- a/lib/xmet/raob.py +++ b/lib/xmet/raob.py @@ -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)