Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Ground frost and new snow

Discussion of Jacques DesRoches's web site templates

Moderator: JacquesD

w9sbu
Posts: 1
Joined: Fri Sep 04, 2015 1:55 pm
Weather Station: Ambient WS-2080A
Operating System: Win7 Home Premium SP1
Location: Wisconsin

Ground frost and new snow

Postby w9sbu » Sun Dec 06, 2015 4:14 pm

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

User avatar
beteljuice
Posts: 2456
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: Ground frost and new snow

Postby beteljuice » Mon Dec 07, 2015 2:27 am

It does seem a little haphazard ..
... and shouldn't $frostdepth = "0.0"; be degrees of frost or am I missing something ?
Image
......................Imagine, what you will KNOW tomorrow !


Return to “Weather by You Templates”

Who is online

Users browsing this forum: No registered users and 1 guest