Re: is there a webtag for record yearly rainfall?
Posted: Fri 18 May 2012 10:37 pm
Yes, but the point is that you have to edit it on Jan 1st anyway if it's changed.
Support forum for Cumulus weather station software
https://cumulus.hosiene.co.uk/
Oh, I get it now. I'm not storing the value anywhere am I, of course I have to re-enter it on 1st Jan.steve wrote:Yes, but the point is that you have to edit it on Jan 1st anyway if it's changed.
Code: Select all
$wettestyearamnt = 'whatever value your highest yearly rainfall is';
$wettestyear = 'whatever that wettest year is';
if($wettestyearamnt > $ryear)
$wettestyearamnt=$wettestyearamnt;
else
($wettestyearamnt=$ryear) && ($wettestyear=$year);
$driestyearamnt = 'whatever value your lowest yearly rainfall is';
$driestyear = 'whatever that driest year is';
if($driestyearamnt < $ryear)
$driestyearamnt=$driestyearamnt;
else
($driestyearamnt=$ryear) && ($driestyear=$year);Code: Select all
<tr class="td_data">
<td>Wettest Year</td>
<td><?php print $wettestyearamnt;?> <?php print $rainunit;?> </td>
<td><?php print $wettestyear;?></td>
</tr>
<tr class="td_data">
<td>Driest Year</td>
<td><?php print $driestyearamnt;?> <?php print $rainunit;?> </td>
<td><?php print $driestyear;?></td>
</tr>Hope that helps someone else.I might have added wettest/driest year to the all-time records before next Jan 1st anyway