Bronberg Weather Station
Pretoria
South Africa

11°C
Tierpoort, Pretoria, South Africa
Language: en gb za dk nl fi fr de gr it no pl pt es se
 

CLOUD BASE GRAPHIC SCRIPT

Version 2.1

DESCRIPTION:
This script outputs a 100x200 graphic of the current cloud conditions as a raw jpg image stream.

There are 11 cloud type overlays and 34 day and night backgrounds to choose from.
The windsock has 5 positions.
Can switch background according to the seasons.
Can be either in metric or imperial.
There are 28 moon phases each for North and South.
The script is multilingual.
Can fetch a METAR from NOAA for cloud conditions at night and/or day.

REQUIREMENTS:
This script requires one of the following data files from:
  o Weather Display (WD) .............. clientraw.txt & clientrawextra.txt
  o Virtual Weather Station (VWS) ..... wflash.txt & wflash2.txt
  o Heavy Weather (HW) ................ currdat.lst (extended)


If you intend using it with any other language you also need the translations in your "language-??.txt" file. See the notes at the end of the script for the required words. Language translations requires the "common.php" script that's included in the "World Multilingual Templates" available from:
Saratoga-Weather.org.

The following settings in "Settings.php" are used but not required.

     $SITE['wxSoftware']        = 'WD'; // [ WD | VWS | HW ]
     $SITE['clientrawfile']     = './clientraw.txt';
     $SITE['clientrawextrafile']= './clientrawextra.txt';
     $SITE['wflashdir']         = './wflash/Data/';
     $SITE['metarICAO']         = 'FAJS'; // 4 letter ICAO code for METAR
     $SITE['WXtags']            = './testtags.php';

GRAPHIC IMAGES REQUIRED:(included in zip)
"./images/cb/" ........ background, cloud, windsock & scale images.
"./images/cb/moon/" ... moon images southern & northern hemisphere.

USAGE:
Metric : <img src="cloudbase.php?uom=M" alt="" width="100" height="200" />
English: <img src="cloudbase.php?uom=E" alt="" width="100" height="200" />

   OPTIONAL PARAMETERS:
   uom=  [ M | E]  ....................... set units-of-measure (M)etric or (E)glish
   all=  [ 0 | 1 ]  ...................... 1=show all elements on picture
   wind= [ kts | mph | kph | km/h ]  ..... set uom for wind
   alti= [ ft | m ]  ..................... set uom for cloud altitude
   rain= [ mm | in ]  .................... set uom for rain
   baro= [ hPa | kPa | inHg ] ............ set uom for barometer
   temp= [ C | F ]  ...................... set uom for temperature
   humi= [ 0 | 1 ]  ...................... 1=show humidity
   cond= [ 0 | 1 ]  ...................... 1=show conditions
   cloud=[ 0 | 1 ]  ...................... 1=always show clouds when sunny or clear.
   metar=[ <code> | empty ]  ............. get NOAA METAR for given code. Disable if empty.
   data= [ en | de ]  .................... language of data files ie. clientraw.txt
   lang= [ en | de | fi | nn | sv | es ] . language to use for translation.
   test= [ 1..5 ] ........................ use preset conditions for drawing picture
   html= [ 0 | 1 ] ....................... 1=output html code for testing, 0=save picture only
   PS: passing any of the above parameters will always override the internal settings.

FOR TESTING USE THE FOLLOWING:
http//www.mysite.com/cloud-base.php?uom=M&html=1 .......... for current conditions
http//www.mysite.com/cloud-base.php?uom=M&html=1&test=1 ... where test=[1 to 5]

VERSION HISTORY:
02 May 2009 V1.0 First release.
02 May 2009 V1.1 Fixed translation issue for non-multilingual web sites.
02 May 2009 V1.2 Added "dry" to the "clear,sunny" match string.
    Added German match strings for German WD version.
