Tom Ehrensberger has created a great program called WXSIM to create weather forecasts based on observation data from public sources and your own weather station.
This program (better set of programs) has to run on a Windows PC and the forecasts created has to be uploaded to your website to be used to generate textual and graphical forecasts.
A link to the demonstration page of the WXSIM processing scripts included in this template.
The demonstration page is for information only. The WXSIM scripts are already fully installed in this template
The WXSIM website: http://www.wxsim.com/
The WXSIM forum area: http://www.weather-watch.com/smf/index.php/board,36.0.html
ATTENTION: All forecast-scripts from the Leuven-Template process the forecast data in two steps.
If you change a setting and want to test if this change is reflected in the generated output on the screen, you have to discard the intermediate file in the cache. Because as long as the cached file is valid only small parts of the scripts are executed.
There are multiple settings to either set which script must be run and what type of output has to be displayed.
Will WXSIM be used to display a forecast on the startpage?
$SITE["fctOrg"] = "wxsim";
Do we want a WXSIM forecast page (in the menu)?
#--------------------------------------------------------- # Extra weather-programs used for this station #--------------------------------------------------------- # # WXSIM weather-forecasting $SITE["wxsimPage"] = false; # true = Yes, we use the WXSIM paid program to make our weather-forecasts | false = Do not display
There are now multiple settings to find the right scripts and the data these scripts has to process.
$SITE["wxsimData"] = "../"; $SITE["wxsim_file"] = "latest.csv"; # latest.csv = lates.csv file will be used | lastret.txt = lastret.txt file will be used $SITE["wxsimIconsOwn"] = false; # false = Use template standard icons | true = Use YrNo icons
Normaly the files $SITE['wxsimData'] are already uploaded to '../' the root of your site. If you have them uploaded to another place, specify the correct place here.
There are two data sets abailable for upload when running WXSIM.
Normaly you use latest.csv but if there is a problem / program error in WXSIM you can switch to the other file.
Here you can choose between the yrno isons or the default template icons.
Most settings for wxsim are in the wxsim scripts folder in wsWxsimSettings.php. First a lot of settings are copied from the template wide settings as stored in the $SITE settings.
# Hours when wxsim runs on the PC You find that in wxsim ==> menu start ==> autorun $updateHour = array(2,4,6,8,10,12,14,16,18,20); // Hours when wxsim runs $updateMin = 15; // minutes after the hour whenwxsim uploads
Set the hours which WXSIM runs the same as on your PC.
Youn also have to check the units used in lastret.txt/plaintext.txt. The following part of the settings should be studied and adapted:
# uom = unit of measurement = units for temp baro etc. $uoms = array ('C', 'mm','km/h', 'hPa','cm','km'); // for non US users #$uoms = array('F','in','mph','hPa','in','mi'); // for US uoms # # IMPORTANT! Units used as by wxsim, array ('C', 'mm','km/h', 'hPa','cm','km'); # temperature, precipitation, wind, pressure, snowdepth, visibility # you find the units used by your copy ofWXSIM at the near end of the lastret.txt file # as in the following example /* Units: temperature: Celsius, precipitation: mm, snow: cm, wind: m/s thickness: meters, solar energy: Watt x hr/m^2, visibility: km Convective basis: N.W. European */ # normaly you should set the units in WXSIM equal to the units in the rest of your scripts #
Example above is often valid for NON-imperial countries. This following one is from a US user:
Units: temperature: Fahrenheit, precipitation: inches, snow: inches, wind: mi/hr thickness: meters, solar energy: Watt x hr/m^2, visibility: miles Convective basis: North American
The settings lines for the units should become as in this example and REMOVE the comment mark:
$uoms = array('F','in','mph','hPa' ,'in','mi'); // for US uoms should be
There is no mention in the lastret.txt of the unit for pressure used.
It seems to be always in hPa=mb=in.Hg x 33.864
The scripts will recalculate to your desired uom, but set in the line here the setting for the INPUT file which is hPa.
Please set these settings correctly and carefully. Do not forget to delete the wswxsim* files in the cache. As only after a new upload or a removal of the cached file your changes become visible.
In the scrips which generate the output there are settings for the width of the different area's, if tabs should be used, if the graphs should be separate or in a tab also.
Those settings are well documented and easy to change and test.
There are two sacripts which generate the information:
Both scripts are build the same and can be modified extensively.