Brad, I am getting better ... healthier ... cough, cough ... sneeze, sneeze ...
I thought that adding a pre-written template might be of help for others ... and myself, as I had to create one to test the script. My latest <link removed> page is displaying nine (yes 9!) 'cloudbase' scripts with different parameters (switches) activated - in two languages - there are even a few new parameters on that page that will only be available in a few days...
Yesterday (Tuesday) I managed to incorporate the Cumulus forecast texts ... Those phrases/texts do not tell me much about the weather ... what the f... does something like this mean: 'Fairly fine, possible showers early' ?? Not overly informative... How much easier it would be to read something like: 'Overcast. Risk of showers later in the day.' in an english everybody understand...
Anyway, the Cumulus phrases/terms are now being merged with other simple words to finally produce the forecast text that appears on the image. As I wrote above, additional parameters (switches) have been added to force the script to use the cloud height produce by Cumulus (or Weather Display), to add (or not) the station elevation (above sea level) to the cloud height (to produce a cloud height above seal level), to activate (or not) the use of a local METAR at night.
I have not been able to pass on any of the variables used in the 'cloudbase' script back to the page - more likely because the script is producing a dynamic image and nothing else can be written on the screen. The image with the weather information displayed below the image when using the 'html=1' parameter is not produce dynamically, the script first create an image, saves it in the same directory where the script is located and then loads the image back, adding the weather information below the image.
If requested, and to compensate for the missing 'hover the image cloud height information', I could release the lines of PHP code that are used to calculate the cloud height so those lines could be added to the page displaying the 'cloudbase' script...
actioman wrote:Ray Cumulus generates the following variable: 'LastRainTipISO' = Date / time of last rain gauge tip (eg 09/06/2010 06:09). I think from this information we can at least be able to show the last day of precipitation?
Manuel, this is what I have done on my main page...
Here are the line of code I am using inside the 'ajax-dashboard.php' script - starting below the line '<?php } // end show-depth-of-snow if needed ?>':
Code: Select all
<?php if ($WXsoftware == 'WD'){ ?>
<?php
if ($dayswithrain <= 0 and strip_units($dayrn) <= 0) {
$raindays = $dayswithnorain.' '.($dayswithnorain > 1 ? langtransstr('days since last rain'):langtransstr('day since last rain'));
} else {
$raindays = $dayswithrain.' '.($dayswithrain > 1 ? langtransstr('days of rain in'):langtransstr('day of rain in'));
$raindays = $raindays . ' '.substr($monthname,0,3);
}
?>
<tr><td colspan="2" class="data2" style="text-align: center; white-space: nowrap;"><?php echo $raindays; ?></td></tr>
<?php } // end WD dayswithnorain/dayswithrain display ?>
<?php
if ($WXsoftware == 'CU' and isset($dayswithnorain)){
$LastRainTip = explode(' ',$WX['LastRainTipISO']);
$LastRainDate = date($ShortdateFormat,strtotime($LastRainTip[0]));
$LastRainTime = fixup_time($LastRainTip[1]);
$rainwhen = langtransstr('at').' '.$LastRainTime.' '.langtransstr('on').' '.$LastRainDate;
if ($dayswithnorain > 0) {
$raindays = $dayswithnorain.' '.($dayswithnorain > 1 ? langtransstr('days since last rain'):langtransstr('day since last rain'));
} else {
$raindays = langtransstr('Last rain').':';
}
?>
<tr><td colspan="2" class="data2" style="text-align: center;"><?php echo $raindays; ?><br /><?php echo $rainwhen; ?></td></tr>
<?php } // end CU dayswithnorain display ?>
I modified the code this way so the '$dayswithrain' and '$dayswithnorain' (produced by Weather Display) can still be used and the data found into '$WX['LastRainTipISO']' (produced by Cumulus) can be used fully and produce something such as: '1 day since last rain
at 15:46 on 19-Apr'.
mike wrote:I am having a problem with the temperature in cloud base script. Mighty hot

Mike, it would have been nice if you had provided a link to your site...

...how is one suppose to check the information...
First, which version of the script are you using?
Second, I noticed a few other problems with the image - which problems have been corrected in the soon to be released version ...

In that image, not only is the temperature somewhat off (not to write wrong ... or, maybe, just maybe, the 38.3°F temperature might be wrong one and the 214°F one on the 'cloudbase' image might be right ... if you living next to hell...

) - the forecast is also missing. Have a look my 'cloudbase' test page (link above).