Fix units for wind heights aloft
This commit is contained in:
parent
857814bdbf
commit
c5c7778772
1 changed files with 7 additions and 7 deletions
|
@ -459,19 +459,19 @@ class RAOBObs():
|
||||||
if heights[0] != '9':
|
if heights[0] != '9':
|
||||||
return dict()
|
return dict()
|
||||||
|
|
||||||
if heights[1] != '/':
|
if heights[1] != '/' and len(heights) == 5:
|
||||||
tens = int(heights[1])
|
tens = int(heights[1])
|
||||||
|
|
||||||
if len(heights) > 1 and heights[2] != '/' and len(tokens) > 1:
|
if heights[2] != '/' and len(tokens) > 1:
|
||||||
h = 0.3048 * (10000 * tens) + (1000 * int(heights[2]))
|
h = 0.3048 * ((10000 * tens) + (1000 * int(heights[2])))
|
||||||
ret[h] = self.parse_wind(tokens[1])
|
ret[h] = self.parse_wind(tokens[1])
|
||||||
|
|
||||||
if len(heights) > 2 and heights[3] != '/' and len(tokens) > 2:
|
if heights[3] != '/' and len(tokens) > 2:
|
||||||
h = 0.3048 * (10000 * tens) + (1000 * int(heights[3]))
|
h = 0.3048 * ((10000 * tens) + (1000 * int(heights[3])))
|
||||||
ret[h] = self.parse_wind(tokens[2])
|
ret[h] = self.parse_wind(tokens[2])
|
||||||
|
|
||||||
if len(heights) > 3 and heights[4] != '/' and len(tokens) > 3:
|
if heights[4] != '/' and len(tokens) > 3:
|
||||||
h = 0.3048 * (10000 * tens) + (1000 * int(heights[4]))
|
h = 0.3048 * ((10000 * tens) + (1000 * int(heights[4])))
|
||||||
ret[h] = self.parse_wind(tokens[3])
|
ret[h] = self.parse_wind(tokens[3])
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Add table
Reference in a new issue