Handle wind directions with ambiguous digits
This commit is contained in:
parent
c1d3e57fa0
commit
cc368ad442
1 changed files with 7 additions and 1 deletions
|
@ -209,7 +209,13 @@ class RAOBObs():
|
|||
if token[0:2] == '//':
|
||||
wind_dir = None
|
||||
else:
|
||||
wind_dir = meters_second(float(token[0:3]) + base_dir)
|
||||
v100 = int(token[0]) if token[0] != '/' else 0
|
||||
v10 = int(token[1]) if token[1] != '/' else 0
|
||||
v1 = int(token[2]) if token[2] != '/' else 0
|
||||
|
||||
value = float(100.0 * v100 + 10.0 * v10 + v1)
|
||||
|
||||
wind_dir = meters_second(value + base_dir)
|
||||
|
||||
if token[3:5] == '//':
|
||||
wind_speed = None
|
||||
|
|
Loading…
Add table
Reference in a new issue