WXMAP.BAT - A script to acquire a weather map and install it as wallpaper

There are many sources of weather information currently available on the Internet. The wxmap.bat script is set up to acquire a plotted mean sea level analysis chart from one of these weather sites, the Canadian Meteorological Center, to then cut out a section of the chart, and to install the cut out section as the wallpaper image on your computer system.

The wxmap.bat file is an MS DOS style script that invokes the Tcl script WALLPPR.TCL. The Tcl script will run under tclsh either under windows or under UNIX. The caveats are that the version of the script that is presented here is set up to work under Windows. To modify it for UNIX, the setroot.exe utility would have to be replaced with the xsetroot command, and the file format would have to be selected to be useful under UNIX with the xsetroot command, or with some similar utility that can set the X Windows root image, such as xv.

Installation

Download the WXMAP.BAT package. You will also require the Image 1.0 image processing extension (included in this archive!).

Unpack the archive in your Tcl library directory using a utility that preserves the embedded directory structure (such as UNZIP.EXE). This will install the Image 1.0 package and the TclUtils package. In the Image 1.0 sub-directory are the files:

Put the .BAT file,. the .TCL script and the EXE file some place in your PATH where you can find them. I collect all my .BAT scripts in a directory called \BATCH.

You may have to edit the WXMAP.BAT file for your Tcl installation. Your Tcl shell may not be called "tclsh83" for example.

Using the scripts

Check that tclsh.exe is in the PATH, then edit the WALLPPR.TCl script to cut out the section of the image that you prefer. Configure the Windows Task Scheduler, or, if you don't have this product, the WinCron 1.0 application available at this site, to run the WXMAP.BAT file at suitable times during the day. The result will be that your wallpaper image will be refreshed periodically with the latest weather chart from the Canadian Meteorological Center.

With some little effort, the WALLPPR.TCL file can be modified to access any number of other sites that provide weather products. The University of Michigan Weather Undergound site is a good plae to look for chart sources.

About WALLPPR.TCL

The Canadian Meteorological Center's public web server holds a number of weather charts that are in the form of standard facsimilie products distributed over the Global Telecommunicatins System of the World Meteorological Organization. Available are charts in two formats, the standard format and a smaller chart of initially half the scale of the standard chart. Windows will automatically center, stretch or tile any image in .BMP format to the size of your screen, but, for my taste, I prefer to have an undistorted image covering an area that is of interest to me personally.

Since I live in Montreal, Canada, the area of interest is the region of the north eastern U.S., eastern and central Canada, and the eastern seabord. The large scale products provide eminantly readable images, but fairly sparce data coverage, so I personally like the half scale images.

The command line options provided for this script are as follows:

For example,

WXMAP -s Small -m Surface -r Canada -p 12z

will fetch the 1200 GMT Mean Sea Level Surface Analysis covering the Canadian region. These charts are reliably available within 2 hours of the product time and are updated continuously, 365 days a year.

Weather charts have labels that contain information about the valid time of the chart, its internal identification, and frequently other things that are important for end users to have available. The WALLPPR.TCL script cuts the label of the chart out and repastes it in the lower right hand corner of the extracted image. Should you modify this script for another window, then check the label positioning as well. If you can't see the label, its hard to be confident that you have the correct chart.