### CloudbaseCUHowTo.txt ### ### Documentation for cloudbaseCU.php script Version 1.5 ### This CloudBase script has been adapted from Bashewa's original Ver 2.1 script. The Original was for Weather Display, Virtual Weather Station and WUHU.) This version for Cumulus has been developed from the Original Bashewa script without reference to, or code from, any other Cloudbase script. ################################################################################ cloudbaseCU.php should be placed in the website main scripts folder The script is a php script and can be used on any webserver and any webpage providing the webserver supports php with the GD2 library Note, some of the graphic files in cb & cb\moon differ from the Bashewa originals and some of the originals have been removed. Modifications to the original include; Removal of various non-Cumulus related code Refined the scales on the graphic. Added feature to manipulate the display of raining cloud types and/or rain text over-riding metar so rain is only displayed if rain is current or very recent at the wx station. Refinement of metar decoding function; now uses the internal time of the metar report to determine refresh time (original used the file modification date on the file system) A significant number of minor modifications to improve code flow, efficiency and to refine output results. Enhanced reporting/diagnostics using cloudbaseCU.php?html=1 ################################################################################ We have been asked a number of questions which indicate that new users have not read this document or the notes beside the settings in the script. Please read this documentation fully before proceeding, and check the explanation beside each option in the script before making changes. Common questions relate to cloud height, Cumulus forecast vs metar, and, station elevation. Cumulus calculates the theoretical cloud height based on a standard formula which is virtually identical to the one built into this script. Use the Cumulus option to ensure any representation of cloud height is consist on the website. The theoretical cloud height is calculated using temperature and dew point. It does NOT mean there are actually any clouds. The cloud height is only displayed if clouds are displayed on the image (normally determined from forecast or metar). If the option $alwaysShowCloud is set to true, then if no clouds would have been shown, a fictitious cloud band is displayed with the theoretical cloud height. The intent of the Script is to show current conditions. However unless you have an instrument to gauge cloud conditions on the station (not supported by this script), then either forecast or history must be used. Cumulus provides forecast information via the Zambretti algorithm. This is a basic forecast for 12 to 24 hrs in the future. Metar provides historical information via observation typically at an airport and is either:- automatic (typically every 30 mins on the hour and half hour), or manual (typically every hour on the hour). Metar will always be more accurate at or near the observation location than a forecast would ever be. You have to decide which alternative is the better representation of the station's environment. There is an option $showCldSource to indicate the source of the cloud height (Metar or Forecast) - displayed in small text at the top of the image. Cumulus always outputs station Altitude Above Ground Level (AGL). Should you wish to show the cloud height Above Sea Level (ASL), then this can be achieved by setting $stationAltitude to match the Altitude set in the Cumulus Configuration/Station/Altitude setting. This Altitude will be added to the AGL cloud height by the script to display ASL. There is an option $showAGLASL which if set to true will display AGL or ASL (whichever is appropriate) beside the cloud height. Note this may not always be displayed as there is not always enough space for it - see the explanation in the script. INSTALLATION; 1. Unzip cloudbaseCU.zip into a local working folder on the PC A. Save the file cloudbaseCUT.txt into the C:\cumulus\web directory Use the Cumulus, Configuration, Internet, Files panel and select an unused entry. In the Local Filenames, press Browse and select the cloudbaseCUT.txt file as the local filename. In the Remote Filenames box, enter the webserver location and cloudbaseCU.txt as the Remote Filename to use (No 'T'). e.g. /servername/folder/cloudbaseCU.txt (same location as the other website files). Leave the Binary? box unchecked, Check the Process? box. Leave the Realtime? box unchecked. Check the FTP? box. Press OK on the Internet Settings dialog to close it and save the settings. B. a. Copy these files to the main sctipts folder in the webserver:- cloudbaseCU.php copy the cb and its sub-folder structure into the images folder creating ./images/cb (If the images folder does not exist, create it first) b. Check that the folder ./cache exists immediately below the main script folder, if it does not exist, create it. The Metar file is saved into this folder. It is best to have this folder as other scripts may use the folder and/or share the metar file c. Test cloudbaseCU.php. Open the website in the browser and change (or add to) the URL to include cloudbaseCU.php in place of index.php or whichever script name is there for the current page. This should generate the graphic. d. Additionally, the switches shown in the header of the script may be used to assist in trouble shooting, particularly http//www.mysite.com/cloudbaseCU.php?html=1 which will show the actual current data and code results. It will also create a copy of the graphic in the main script folder. e. Add cloudbaseCU.php to the we bpage at the place it is to display using; cloudbase Do NOT be tempted to change the size - everything is based around 100x200 and simply does not look good if scaled up or down. C. If using the Saratoga scripts and supporting translations, the relevant language blocks from the cloudbaseCUlang.txt file enclosed in the download package should be added the matching language-xx.txt file CUSTOMISATION; Use a PROPER EDITOR - NOT windows' notepad - suggest notepad++ as an alternative Check the settings in the section // !!! YOU MUST SET/CHECK THESE SETTINGS !!! and make sure they are correct for the location and website Translations; As noted above at C. - if using Saratoga and $translate = true; then the translations should be added to language-xx.txt files. If $translate = false; and you still want a different language displayed, you may edit the script directly. See the notes in the header in the script and edit the texts at the lines indicated as required. Sample data is provided in cloudbaseCUlang.txt and additional wind direction texts in cloudbaseCUWinDir.txt. NOTE:- these files are not complete but are all I have been able to find. You may also adjust the remaining settings but would recommend that the script be used as is until it is seen to be working properly, then change settings one at time so you can see the effect. Enjoy! BCJKiwi