Skip to main content.
Mauston, WI, USA - Good Evening!
Updated: 6/18/2013    11:28:20 PM

Weather Scripts

NSDisplay Lightning Script

NSDisplay displays NexStorm lightning data and requires the NSLog program. It's available on this site's NSLog page on the add-ons tab. There are also several other scripts available there which use NSLog generated data.



forecast-compare.php for WxSim

Version 3.7 December 14, 2012

This script will record and compare forecast temperature data from WxSim and another forecasting system. Systems supported are the National Weather Service, Weather Underground (non US only) and Environment Canada. It's extremely customizable to include languages. You can see a demonstration here, see it live on this site and download a copy here.



PHP Wunderground Station History Script (Stand Alone)

WU-History.php - Version 2.7 - February 3, 2012

Ken True and Mike Challis have done a remarkable job of creating a "wrapper" for this script so that it integrates with their Weather Display/PHP/AJAX Website Template set. If you're using that code, you'll want to download the version found on Ken's plugin page. The version here is designed for anyone else who wishes to use it. This WU-History.php file and the plugin WU-History-inc.php files are identical and will remain that way should there be any changes in the future. The difference between the two packages is simply the css implementation.

This script reproduces much of the functionality of the Wunderground display of historical data for an individual station. It is only useful for stations that upload data to Wunderground on a regular basis. The script downloads station data from Wunderground in a CSV format and then processes it for display. It is designed to be as configurable as possible including the ability to utilize different languages.

Weather Underground is very willing to share the graphics and data on their site with those who provide weather data to them. Ken True corresponded with John Celenza, Director of Weather Technology at Wunderground about use of their images and data on our personal sites. You can read about it on Ken's site saratoga-weather.org.

This script does NOT generate a complete HTML page and is intended for use ONLY by being included in an existing webpage on your site with the following code:

		<?php
		  include("./WU-History.php");
		?>

You'll also have to place the following in the <head> section of your calling page:

		<link rel="stylesheet" type="text/css" href="./WU-HistoryTan.css" />

The supporting graphics are in the enclosed wuicons folder, and that folder must be placed in the same folder with this script. If you wish the icons elsewhere, just make the appropriate changes in WU-History[color].css.

Other files in the distribution are:

		TestHistory.php        - Demo file to show how the above are included in your containing page and can be run to test your setup.
		top.htm                - An example of how to set up the optional boxed in area right of the summary and graph data.
		bottom.htm             - Functions just like top.htm, but displays information below the boxed in area.
		WU-History[color].css  - A few example .css files to help you get going.

Demo of Different Color Schemes  

Within the jcweather.us framework     Used as the site's main page in Harvey, Michigan

Download WU-History.zip

The .css files are well commented and it's really kind of fun to customize the colors for your site. If you put something together that you'd like to share, please send me copies of the .css and the graphics and I'd be happy to add them to this package for others to use. Also, if you decide to use this script on your site, please EMail me your location and a link to your site so I can add it to this page as a "satisfied customer".

This script Is Valid XHTML 1.0 Strict!
Portions of the code was borrowed from:
Weather Underground - wunderground.com
Ken True - saratoga-weather.org
Tom Chaplin - carterlake.org
Kevin Reed - tnetweather.com
and probably several others.

Sites Using WU-History.php

Silkeborg, Danmark (Danish) Desborough, UK Branford Fire Dept, CT
Silkeborg, Denmark (English) Federal Way, WA West Wareham, MA
Kampenhout, Belgium* Arendonk, Belgium Royal County of Berkshire, UK
Langerak, Zuid-Holland Delta, CO Burton, MI
West Wareham, MA * Lexington Park, MD Saratoga, CA*
Dacula, GA South Wales, UK Sherman, CT
De Soto WI Thornton, CO Sunbury on Thames, UK
Canterbury, New Zealand Halikko, Finland Southgate Station, Shreveport, LA
Erin, NY Southern Hills, Shreveport, LA Westmoreland, NY
Elgin, Morayshire, Scotland* Pittsburg, NH Westford, VT
Hollywood St. Mary's County, MD* St. Peter Port, Guernsey, Channel Islands * Stronghurst, IL*
Walker, MI* Horsham, PA Thousand Palms, CA
Cave City, KY Woonsocket, RI * Uniontown, PA *
Glendive MT * Alma, IL Lenexa, KS *
Axelvold, Sweden Harpers Ferry, WV * Lowestoft, UK
Acton, CA Lowell, MA Elkhart, IN
Mount Prospect, IL Tokoroa, South Waikato, NZ* Peotone, IL
Millersville, MD Météo Turbie, FR Harvey, MI
Sun Prairie, WI Torrelavega,Cantabria * Weerstation Marsdijk Assen (Netherands)
Phoenix, AZ * Loris, SC * Villarzel, Switzerland
Lodi, CA * Saint-Brevin, France Glen Ellyn, IL *
Damgan (Morbihan), France * Cape Cod, MA *  
     
* indicates Weather Display/PHP/AJAX Website Template Plugin


Flatline-check.php

Updated 7/15/12

This script checks the data in any delimited file to see if has changed or may be "flatlined". Optionally it will send you an EMail notifying you of the problem. If this file is included in one of your pages, it will put up a message that there's a problem. If not included, or on low activity sites, it will need to be periodically run either by a cron job or with a program such as System Scheduler. Download flatline-check.zip.



Dynamic Updating WAP Page

PHP scripts that create XHTML MP files to be viewed on mobile phones. In addition to supporting css, you can view these files in your web browser without a plugin while debugging your code. Demo at wap.jcweather.us and the code and support files can be downloaded at wap.jcweather.us/dynamicwap.zip.



PHP Script to Create Animated .Gif Files

This script will create an animated .gif from a sequence of files located on your server. The small GR3 radar graphic below the menu on the main page is created this way. Caution though ... the resulting files can be quite large depending on the size of the source files, the number of colors and of course the number of "slides" in the sequence. Requires PHP and GD on your server.



Do You Have PHP Available on Your Server?

Ken True has created a small script that will tell you whether you have PHP and GD on your server. You can get it from this page on his site at saratoga-weather.org

If so, here are some other sites with great code available:

carterlake.org

saratoga-weather

tnetweather

Long Beach Weather

anolecomputer.com

joske-online

relayweather

eastmasonvilleweather