Hi apologies to all,
No time for responses to earlier posts nor to adjust core zip files with following change, or updates (as nothing new). Job/Work extreme at present.
Alessandro,
It must be a MySql version issue or something as it has worked for me on many occasions during testing and (although many have downloaded without feedback = I assume it did not work for them or they now have the concept and are developing further) aside from Javier who ran OK.
I think the issue is in the " 2wxsim_create_tables_views_run_once_only.php " file.
Change : ( 6hrGust
decimal(4,1) DEFAULT NULL ) to ( 6hrGust
decimal(4,1) DEFAULT NULL, ) (note: the coma after NULL,)
From:
// sql to create "wxsim_historic" table
$sql = "CREATE TABLE IF NOT EXISTS $wxsimhistorictable (
$cu_realtime_datefield datetime NOT NULL,
`WXType1` varchar(20) DEFAULT NULL,
`WXType2` varchar(20) DEFAULT NULL,
`Temperature` decimal(4,1) DEFAULT NULL,
`HiTemp` decimal(4,1) DEFAULT NULL,
`LowTemp` decimal(4,1) DEFAULT NULL,
`RelHum` decimal(4,1) DEFAULT NULL,
`DewPt` decimal(4,1) DEFAULT NULL,
`WetBulb` decimal(4,1) DEFAULT NULL,
`WindSpd` decimal(4,1) DEFAULT NULL,
`WindDir` decimal(4,1) DEFAULT NULL,
`TotPrcp` decimal(4,2) DEFAULT NULL,
`SnowDpth` decimal(4,1) DEFAULT NULL,
`SLP` decimal(6,1) DEFAULT NULL,
`StnPres` decimal(6,1) DEFAULT NULL,
`WindChl` decimal(4,1) DEFAULT NULL,
`SkyCov` decimal(4,1) DEFAULT NULL,
`VisTrans` decimal(4,1) DEFAULT NULL,
`VIS` decimal(4,1) DEFAULT NULL,
`SunAlt` decimal(5,1) DEFAULT NULL,
`SolarRad` decimal(5,1) DEFAULT NULL,
`UVIndex` decimal(4,1) DEFAULT NULL,
`SnowLevel` decimal(6,1) DEFAULT NULL,
`Convectionindex` decimal(4,2) DEFAULT NULL,
`Severeindex` decimal(4,2) DEFAULT NULL,
`1minGust` decimal(4,1) DEFAULT NULL,
`10minGust` decimal(4,1) DEFAULT NULL,
`1hrGust` decimal(4,1) DEFAULT NULL,
`6hrGust` decimal(4,1) DEFAULT NULL
PRIMARY KEY ($cu_realtime_datefield)
)";
To:
// sql to create "wxsim_historic" table
$sql = "CREATE TABLE IF NOT EXISTS $wxsimhistorictable (
$cu_realtime_datefield datetime NOT NULL,
`WXType1` varchar(20) DEFAULT NULL,
`WXType2` varchar(20) DEFAULT NULL,
`Temperature` decimal(4,1) DEFAULT NULL,
`HiTemp` decimal(4,1) DEFAULT NULL,
`LowTemp` decimal(4,1) DEFAULT NULL,
`RelHum` decimal(4,1) DEFAULT NULL,
`DewPt` decimal(4,1) DEFAULT NULL,
`WetBulb` decimal(4,1) DEFAULT NULL,
`WindSpd` decimal(4,1) DEFAULT NULL,
`WindDir` decimal(4,1) DEFAULT NULL,
`TotPrcp` decimal(4,2) DEFAULT NULL,
`SnowDpth` decimal(4,1) DEFAULT NULL,
`SLP` decimal(6,1) DEFAULT NULL,
`StnPres` decimal(6,1) DEFAULT NULL,
`WindChl` decimal(4,1) DEFAULT NULL,
`SkyCov` decimal(4,1) DEFAULT NULL,
`VisTrans` decimal(4,1) DEFAULT NULL,
`VIS` decimal(4,1) DEFAULT NULL,
`SunAlt` decimal(5,1) DEFAULT NULL,
`SolarRad` decimal(5,1) DEFAULT NULL,
`UVIndex` decimal(4,1) DEFAULT NULL,
`SnowLevel` decimal(6,1) DEFAULT NULL,
`Convectionindex` decimal(4,2) DEFAULT NULL,
`Severeindex` decimal(4,2) DEFAULT NULL,
`1minGust` decimal(4,1) DEFAULT NULL,
`10minGust` decimal(4,1) DEFAULT NULL,
`1hrGust` decimal(4,1) DEFAULT NULL,
`6hrGust` decimal(4,1) DEFAULT NULL,
PRIMARY KEY ($cu_realtime_datefield)
)";
Hopefully that helps,
I should add that my current structure is nothing like the original supplied earlier, as (I mentioned many posts ago) it will take me months / due to my main job/work and then when time permits enhance a final outcome. I now have about 14 additional views/tables being run by 4 separate cron files run after each Zulu Run, to store each in separate tables, then other scripts displaying the results.
It is however no where near what the final display will be, as currently I have no (like Jim’s brilliant script) created a way to capture (+) days for compare, I could do it via more tables/views or by php queries creating similar to Jim’s (in an output to json/txt file whatever, though all that is as mentioned months (+) away, so don’t hold your breath waiting for a final script, as it …is a long way off :roll:
The idea of injecting WxSim into MySql, has been a passion of mine for ages, so now a functional concept is available, I hope others enhance it, make it more robust and eventually share as well. Fell free to do what you like (in fact please do) as I will take ages and mine will never be as good as the gurus out there.
I should also add that the core underlying reason I have for doing this is to not only try and display Forecast vs Actual in a more Dynamic / Realtime way, but also to be able to eventually utilize a database of WxSim outputs from an analytical point, relating to validity of Zulu Runs etc. Like the old (" 00Z and 12Z runs are more accurate than the 06Z and 18Z runs, probably because there’s more real data (including upper air soundings) going into the 00Z and 12Z ") and hopefully display that and utilize findings of how and when to run WxSim. I appreciate WxSim’s inboard analysis is brilliant, I would just like to do further checks and hopefully visualize them in a nice way (along the way). I have never been one for Mines Better than Yours approach to historic weather display, I’d rather walk around (if you like in my underpants) and display all for whoever to see, butonly these days against my own forecast. I lost the passion a while back to compare against what resulted in an inconsistent availability of some data that was available over time.
I hold the highest regard for Tom (WxSim) always will and recall his response to the above question regrading variation in runs:
Note that any increase in accuracy of, say 00Z over 06Z might be compensated for in short term forecasts, just by being more up to date, so I've never really recommended NOT using 06 or 18Z. It's hard to say whether or not they represent any real improvement over their 6-hour-earlier counterparts.
Tom
Brilliant, the only issue I have is that since the implementation of ( 0.25 res GFS vs 0.5 GFS ) is that I will have Torrential Rain one run then None the next, or Snow to 150 metres one run and 1,280 metres the next. Really gets to me.
Kind regards,