Welcome and an overview of the Scottish Meso-map
Thanks for joining the Scottish Weather Network!
These instructions were updated Sun, August 23, 2009 4:15 PM
This page contains the detailed instructions on how to generate, install and maintain your Scottish meso-map like this one. As our network grows and adds more stations, we've set up a (relatively) simple method to keep your Scottish meso-map up to date using the master code generator utility PHP script .
Getting you online with the Scottish Weather Network is a four-step process:
- Generate your Scottish conditions data using WeatherLink, Weather-Display, VWS, WUHU or Cumulus and upload them every 5 minutes (or less)
- Let me know your data file name (from step 1) 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.
- Generate your Scottish meso-map page using (PHP method, or HTML-only method)
- 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 Scottish 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 WUHU below (WeatherDisplay users can use the clientraw.txt to report conditions & Cumulus users the realtime.txt). 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 Scottish meso-map on your website: a PHP script on your site, or an iframe to load a PHP-driven page from the Scottish 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 Scottish 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 SCWN.. 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 Scottish forum often, and actively participate -- that's what makes the Scottish Weather Network a growing and vital community of weather enthusiasts.
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 1a: Scottish data using WeatherLink
Save this code to \program files\weatherlink\[stationname]\templates as WL_stickertags.txt.
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.txt file, and press Open.
The WL_stickertags.txt 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.txt file will be uploaded at your next update cycle with a filetype as specified in the Data Upload Profile.
Note: The WL_stickertags.txt will need WeatherLink to run with Bulletin or Summary window open in order to have the wind codes register in the WL_stickertags.txt.
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.txt (in notepad) to create your template file.
If you are running Anole Computer's Weather Sticker PHP script, please let Martin 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 | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 1b: Scottish data using Weather-Display
If you are doing real-time update using clientraw.txt (such as for Weather-Display Live), please let Martin 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 Sticker PHP script, please let Martin know the URL of the stickertags.txt file used for the weather data by the PHP script.
If you aren't running the Weather Sticker 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 Martin know the name of the uploaded file.
%pressuretrendname%,%avgspd%,%dirlabel%,%dayrn%
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 1c: Scottish 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 .txt 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\VWS_stickertags.txt, 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 .txt or .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.
^vxv002^,^vxv001^,^vxv121^,^climate_cconds1^,^vst144^,^vst145^,^vxv002^,^vxv003^,
^uni007^|^uni002^|^uni023^|^uni121^
If you are running Anole Computer's Weather Sticker PHP script, please let Martin 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 | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 1d: Scottish data using Weather Underground HeavyWeather Uploader (WUHU)
NOTE! Needs WUHU 216 Beta 40 or newer !!
- Save the file WUHU_stickertags.txt to folder of your choice.
- Expand WUHU and click the Alerts/Actions-button. A new window will appear.
- In Main Action/Alert, select Enable Actions and Repetitions and set the value for Selections to 1.
- 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.
- Click on Sound/Action-button (below Weather Update). A new window will appear.
- 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. - Confirm by clicking OK
- Save the changes with Save Changes
- Simply join and we will take it from there.
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: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 1e: Scottish data using Cumulus
If you are doing real-time update using realtime.txt, please let Martin know so we can use that published data. Your realtime.txt should be uploaded every 5 minutes or less.
If you are not publishing realtime.txt, then please activate it by opening Cumulus. In the menu at the top click "Communications" and choose "Internet" from the dropdown list. On the "Site/Options" page, tick the box marked "Enable Realtime" and select the number of seconds between uploads. You may have to restart Cumulus for this action to take effect.
You should be able to see your file in action at www.yourweatherwebsite.com/realtime.txt
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 2: Contact Martin
Now that you are publishing your Scottish conditions data on your website, please contact me via PM on the Scottish Forum, or via the contact form to let me know the URL of your Scottish conditions data file. I will update the master control file, and you can proceed to Step 3 and create your Scottish meso-map page using https://scottishweather.net/SCWN-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: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 3a: Create Scottish Mesomap using PHP
You can download a starter set of the code and all required files (SCWN-mesomap.zip). Just unpack the zip file and upload the contents to your website, then you can run the code generator at https://scottishweather.net/SCWN-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 ./SCWN-images directory..
Second, create a new PHP webpage using your website template. (I called mine SCWN.php, but the filename is not important). Edit the webpage to have a page title of "Scottish Weather Network", and insert two PHP include statements. In the section, insert:
$doPrintSCWN = false;
include("SCWN-mesomap.php");
print $SCWN_CSS; ?>
and in the section where you'd like the Scottish meso-map to appear, insert:
if you'd like XHTML 1.0-Strict code generated, then use:
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
|
When it comes time to update the meso-map in the future, you'll only have to use the code generator at https://scottishweather.net/SCWN-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 SCWN-conditions.txt file in the same directory as the SCWN-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 SCWN-mesomap-config.txt in the same directory. That way, you only have to change your settings once for the SCWN-mesomap.php program, and new program updates won't alter your settings. The sample SCWN-mesomap-config.txt file is in the SCWN-mesomap.zip or viewable here.
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]
Step 3b: Create Scottish 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 Scottish 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 Scottish meso-map webpage using your website template.
Edit the webpage to have a page title of "Scottish Weather Network", and put this HTML in the
Now upload your Scottish meso-map page to your website.
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU 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 Scottish meso-map. If you use a text link, then please make sure the words "Scottish Weather Network" appear in the link and title= like this:
If you use a graphical link, then make sure the link has both alt= and title= attributes that say "Scottish 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.
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 Scottish gets a new member) and you can relax and enjoy the snappy reparte on the Scottish forum.
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU 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 Scottish Network Forum (via PM or posting a topic), or direct via the contact form .
Thanks, Martin (and Ken True, author of the mesomap programs)
[ top | Overview | 1a: WL data | 1b: WD data | 1c: VWS data | 1d: WUHU data | le: CU data | 2: Contact | 3a: PHP process | 3b: HTML process | 4: Homepage update | Suggestions? ]