wetbulb?
Posted: Fri 24 Jan 2014 1:23 am
Hi Steve,
What formula does cumulus use to do wetbulb?
Thank Beau
What formula does cumulus use to do wetbulb?
Thank Beau
Support forum for Cumulus weather station software
https://cumulus.hosiene.co.uk/
Code: Select all
use these numbers
$Tc = -2.0555555555556
$RH = 51
$P = 1012.7337934
i get 3.9960679808406
cumulus 24.5
Code: Select all
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
# Project: Sample Included Website Design
# Module: sample.php
# Purpose: Sample Page
# Authors: Kevin W. Reed <kreed@tnet.com>
# TNET Services, Inc.
#
# Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once("common.php");
############################################################################
$TITLE = langtransstr($SITE['organ']) . " - " .langtransstr('wetbulb test page');
$showGizmo = true; // set to false to exclude the gizmo
include("top.php");
############################################################################
?>
</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
?>
<div id="main-copy">
<?php echo 'temperature: '.$WX['temp'];?><br />
<?php echo 'humidity: '.$WX['hum']; ?><br />
<?php echo '$baro: '.$WX['press']; ?>
<br />
<?php echo'wetbulb: '. $WX['wetbulb']; ?><br />
<?php
$Tc =($WX['temp']-32)/1.8;
$P = 33.8639 * $WX['press'];
$RH = $WX['hum'];
echo'$Tc = '. $Tc.'<br />';
echo'$RH = '. $RH.'<br />';
echo'$P = '. $P.'<br />';
echo'<br />';
//echo $tc;
$Tdc = (($Tc - (14.55 + 0.114 * $Tc) * (1 - (0.01 * $RH)) - ((2.5 + 0.007 * $Tc) *
(1 - (0.01 * $RH))) ^ 3 - (15.9 + 0.117 * $Tc) * (1 - (0.01 * $RH)) ^ 14));
$E = (6.11 * 10 ^ (7.5 * $Tdc / (237.7 + $Tdc)));
$WBc = (((0.00066 * $P) * $Tc) + ((4098 * $E) / (($Tdc + 237.7) ^ 2) * $Tdc)) / ((0.00066 * $P) + (4098 * $E) / (($Tdc + 237.7) ^ 2));
echo '<br />';
echo $WBc;
?>
</div><!-- end main-copy -->
<?php
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>
Code: Select all
$Tdc = (($Tc - (14.55 + 0.114 * $Tc) * (1 - (0.01 * $RH)) - pow((2.5 + 0.007 * $Tc) * (1 - (0.01 * $RH)) , 3) - (15.9 + 0.117 * $Tc) * pow(1 - (0.01 * $RH), 14)));
$E = (6.11 * pow(10 , (7.5 * $Tdc / (237.7 + $Tdc))));
$WBc = (((0.00066 * $P) * $Tc) + ((4098 * $E) / pow(($Tdc + 237.7) , 2) * $Tdc)) / ((0.00066 * $P) + (4098 * $E) / pow(($Tdc + 237.7) , 2));