Welcome and an overview of the AKWN Meso-map

Thanks for joining the Alaskan Weather Network!
These instructions were updated Mon, June 9, 2008 11:43 AM

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

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

  1. Generate your AKWN conditions data using (WeatherLink, Weather-Display, 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 AKWN 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 AKWN 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 and VWS below (WeatherDisplay users can use the clientraw.txt to report conditions). We'd like you to set the upload frequency to 'every 5 minutes' for your current conditions data pages. We have two ways to display your AKWN meso-map on your website: a PHP script on your site, or an iframe to load a PHP-driven page from the Alaskan 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 AKWN 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 (such as Ken True's scripts available here, and to Anole Computer's weather-sticker script available here).

Again, Welcome to AKWN.. 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 AKWN forum often, and actively participate -- that's what makes AKWN a growing and vital community of weather enthusiasts.

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

Step 1a: AKWN 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-->

If you are running Anole Computer's Weather Graphic PHP script, please let Tim know the URL of the stickertags.txt file used for the weather data by the wxsticker PHP script -- that file already contains the information needed for the mesomap.

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

Step 1b: AKWN data using Weather-Display

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

If you are running Anole Computer's Weather Graphic PHP script, please let Tim know the URL of the stickertags.txt file used for the weather data by the PHP script.

If you aren't running the Weather Graphic script or publishing clientraw.txt, then please copy and paste the following one long line of code into a file called 'stickertags.txt' and place in your Weather-Display webfiles directory. Set Weather-display to upload it at 5 minute intervals and please let Tim know the name of the uploaded file.

%time%,%stationDate%,%temp%,%heati%,%windch%,%hum%,%dew%,%baro%,%pressuretrendname%,%avgspd%,%dirlabel%,%dayrnusa%

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

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

You can use the following code in a 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 \VWS_stickertags.htm. One example is c:\vws\root:\VWS_stickertags.htm.

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

Now in VWS, pull down the Internet menu and click on FTP Upload File (Send) and in an empty row on the LEFT put the same contents as you'd done in the Right side of the HTML Settings dialog. (e.g. "c:\vws\root\VWS_stickertags.htm") .

On the Right side, put "[directory]/VWS_stickertags.htm" where [directory] is the same directory you use for the rest of your website. It would be '/VWS_stickertags.htm' if you're uploading to the document root of your website.

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.yourweatherwebsite.com/VWS_stickertags.htm.

^vst143^,^vst142^,^vxv007^,^vxv021^,^vxv019^,^vxv005^,^vxv022^,^vxv023^,^vst140^,^vxv002^,^vxv001^,^vxv121^,^vxv003^,^climate_cconds1^,^vst144^,^vst145^

If you are running Anole Computer's Weather Graphic PHP script, please let Tim know the URL of the stickertags.txt file used for the weather data by the PHP script.

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

Step 2: Contact Tim

Now that you are publishing your AKWN conditions data on your website, please contact me via PM on the AKWN Forum, or via the contact form to let me know the URL of your AKWN conditions data file. I will update the master control file, and you can proceed to Step 3 and create your AKWN meso-map page using http://alaskanweather.net/AKWN-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 | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]

Step 3a: Create AKWN Mesomap using PHP

You can download a starter set of the code and all required files (AKWN-mesomap.zip). Just unpack the zip file and upload the contents to your website, then you can run the code generator at http://alaskanweather.net/AKWN-mesomap.php and from there, download the graphic, the control file and the PHP script itself. Place the control file and PHP script in the root directory of your webserver, along with the graphic file and the arrows/other graphics in the ./AKWN-images directory..

Second, create a new PHP webpage using your website template. (I called mine AKWN.php, but the filename is not important). Edit the webpage to have a page title of "Alaskan 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
$doPrintAKWN = false;
include("AKWN-mesomap.php");
print $AKWN_CSS; ?>

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

<?php print $AKWN_MAP; print $AKWN_TABLE; ?>

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

<?php include("http://your.website.name/AKWN-mesomap.php?inc=Y&gen=xhtml"); ?>

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="99%">
<tr><td align="center">
<table width="620">
<tr><td style="text-align:left">
<?php print $AKWN_MAP; ?>
</td></tr>
<tr><td>
<?php print $AKWN_TABLE; ?>
</td></tr>
</table>
</td></tr>
</table>

When it comes time to update the meso-map in the future, you'll only have to use the code generator at http://alaskanweather.net/AKWN-mesomap.php and save the new graphic and control file, and upload them to your website. If the script changes, you should download a fresh copy and upload to your website too.

Cacheing of current conditions has been enabled with a default life of 10 minutes. This should speed up subsequent views.
Please make sure that AKWN-conditions.txt file in the same directory as the AKWN-mesomap.php is writable by PHP (permissions of 666 or 777) -- it's used to store the local cache of conditions reports for display.
Also, a config file option has been implemented which allows you to store your settings in AKWN-mesomap-config.txt in the same directory. That way, you only have to change your settings once for the AKWN-mesomap.php program, and new program updates won't alter your settings. The sample AKWN-mesomap-config.txt file is in the AKWN-mesomap.zip or viewable here.

[ top | Overview | 1a: PHP process | 1b: HTML process | 2a: WL data | 2b: WD data | 2c: VWS data | 3: Homepage update | Suggestions? ]

Step 3b: Create AKWN 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 Alaskan 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 AKWN meso-map webpage using your website template.
Edit the webpage to have a page title of "Alaskan 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://alaskanweather.net/AKWN.php" width="620" height="680"
frameborder="0" scrolling="auto">
</iframe>
<br clear="all">
</div>

Now upload your AKWN meso-map page to your website.

[ top | Overview | 1a: PHP process | 1b: HTML process | 2a: WL data | 2b: WD data | 2c: VWS data | 3: Homepage update | Suggestions? ]

Step 4: Update your homepage

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

<a href="AKWN.php" title="Alaskan Weather Network">Alaskan Weather Network</a>

If you use a graphical link, then make sure the <img> link has both alt= and title= attributes that say "Alaskan 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.

<a href="AKWN.php">
<img src="logo20.jpg"
alt="Alaskan Weather Network"
title="Alaskan Weather Network"
width="278" height="207" 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 AKWN gets a new member) and you can relax and enjoy the snappy reparte on the AKWN forum.

[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS 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 Southeastern Network Forum (via PM or posting a topic), or direct via the contact form .

Thanks, Tim Cresswell (and Ken True, author of the mesomap programs)

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