diff --git a/lib/xmet/raob.py b/lib/xmet/raob.py index ab8b34e..e4694cf 100644 --- a/lib/xmet/raob.py +++ b/lib/xmet/raob.py @@ -459,19 +459,19 @@ class RAOBObs(): if heights[0] != '9': return dict() - if heights[1] != '/': + if heights[1] != '/' and len(heights) == 5: tens = int(heights[1]) - if len(heights) > 1 and heights[2] != '/' and len(tokens) > 1: - h = 0.3048 * (10000 * tens) + (1000 * int(heights[2])) + if heights[2] != '/' and len(tokens) > 1: + h = 0.3048 * ((10000 * tens) + (1000 * int(heights[2]))) ret[h] = self.parse_wind(tokens[1]) - if len(heights) > 2 and heights[3] != '/' and len(tokens) > 2: - h = 0.3048 * (10000 * tens) + (1000 * int(heights[3])) + if heights[3] != '/' and len(tokens) > 2: + h = 0.3048 * ((10000 * tens) + (1000 * int(heights[3]))) ret[h] = self.parse_wind(tokens[2]) - if len(heights) > 3 and heights[4] != '/' and len(tokens) > 3: - h = 0.3048 * (10000 * tens) + (1000 * int(heights[4])) + if heights[4] != '/' and len(tokens) > 3: + h = 0.3048 * ((10000 * tens) + (1000 * int(heights[4]))) ret[h] = self.parse_wind(tokens[3]) return ret