03 May 2009 V1.3 Added extra parameters for overriding specific UOM's.
    Added $alwaysShowCloud when conditions are sunny or clear.
    Added $alwaysShowMPH if wind speed should be in MPH for metric UOM.
03 May 2009 V1.4 Added $arrowColor for cloud height marker (arrow)
03 May 2009 V1.5 Added ?all=1 parameter for showing all elemets.
04 May 2009 V1.6 Fixed altitude and wind speed text overlap problem.
    Added $useMetarAtNight for determinig clouds at night.
    Added $onlyUseMetar for determinig clouds at all times.
    Added $stationAltitude if you want to display ASL height instead of AGL.
04 May 2009 V1.7 Added $useWDHeight to always use the cloud height reported by WD.
05 May 2009 V1.8 Added language translations for de, es, fi, nn, sv.
    Added OZZ METAR download from www.airservices.gov.au
    Added code for WUHU software (Heavy Weather).
    Fixed problem with METAR always being used in conditions.
07 May 2009 V1.9 Added $showCloudTemp to show cloud temperature.
05 Jan 2010 V2.0 Fixed problem with Moon Phase.
16 Jan 2011 V2.1 Fixed problem with Moon Phase (by Ken True, Saratoga-weather.org)
 
ICAO AIRPORT UTILITIES:
ICAO AIRPORT CODES
METAR/TAF DECODER
 
CREDITS:
Please put the following snippet on your "wxabout.php" page:
Cloud base graphic courtesy of
<a href="http://www.bashewa.com" title="Bronberg">Bashewa Weather</a>

DOWLOAD LATEST VERSION OF: cloud-base.php (23kb)
DOWLOAD STANDARD SARATOGA ajaxWDwx.js: ajaxWDwx.js (84kb)

FULL DOWNLOAD: bws-script-cloudbase.zip (1.5mb)

SITES THAT USE THIS SCRIPT

If you use this script please email me your details and I will add your site to this list.

NAMIBIA
Walvis Bay Weather, Cellstop Namibia, Walvis Bay, Namibia

GERMANY
Wetter in Mülheim an der Ruhr, NRW, Deutschland

SWEDEN
Hässelmara Live Väder, Värmdö Sweden
Musses Väder, Tuna, Vimmerby, Sweden

USA
Sherman Weather, Sherman, Ct., USA
Meadowbrook Farm Weather, Harpers Ferry, West Virginia, USA
San Diego Weather at Mission Trails, San Diego, CA, USA
Angels Camp Weather, Greenhorn Creek, Angels Camp, California, USA
Saunook Weather, Saunook, NC, USA
Branford Weather Information Center, Branford, CT, USA
Relay Weather, Relay, Maryland, USA
South Erin Weather, Erin, New York, USA
Chuck's Weather, Glendive, Montana, USA
North Union Township, Fayette County, PA. USA
Start County, Ohio, USA
Cedar-Ridge Napavine Weather, WA, USA

CANADA
Leduc Weather, Leduc, Alberta, Canada
Cedar Hills Weather Online, Cedar Hills, Surrey, BC, Canada

AUSTRALIA
Gerroa & Gerringong Weather Station, Seven Mile Beach, Gerroa, New South Wales, Australia

UNITED KINGDOM
Weather Above, Staffordshire Nr Leek, England
Desborough Weather Station, Desborough, Northants, UK
Weybourne Weather, Farnham, Surrey, UK

ITALY
Osservatorio Meteo Masiera, Masiera di Bagnacavallo, Ravenna, EmiliaRomagna,Italia
Osservatorio Meteo Alena, Alena di Monteveglio, Bologna, Italia
Carmignano (Po), Tuscany, Italy

GREECE
Weather at Thessaloniki, Central Macedonia, Greece

NETHERLANDS
Weerstation Grave, Nederland
Weather in Ekeren and Port of Antwerp, Nederland

HUNGARY
Magyarország Kartal, Hungary