Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

WXSIM Storm Forecast

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

WXSIM Storm Forecast

Post by Mapantz »

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