Menu:

certainty-book

Affilliated Regional Weather Networks

Latest news:

July, 2016:
We've replaced our mesonet map with a Google Map.
Network members see here to install your own copy.
Note: The original mesonet map will stop updating with new stations displayed on Sep. 1, 2016.

Southwestern Weather Network

Southwestern Weather Network

Welcome and an overview of the SWN Meso-map

Thanks for joining the Southwestern Weather Network!
These instructions were updated Sat, May 23, 2015 6:27 PM

This page contains the detailed instructions on how to generate, install and maintain your SWN meso-map like this one. As our network grows and adds more stations, we've set up a (relatively) simple method to keep your SWN meso-map up to date using the master code generator utility PHP script .

Getting you online with the Southwestern Weather Network is a four-step process:

  1. Generate your SWN conditions data using (WeatherLink, Weather-Display, WU_HU, Cumulus or VWS) and upload them every 5 minutes (or less)
  2. Let me know your data file name (from step 1) is so I can update the control file and publish the update. After that is done, you can generate your meso-map page (step 3) so your conditions can appear.
  3. Generate your SWN meso-map page using (PHP method, or HTML-only method)
  4. Modify your homepage to link to your meso-map on your website (update homepage)

The rest of this section expands on these tasks:

A major part of the SWN meso-map is the reporting of current conditions by your station via the meso-map. Shown below are code templates for an HTML page needed on your weather website, and this page will be uploaded by your weather software. We've included templates for WeatherLink, VWS and WU_HU below (WeatherDisplay users can use the clientraw.txt to report conditions, Cumulus users use the realtime.txt to report conditions). We'd like you to set the upload frequency to 'every 5 minutes' for your current conditions data pages. As of 4-Jan-2007, we have two ways to display your SWN meso-map on your website: a PHP script on your site, or an iframe to load a PHP-driven page from the Southwestern Weather Network home site.

If your weather website hoster supports PHP (4.1+), I urge you to use the PHP Page method to install/maintain your SWN meso-map page. With that method, you only have to download a graphic and a text file, then upload to your website and your update is done (after you've done the initial setup, that is).

If you prefer to hand-craft your webpages, or your hoster doesn't support PHP, then you can use an iframe to include the mesomap into a page on your website.

After you've set up your meso-map page, put a link on your homepage to your meso-map page, and set up your reporting html page, you might like to check out some other PHP scripts to enhance your website.
I'm kinda partial to my own PHP scripts (NOAA forecast, NOAA Advisory, Earthquake, etc) available here, and to Anole Computer's weather-sticker script available here.

Again, Welcome to SWN.. may your website visibility and traffic increase with the exposure through the meso-map and cross links we provide. Please take time to check the SWN forum often, and actively participate -- that's what makes SWN a growing and vital community of weather enthusiasts.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 1a: SWN data using WeatherLink

Save this code to \program files\weatherlink\[stationname]\templates as WL_stickertags.htx.
Open S)etup, Internet Settings dialog. For the configuration you're using to FTP Weatherlink html file(s), press the Configure button.
In the Data Upload Profile, press Select Template Files, then use ADD button to select the WL_stickertags.htx file, and press Open.
The WL_stickertags.htx file should now appear in the Weather Template Files for Data Upload dialog. Press OK., and press OK on the Data Upload Profile, then OK on the Internet Settings dialog. The WL_stickertags.htx file will be uploaded at your next update cycle with a filetype as specified in the Data Upload Profile.


Please set the upload for the data page to every 5 minutes. The following code is one long line, copy it and paste it into WL_stickertags.htx (in notepad) to create your template file.

<!--stationTime-->,<!--stationDate-->,<!--outsideTemp-->,<!--outsideHeatIndex-->,<!--windChill-->,<!--outsideHumidity-->,<!--outsideDewPt-->,<!--barometer-->,<!--BarTrend-->,<!--windSpeed-->,<!--windDirection-->,<!--dailyRain-->,,<!--sunriseTime-->,<!--sunsetTime-->,<!--windAvg10-->,<!--windHigh10-->,<!--tempUnit-->|<!--windUnit-->|<!--barUnit-->|<!--rainUnit-->

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 1b: SWN data using Weather-Display

