I saw this thread over at WXF: http://www.wxforum.net/index.php?topic=34216.msg347547
I took the opportunity to download it, as Henkka removed the link (I'm a latecomer to WXSIM)
- Love Meteograms!
I've got it running absolutely fine, but i've noticed that the units are not being pulled from the CSV files. I thought it was me, but I see the same on your meteogram as well.
https://warehamwx.co.uk/meteogram/
I think it's down to this:
Code: Select all
$csv = preg_replace("/mi\/hr/", " mph", $csv);
$csv = preg_replace("/km\/hr/", " kph", $csv);
$csv = preg_replace("/pct/", " %", $csv);
$csv = preg_replace( '/\(/', '.', $csv );
$csv = preg_replace( '/\)/', '.', $csv );
$csv = preg_replace("/mb/", "hPa", $csv);
$csv = preg_replace("/deg/", " °", $csv);
$csv = preg_replace("/m\/sec/", "m/s", $csv);
$csv = preg_replace( '/\ ,/', ';', $csv ); // replace space+comma with ;
$csv = preg_replace( '/\s/', '', $csv ); // remove white space
$csv = preg_replace( '/\,/', '.', $csv ); // replace , with . for decimal spaces
$csv = preg_replace("/RN\/SNW/", "SLEET", $csv);
$csv = preg_replace("/SNW\/RN/", "SLEET", $csv);
$tot = count($csv);
Code: Select all
$uoms = explode(',', $csv[1]);
Code: Select all
$uoms = array('','','','','','°C','','','','','','','mph','hPa','mm');