The line for windrun should be
$weather["wind_run"] = convert_speed ($wd[173],'km/h',$to);
It would not translate to miles if a visitor switched to that on your site. Check the demo site
Leuven Home Weather Station (wf version) => 19.9 mi
Leuven Home Weather Station (wf version) => 32 km
Wim