If you are doing real-time update using clientraw.txt (such as for Weather-Display Live), please let Ken know so we can use that published data. Your clientraw.txt should be uploaded every 5 minutes or less.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 1c: SWN data using Virtual Weather Station (VWS)

You can use this code in a VWS_stickertags.htx file in the \vws\root, or \vws\templates folder, wherever your other .htx files reside.

In VWS, pull down the Internet tab, and click on "HTML Settings". In a empty location on the left (Templates) side of the HTML Settings menu, enter c:\vws\template\stickertags.htx, editing this as necessary for drive and folder.

On the right (HTML filename) side of the menu, on the same line, enter the file location that you use for your other .htx files, followed by \stickertags.htm. One example is w:\stickertags.htm.

Click the On* box to put a check mark in it.

At the bottom of the window, set the update time to 5 minutes. Click Update and Upload Files to Internet.

You should be able to see your file in action at www.insertyourweathersite.com/stickertags.htm.

^vst143^,^vst142^,^vxv007^,^vxv021^,^vxv019^,^vxv005^,^vxv022^,^vxv023^,^vst140^,^vxv002^,^vxv001^, ^vxv121^,^climate_cconds1^,^vst144^,^vst145^,^vxv002^,^vxv003^, ^uni007^|^uni002^|^uni023^|^uni121^

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 1d: Weather Underground HeavyWeather Uploader (WUHU) Configuration

NOTE! Needs WUHU 216 Beta 40 or newer !!

  1. Save the file WUHU_stickertags.txt to folder of your choice.
  2. Expand WUHU and click the Alerts/Actions-button. A new window will appear.
  3. In Main Action/Alert, select Enable Actions and Repetitions and set the value for Selections to 1.
  4. In WUHU Operation Alarms/Actions, select On Weather Update. If you want to update the file ie. every 2 minutes, select also On Update Seconds and set the value to 120.
  5. Click on Sound/Action-button (below Weather Update). A new window will appear.
  6. Write the next string in Action on Activation:
    template:"X:\(where_you_have_saved_WUHU_stickertags.txt)\WUHU-stickertags.txt" "X:\(where_you_want_to_save_the_file)\WU_stickertags.txt"
    X: is the partition-letter. The above string is an example, configure to match your own computer.
  7. Confirm by clicking OK
  8. Save the changes with Save Changes

You should be able to see your file in action at www.yourweatherwebsite.com/WU_stickertags.txt

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 1e: Cumulus Configuration

In your Cumulus software, enable publishing of the realtime.txt weather file. After you do, you should be able to see data at www.yourwebsite.com/realtime.txt

When you are publishing the data, let Ken know when the realtime.txt is available.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 2: Contact Ken

Now that you are publishing your SWN conditions data on your website, please contact me via PM on the SWN Forum, or mail to webmaster@southwesternwx.net to let me know the URL of your SWN conditions data file. I will update the master control file, and you can proceed to Step 3 and create your SWN meso-map page using http://southwesternwx.net/SWN-mesomap.php (PHP users) utility. HTML-only users should use the method in 3b to create a mesomap on their site.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 3a: Create SWN Mesomap using PHP

You can download a starter set of the code and all required files (SWN-mesomap.zip). Just unpack the zip file and upload the contents to your website. The distribution .zip also contains the mesomap-update-utility.php which you can configure for your website, and run it from time to time to keep your mesomap graphic, station control file, and the PHP code up-to-date.

Second, create a new PHP webpage using your website template. (I called mine SWN.php, but the filename is not important). Edit the webpage to have a page title of "Southwestern Weather Network", and insert two PHP include statements. In the <head> section, insert:

<meta http-equiv="Refresh" content="300" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<?php
$doPrintSWN = false;
include("SWN-mesomap.php");
print $SWN_CSS; ?>

and in the <body> section where you'd like the SWN meso-map to appear, insert:

<?php print $SWN_MAP; print $SWN_TABLE; ?>

if you'd like XHTML 1.0-Strict code generated, then use:

<?php
$doPrintSWN = false;
$_REQUEST['gen'] = 'xhtml';
include("SWN-mesomap.php");
print $SWN_CSS; ?>

Save the file and upload it to your weather website.

If you'd like to center the map in your page, don't use the <center> tag .. it will move only the upper graphic and not the background graphic, so the legends will be displaced. Instead, use a <table> like this:

<table width="100%">
<tr><td align="center">
<table width="640">
<tr><td style="text-align:left">
<?php print $SWN_MAP; ?>
</td></tr>
<tr><td>
<?php print $SWN_TABLE; ?>
</td></tr>
</table>
</td></tr>
</table>

When it comes time to update the meso-map in the future, use the mesomap-update-utility.php on your website (just run it as a page on your site by accessing it through your browser) -- that will painlessly update the graphic, control file and PHP code if the respective versions are newer on the SWN website than on your website.

New: 5-Aug-2005: Cacheing of current conditions has been enabled with a default life of 10 minutes. This should speed up subsequent views. Also, a new config file option has been implemented on V2.06 of SWN-mesomap.php which allows you to store your settings in SWN-mesomap-config.txt in the same directory. That way, you only have to change your settings once for the SWN-mesomap.php program, and new program updates won't alter your settings. The sample SWN-mesomap-config.txt file is in the SWN-mesomap.zip or viewable here.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 3b: Create SWN Mesomap using HTML (no PHP available)

NOTE: please use this method ONLY if you don't have PHP available on your web hoster. This method will cause load on our Southwestern Weather Network home site (which we can handle for a few sites), and may not provide search engines with the links to index as does the PHP method (so your site won't get the 'publicity' on the search engines as the sites using the PHP map will).

First, create a new SWN meso-map webpage using your website template.
Edit the webpage to have a page title of "Southwestern Weather Network", and put this HTML in the <body> section of the page where you'd like the mesomap to appear.:

<div style="width: 620px">
<iframe src="http://www.southwesternwx.net/SWN.php" width="650" height="680"
frameborder="0" scrolling="auto">
</iframe>
<br clear="all">
</div>

Now upload your SWN meso-map page to your website. You can see a sample of this method at my old Comcast personal weather site home http://home.comcast.net/~saratoga-weather/swn-test.htm

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 4: Update your homepage

Now edit your weather station homepage to have a link to your SWN meso-map. If you use a text link, then please make sure the words "Southwestern Weather Network" appear in the link and title= like this:

<a href="SWN.php" title="Southwestern Weather Network">Southwestern Weather Network</a>

You can also use a graphical link (see http://www.southwesternwx.net/SWN-graphics.php for samples of graphics to download and use on your website). If you use a graphical link, then make sure the <img> link has both alt= and title= attributes that say "Southwestern Weather Network" in them. Search engines will read the alt= and title= tags for keywords, and we want to make sure they pick up our full name. Here's a sample with my personal favorite:

Southwestern Weather Network

<a href="SWN.php">
<img src="swn_logo_05.png"
alt="Southwestern Weather Network"
title="Southwestern Weather Network"
width="365" height="87" style="border: none;" />
</a>

Save the edited homepage and upload to your website (which may mean editing a .htx or .txt file with the html for upload by your weather station program). Now you're finished (until the SWN gets a new member) and you can relax and enjoy the snappy reparte on the SWN forum.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Suggestions?

Comments are ALWAYS welcome .. please send me a note on the Southwestern Network Forum (via PM or posting a topic), or direct via email to webmaster@southwesternwx.net.

Thanks, Ken True

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WU_HU data | 1e: Cumulus data | 2: Contact |
3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]