Welcome to the Cumulus Support forum.

Latest Cumulus MX release v3.0.0 build 3048 - 02 March 2019.
Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014

See the Wiki for downloading either version.

WXSIM Storm Forecast

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
Mapantz
Posts: 565
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64
Location: null

WXSIM Storm Forecast

Post by Mapantz » Mon 31 Dec 2018 12:42 am

Hi Ken

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]);
I just bodged it for the time being :lol:

Code: Select all

$uoms = array('','','','','','°C','','','','','','','mph','hPa','mm');
Image

Post Reply