They're free, but use at your own risk
The scripts in PHP and Perl referenced here are used in the operation of this weather station, and may be freely copied and used to support your station. Please note that you use these scripts at your own risk. No warranty is expressed or implied. I accept no liability for any damages that may ensue from their use.
You will need to configure them for your own particular station website.
A RSS Feed is available to help keep you informed on updates to the scripts.
A Version History is available -- check back from time to time to see if there are updates to scripts you have downloaded earlier. Announcements of version updates and new scripts are made on WXForum.net and Weather-Watch forums as they become available.
This page was updated
Wednesday, 02-Sep-2009 9:29 AM
PHP Scripts (run on webserver)
These scripts have run on PHP 4.1.2, and PHP 4.4.1. I don't have access to PHP 3.x, so it is not known if they will work on versions below PHP 4.1.2. If you try them and they work (or not) on earlier versions of PHP, please send me a message at webmaster[at]saratoga-weather.org and let me know the results.
Display .TXT NOAA style forecasts PHP
I needed to safely display a series of .TXT files (NOAA style climate reports) using the overall style of the website. My WeatherLink software produces regular reports (NOAAMO.TXT, NOAAPRMO.TXT, NOAAYR.TXT, NOAAPRYR.TXT) as part of the 5-minute update. I've also produced reports and named them NOAAyyyy.TXT for yearly reports and NOAAyyyy-mm.TXT for monthly reports. These I've uploaded (monthly) to a sub-directory on the website /NOAA-reports.
Version 1.04 (01-Dec-2007) adds a new feature for WeatherLink users to create new NOAAyyyy-mm.TXT and NOAAyyyy.TXT files from the respective NOAAPRMO.TXT and NOAAPRYR.TXT files when the month/year rolls over. It will copy the appropriate file to the $NOAAdir and name it so you have no monthly maintenance to do (except to view the NOAA reports page on the first of each month).
The NOAA-reports.php will read the sub-directory, sort the filenames produce a menu of available names, and display the file requested. It automatically uses NOAAMO.TXT and NOAAYR.TXT (WeatherLink version) for the current monthly and current yearly files. The nice thing about the script is it strictly controls what can be displayed (existing files only, no directory browsing). The following is a live display of WeatherLink produced NOAA style reports for this station.
<?php $doInclude = true; require("NOAA-reports-test.php"); ?>
2010: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
2009: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
2008: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
2007: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
2006: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
2005: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
2004: Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec
Report for 2010 03
MONTHLY CLIMATOLOGICAL SUMMARY for MAR. 2010
NAME: KCASARAT1 CITY: Saratoga STATE: CA
ELEV: 375 ft LAT: 37° 16' 28" N LONG: 122° 01' 23" W
TEMPERATURE (°F), RAIN (in), WIND SPEED (mph)
HEAT COOL AVG
MEAN DEG DEG WIND DOM
DAY TEMP HIGH TIME LOW TIME DAYS DAYS RAIN SPEED HIGH TIME DIR
------------------------------------------------------------------------------------
1 53.4 61.3 1:55p 45.4 2:35a 11.6 0.0 0.00 1.0 18.0 1:15p S
2 52.1 59.9 2:35p 44.9 10:10p 12.9 0.0 0.34 1.1 13.0 12:10p ESE
3 48.0 57.0 2:00p 40.6 11:55p 17.0 0.0 0.85 0.9 16.0 2:35p ESE
4 47.2 59.6 1:05p 37.6 6:10a 17.8 0.0 0.01 0.9 13.0 3:25p NW
5 48.8 59.5 2:25p 38.5 6:25a 16.2 0.0 0.00 0.7 11.0 11:50a E
6 53.3 66.3 2:50p 45.4 4:55a 11.7 0.0 0.00 0.6 11.0 12:40p NW
7 50.9 63.1 12:50p 41.3 6:25a 14.1 0.0 0.00 1.4 16.0 1:40p W
8 48.0 55.7 2:20p 42.2 7:20p 17.0 0.0 0.11 1.6 30.0 4:55p W
9 47.0 57.5 2:20p 37.6 6:35a 18.0 0.0 0.01 2.0 19.0 4:40p NW
10 47.4 56.9 2:45p 38.5 6:40a 17.6 0.0 0.17 1.9 16.0 1:50p NW
11 49.1 65.0 2:30p 36.0 6:50a 15.9 0.0 0.00 0.7 10.0 3:15p NW
12 49.1 57.5 11:00a 39.5 3:35a 10.3 0.0 0.27 0.9 17.0 11:00a ESE
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-------------------------------------------------------------------------------------
49.5 66.3 6 36.0 11 180.1 0.0 1.76 1.1 30.0 8 NW
Max >= 90.0: 0
Max <= 32.0: 0
Min <= 32.0: 0
Min <= 0.0: 0
Max Rain: 0.85 ON 03/03/10
Days of Rain: 5 (>.01 in) 5 (>.1 in) 0 (>1 in)
Heat Base: 65.0 Cool Base: 65.0 Method: Integration
Downloads .. please customize for your directory and file naming convention ( WL or VWS).
Download WeatherLink/ VWS version (V1.06 - 03-Oct-2008) [ see version history ]