JC
I cannot reproduce your results. I used the realtimegaugesWC.txt file you supplied above, but changed the wind run to "10.00" to make things simple.
After adding the lowercase() change in I find with the gauges displaying...
mph, run = 10.0 miles
km/h , run = 16.1 km
m/s, run = 16.1 km
knots, run = 8.7 n.miles
Which looks correct to me. Can you provide a link to your page so I can run it in a debugger?
EDIT: I also set the latest wind speed = 10 mph, and that converts correctly to km/h, m/s, knots (within rounding errors)