Page 1 of 1

Ground frost and new snow

Posted: Sun 06 Dec 2015 4:14 pm
by w9sbu
I wanted to add "new snow, water equivalent, Ground frost depth, and surface thaw" to index.php as well as snow this season and water equivalent for standing snow.

Create new php page "snow_frost_inc.php":

// Snow frost
$newsnow = "0.0";
$newwater= "0.00";
$snowdepth = "0.0";
$snowwater = "0.00";
$snowseason = "1.5";
$seasonwater = "0.10";
$frostdepth = "0.0";
$surfacethaw = "0.0";

// Section MEASURE UNITS
$newsnowunit = "in";
$snowunit = "in";
$frostunit = "in";
$surfacethawunit = "in";

Call this page into index.php
include('snow_frost_inc.php');
right below
include('wt_data_inc.php');

The variables must be added to your language file. I do not have translations yet.
$TT_SnowFrost = "Snow and Ground Frost @ 6am";
$TT_SFCapt = "( Recorded once daily around 6 am )";
$Tr_snowunit = "Snow units";
$Tr_frostunit = "Frost units";
$Tr_surfacethawunit = "Surface thaw units";
$Tr_newsnow = "New snow";
$Tr_newwater = "Water content";
$Tr_snowseason = "Snow this season";
$Tr_seasonwater = "Water content";
$Tr_snowdepth = "Snow depth";
$Tr_snowwater = "Water content";
$Tr_frostdepth = "Ground frost depth";
$Tr_surfacethaw = "Surface thaw";

Edit index_txt.php and add the section where you want it (under pressure...)

<td colspan="4" class="tableseparator"><?php echo $TT_SnowFrost; ?> <?php echo $TT_SFCapt; ?></td>
</tr><tr class="td_data">
<?php echo '<td>'.$Tr_newsnow.'</td><td>'.$newsnow.' '.$snowunit.'</td><td>'.$Tr_newwater.'</td><td>'.$newwater.' '.$frostunit.'</td>'; ?>
</tr><tr class="td_data">
<?php echo '<td>'.$Tr_snowdepth.'</td><td>'.$snowdepth.' '.$snowunit.'</td><td>'.$Tr_snowwater.'</td><td>'.$snowwater.' '.$surfacethawunit.'</td>'; ?>
</tr><tr class="td_data">
<?php echo '<td>'.$Tr_snowseason.'</td><td>'.$snowseason.' '.$snowunit.'</td><td>'.$Tr_seasonwater.'</td><td>'.$seasonwater.' '.$surfacethawunit.'</td>'; ?>
</tr><tr class="td_data">
<?php echo '<td>'.$Tr_frostdepth.'</td><td>'.$frostdepth.' '.$frostunit.'</td><td>'.$Tr_surfacethaw.'</td><td>'.$surfacethaw.' '.$surfacethawunit.'</td>'; ?>
</tr><tr>

Remove $snowdepth = "<#snowdepth>"; (line 597) from wt_data_inc.php

Each morning as needed edit "// Snow frost" in snow_frost_inc.php, save it and FTP to your server.

example:
http://w9sbu.wolf-running.com/weather/index.php

Re: Ground frost and new snow

Posted: Mon 07 Dec 2015 2:27 am
by beteljuice
It does seem a little haphazard ..
... and shouldn't $frostdepth = "0.0"; be degrees of frost or am I missing something ?