-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathforecast3wularge.php
243 lines (240 loc) · 21.2 KB
/
forecast3wularge.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<?php include_once('livedata.php');error_reporting(0); date_default_timezone_set($TZ);
//original weather34 script original css/svg/php by weather34 2015-2019 clearly marked as original by weather34//
####################################################################################################
# HOME WEATHER STATION TEMPLATE by BRIAN UNDERDOWN 2016-17-18-19 #
# CREATED FOR HOMEWEATHERSTATION TEMPLATE at https://weather34.com/homeweatherstation/ #
# LARGE DAY WU WEATHER FORECAST: original MAR 2019 #
# https://www.weather34.com #
####################################################################################################
//start the wu output
$json='jsondata/wuforecast.txt';
$weather34wuurl=file_get_contents($json);
$parsed_weather34wujson = json_decode($weather34wuurl,false);
{ if ($parsed_weather34wujson->{'daypart'}[0]->{'iconCode'}[0]==null){
$wuskydayIcon=$parsed_weather34wujson->{'daypart'}[0]->{'iconCode'}[1];$wuskydayTime = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[1];
$wuskydayTempHigh = $parsed_weather34wujson->{'daypart'}[0]->{'temperature'}[1];$wuskydayTempLow = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureWindChill'}[1];
$wuskydayWindGust = $parsed_weather34wujson->{'daypart'}[0]->{'windSpeed'}[1];$wuskydayWinddir = $parsed_weather34wujson->{'daypart'}[0]->{'windDirection'}[1];
$wuskydayWinddircardinal = $parsed_weather34wujson->{'daypart'}[0]->{'windDirectionCardinal'}[1];$wuskydayacumm = $parsed_weather34wujson->{'daypart'}[0]->{'snowRange'}[1];
$wuskydayPrecipType = $parsed_weather34wujson->{'daypart'}[0]->{'precipType'}[1];$wuskydayprecipIntensity = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[1];
$wuskydayPrecipProb = $parsed_weather34wujson->{'daypart'}[0]->{'precipChance'}[1];$wuskydayUV = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[1];
$wuskydayUVdesc = $parsed_weather34wujson->{'daypart'}[0]->{'uvDescription'}[1];$wuskydaysnow = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[1];
$wuskydaysummary = $parsed_weather34wujson->{'daypart'}[0]->{'narrative'}[1];$wuskydaynight = $parsed_weather34wujson->{'daypart'}[0]->{'dayOrNight'}[1];
$wuskydesc = $parsed_weather34wujson->{'daypart'}[0]->{'wxPhraseLong'}[1];$wuskythunder = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[1];
$wuskyhumidity = $parsed_weather34wujson->{'daypart'}[0]->{'relativeHumidity'}[1];
$wuskyheatindex = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[1];
$wuskywindchill = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureWindChill'}[1];
}
else {
$wuskydayIcon=$parsed_weather34wujson->{'daypart'}[0]->{'iconCode'}[0];$wuskydayTime = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[0];
$wuskydayTempHigh = $parsed_weather34wujson->{'daypart'}[0]->{'temperature'}[0];$wuskydayTempLow = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureWindChill'}[0];
$wuskydayWindGust = $parsed_weather34wujson->{'daypart'}[0]->{'windSpeed'}[0];$wuskydayWinddir = $parsed_weather34wujson->{'daypart'}[0]->{'windDirection'}[0];
$wuskydayWinddircardinal = $parsed_weather34wujson->{'daypart'}[0]->{'windDirectionCardinal'}[0];$wuskydayacumm = $parsed_weather34wujson->{'daypart'}[0]->{'snowRange'}[0];
$wuskydayPrecipType = $parsed_weather34wujson->{'daypart'}[0]->{'precipType'}[0];$wuskydayprecipIntensity = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[0];
$wuskydayPrecipProb = $parsed_weather34wujson->{'daypart'}[0]->{'precipChance'}[0];$wuskydayUV = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[0];
$wuskydayUVdesc = $parsed_weather34wujson->{'daypart'}[0]->{'uvDescription'}[0];$wuskydaysnow = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[0];
$wuskydaysummary = $parsed_weather34wujson->{'daypart'}[0]->{'narrative'}[0];$wuskydaynight = $parsed_weather34wujson->{'daypart'}[0]->{'dayOrNight'}[0];
$wuskydesc = $parsed_weather34wujson->{'daypart'}[0]->{'wxPhraseLong'}[0];$wuskythunder = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[0];
$wuskyhumidity = $parsed_weather34wujson->{'daypart'}[0]->{'relativeHumidity'}[0];
$wuskyheatindex = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[0];
$wuskywindchill = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureWindChill'}[0];
}
//thunder
$wuskythunder1 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[1];
$wuskythunder2 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[2];
$wuskythunder3 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[3];
$wuskythunder4 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[4];
$wuskythunder5 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[5];
$wuskythunder6 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[6];
$wuskythunder7 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[7];
$wuskythunder8 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[8];
$wuskythunder9 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[9];
$wuskythunder10 = $parsed_weather34wujson->{'daypart'}[0]->{'thunderIndex'}[10];
//period
$wuskydayTime1 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[1];
$wuskydayTime2 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[2];
$wuskydayTime3 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[3];
$wuskydayTime4 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[4];
$wuskydayTime5 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[5];
$wuskydayTime6 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[6];
$wuskydayTime7 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[7];
$wuskydayTime8 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[8];
$wuskydayTime9 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[9];
$wuskydayTime10 = $parsed_weather34wujson->{'daypart'}[0]->{'daypartName'}[10];
//rain
$wuskyrain1 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[1];
$wuskyrain2 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[2];
$wuskyrain3 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[3];
$wuskyrain4 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[4];
$wuskyrain5 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[5];
$wuskyrain6 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[6];
$wuskyrain7 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[7];
$wuskyrain8 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[8];
$wuskyrain9 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[9];
$wuskyrain10 = $parsed_weather34wujson->{'daypart'}[0]->{'qpf'}[10];
//snow
$wuskysnow1 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[1];
$wuskysnow2 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[2];
$wuskysnow3 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[3];
$wuskysnow4 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[4];
$wuskysnow5 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[5];
$wuskysnow6 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[6];
$wuskysnow7 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[7];
$wuskysnow8 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[8];
$wuskysnow9 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[9];
$wuskysnow10 = $parsed_weather34wujson->{'daypart'}[0]->{'qpfSnow'}[10];
//heatindex
$wuskyheatindex1 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[1];
$wuskyheatindex2 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[2];
$wuskyheatindex3 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[3];
$wuskyheatindex4 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[4];
$wuskyheatindex5 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[5];
$wuskyheatindex6 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[6];
$wuskyheatindex7 = $parsed_weather34wujson->{'daypart'}[0]->{'temperatureHeatIndex'}[7];
//uv index
$wuskydayUV1 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[1];
$wuskydayUV2 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[2];
$wuskydayUV3 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[3];
$wuskydayUV4 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[4];
$wuskydayUV5 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[5];
$wuskydayUV6 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[6];
$wuskydayUV7 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[7];
$wuskydayUV8 = $parsed_weather34wujson->{'daypart'}[0]->{'uvIndex'}[8];
}?>
<div class="updatedtime1"><?php $forecastime=filemtime('jsondata/wuforecast.txt');$weather34wuurl = file_get_contents("jsondata/wuforecast.txt");if(filesize('jsondata/wuforecast.txt')<1){echo "".$offline. "";}else echo $online,"";echo " ",date($timeFormat,$forecastime); ?></div>
<div class="wulargeforecasthome"><div class="wulargediv">
<?php //begin wu stuff
//convert lightning index
if ( $wuskythunder==0 ){$wuskythunder=$lightningalert8.' No Thunder Storm';}else if ( $wuskythunder==1 ){$wuskythunder=$lightningalert8.' Thunder Storm Risk';}
else if ( $wuskythunder==2 ){$wuskythunder=$lightningalert8.' Thunder Storm';}else if ( $wuskythunder>=3 ){$wuskythunder=$lightningalert8.' Severe Thunderstorm';}
//wu convert temps-rain-wind
//metric to F
if ($tempunit=='F' && $wuapiunit=='m' ){$wuskydayTempHigh=($wuskydayTempHigh*9/5)+32;}
if ($tempunit=='F' && $wuapiunit=='m' ){$wuskyheatindex=($wuskyheatindex*9/5)+32;}
if ($tempunit=='F' && $wuapiunit=='m' ){$wuskywindchill=($wuskywindchill*9/5)+32;}
// metric to F UK
if ($tempunit=='F' && $wuapiunit=='h' ){$wuskydayTempHigh=($wuskydayTempHigh*9/5)+32;}
if ($tempunit=='F' && $wuapiunit=='h' ){$wuskyheatindex=($wuskyheatindex*9/5)+32;}
if ($tempunit=='F' && $wuapiunit=='h' ){$wuskywindchill=($wuskywindchill*9/5)+32;}
// ms non metric to c Scandinavia
if ($tempunit=='F' && $wuapiunit=='s'){$wuskydayTempHigh=($wuskydayTempHigh*30);}
if ($tempunit=='F' && $wuapiunit=='s'){$wuskyheatindex=($wuskyheatindex*30);}
if ($tempunit=='F' && $wuapiunit=='s'){$wuskywindchill=($wuskywindchill*30);}
// non metric to c US
if ($tempunit=='C' && $wuapiunit=='e' ){$wuskydayTempHigh=($wuskydayTempHigh-32)/1.8;}
if ($tempunit=='C' && $wuapiunit=='e' ){$wuskyheatindex=($wuskyheatindex-32)/1.8;}
if ($tempunit=='C' && $wuapiunit=='e' ){$wuskywindchill=($wuskywindchill-32)/1.8;}
//wind
// mph to kmh US
if ($windunit=='km/h' && $wuapiunit=='e' ){$wuskydayWindGust=(number_format($wuskydayWindGust,1)*1.60934);}
// mph to kmh UK
if ($windunit=='km/h' && $wuapiunit=='h' ){$wuskydayWindGust=(number_format($wuskydayWindGust,1)*1.60934);}
//mph to ms US
if ($windunit=='m/s' && $wuapiunit=='e' ){$wuskydayWindGust=(number_format($wuskydayWindGust,1)*0.44704);}
//mph to ms uk
if ($windunit=='m/s' && $wuapiunit=='h' ){$wuskydayWindGust=(number_format($wuskydayWindGust,1)*0.44704);}
//kmh to ms
if ($windunit=='m/s' && $wuapiunit=='m' ){$wuskydayWindGust=(number_format($wuskydayWindGust,1)*0.277778);}
//kmh to mph
if ($windunit=='mph' && $wuapiunit=='m' ){$wuskydayWindGust=(number_format($wuskydayWindGust,1)*0.621371);}
//rain inches to mm
if ($rainunit=='mm' && $wuapiunit=='e' ){$wuskydayprecipIntensity=$wuskydayprecipIntensity*25.4;}
//rain mm to inches scandinavia
if ($rainunit=='in' && $wuapiunit=='s' ){$wuskydayprecipIntensity=$wuskydayprecipIntensity*0.0393701;}
//rain mm to inches uk
if ($rainunit=='in' && $wuapiunit=='h' ){$wuskydayprecipIntensity2=$wuskydayprecipIntensity2*0.0393701;}
//rain mm to inches metric
if ($rainunit=='in' && $wuapiunit=='m' ){$wuskydayprecipIntensity=$wuskydayprecipIntensity*0.0393701;}
//icon + day wu
echo '<div class="wulargeforecastinghome">';echo '<div class="wulargeweekdayhome">'.$wuskydayTime.'s Forecast</div><div class=wulargehomeicons>';
if ($wuskydaynight=='D'){echo '<img src="css/wuicons/'.$wuskydayIcon.'.svg" width="50" height="40" alt="'.$wuskydesc.'" title="'.$wuskydesc.'"></img>';}
if ($wuskydaynight=='N'){echo '<img src="css/wuicons/nt_'.$wuskydayIcon.'.svg" width="50" height="40" alt="'.$wuskydesc.'" title="'.$wuskydesc.'"></img>';}
echo '</div><wulargetempdesc><value>'.$wuskydesc.'<value></wulargetempdesc><br>';
//temp non metric wu
if($tempunit=='F' && $wuskydayTempHigh<44.6){echo '<wulargetemphihome><bluewu>'.number_format($wuskydayTempHigh,0).'°<wuunits>F</wuunits></bluewu></wulargetemphihome>';}
else if($tempunit=='F' && $wuskydayTempHigh>104){echo '<wulargetemphihome><purplewu>'.number_format($wuskydayTempHigh,0).'°<wuunits>F</wuunits></purplewu></wulargetemphihome>';}
else if($tempunit=='F' && $wuskydayTempHigh>80.6){echo '<wulargetemphihome><redwu>'.number_format($wuskydayTempHigh,0).'°<wuunits>F</wuunits></redwu></wulargetemphihome>';}
else if($tempunit=='F' && $wuskydayTempHigh>64.4){echo '<wulargetemphihome><orangewu>'.number_format($wuskydayTempHigh,0).'°<wuunits>F</wuunits></orangewu></wulargetemphihome>';}
else if($tempunit=='F' && $wuskydayTempHigh>55){echo '<wulargetemphihome><yellowwu>'.number_format($wuskydayTempHigh,0).'°<wuunits>F</wuunits></yellowwu></wulargetemphihome>';}
else if($tempunit=='F' && $wuskydayTempHigh>=44.6){echo '<wulargetemphihome><greenwu>'.number_format($wuskydayTempHigh,0).'°<wuunits>F</wuunits></greenwu></wulargetemphihome>';}
//temp metric wu
else if($wuskydayTempHigh<7){echo '<wulargetemphihome><bluewu>'.number_format($wuskydayTempHigh,0).'°<wuunits>C</wuunits></bluewu></wulargetemphihome>';}
else if($wuskydayTempHigh>40){echo '<wulargetemphihome><purplewu>'.number_format($wuskydayTempHigh,0).'°<wuunits>C</wuunits></purplewu></wulargetemphihome>';}
else if($wuskydayTempHigh>27){echo '<wulargetemphihome><redwu>'.number_format($wuskydayTempHigh,0).'°<wuunits>C</wuunits></redwu></wulargetemphihome>';}
else if($wuskydayTempHigh>18){echo '<wulargetemphihome><orangewu>'.number_format($wuskydayTempHigh,0).'°<wuunits>C</wuunits></orangewu></wulargetemphihome>';}
else if($wuskydayTempHigh>12.7){echo '<wulargetemphihome><yellowwu>'.number_format($wuskydayTempHigh,0).'°<wuunits>C</wuunits></yellowwu></wulargetemphihome>';}
else if($wuskydayTempHigh>=7){echo '<wulargetemphihome><greenwu>'.number_format($wuskydayTempHigh,0).'°<wuunits>C</wuunits></greenwu></wulargetemphihome>';}
//wind wu
echo "<div class='wulargewindspeedicon'> Winds from <blueu>";
echo $wuskydayWinddircardinal;
echo " </blueu>at ".$windalert2." <div class=wuwindspeed> ".number_format($wuskydayWindGust,0)," <wuunits>".$windunit;echo '</wuunits></div></div>';'<br><br>';
echo "<div class='wulargerain'>";
//snow wu
if ( $wuskydaysnow>0 && $rainunit=='in'){ echo ' Snowfall Accumulation '.$snowflakesvg.' <wulargetempwindhome><oblue> '.$wuskydaysnow.'</oblue><wuunits> in</wuunits>';}
else if ( $wuskydaysnow>0 && $rainunit=='mm'){ echo 'Snowfall Accumulation '.$snowflakesvg.' <wulargetempwindhome><oblue> '.$wuskydaysnow.'</oblue><wuunits> cm</wuunits>';}
//rain wu
else if ($wuskydayPrecipType='rain' && $rainunit=='in'){echo 'Rainfall Accumulation '.$rainsvg.' <div class=wurainfall>'. number_format($wuskydayprecipIntensity,2).' <wuunits>'.$rainunit.'</wuunits></div>';}
else if ($wuskydayPrecipType='rain' && $rainunit=='mm'){echo 'Rainfall Accumulation '.$rainsvg.' <div class=wurainfall>'. number_format($wuskydayprecipIntensity,1).' <wuunits>'.$rainunit.'</wuunits></div>';}
//uvindex wu
echo '<br><div class=wulargeuvindex>UV Index <wuuvicon>☼</wuuvicon>';
if ($wuskydayUV>=10){echo "<purplewuv>".$wuskydayUV. '</purplewuv><wuinfo>'.$wuskydayUVdesc;}
else if ($wuskydayUV>7){echo "<redwuv>".$wuskydayUV. '</redwuv><wuinfo> '.$wuskydayUVdesc;}
else if ($wuskydayUV>5){echo "<orangewuv>".$wuskydayUV. '</orangewuv><wuinfo> '.$wuskydayUVdesc;}
else if ($wuskydayUV>2){echo "<yellowwuv>".$wuskydayUV. '</yellowwuv><wuinfo> '.$wuskydayUVdesc;}
else if ($wuskydayUV>0){echo "<greenwuv>".$wuskydayUV. '</greenwuv><wuinfo>'.$wuskydayUVdesc;}
else if ($wuskydayUV==0){echo "<greywuv>".$wuskydayUV. '</greywuv><wuinfo> No Caution';}echo '</div>';
///wuheat index F
echo "<div class=wulargeheatindex>";
if ($tempunit=='F' && $wuskyheatindex>=84.2){echo "Heat Index ".$heatindexwu."<heatindexwu>".number_format($wuskyheatindex,0). '°<wuunits>F</wuunits></heatindexwu>';}
//wu heat index C
if ($tempunit=='C' && $wuskyheatindex>=29){echo "Heat Index ".$heatindexwu." <heatindexwu>".number_format($wuskyheatindex,0). '°<wuunits>C</wuunits></heatindexwu>';}
//lightning wu
echo '</div><div class=wulargeheatindex style="margin-top:27px;width:16em;margin-left:98px">';
if ($wuskythunder>0 ) {echo 'Thunderstorms expected '.$wuskydayTime.' </wuthunder2>';}
else if ($wuskythunder1>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime1. ' '.$lightningalert8.'';}
else if ($wuskythunder2>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime2. ' '.$lightningalert8.'';}
else if ($wuskythunder3>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime3. ' '.$lightningalert8.'';}
else if ($wuskythunder4>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime4. ' '.$lightningalert8.'';}
else if ($wuskythunder5>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime5. ' '.$lightningalert8.'';}
else if ($wuskythunder6>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime6. ' '.$lightningalert8.'';}
else if ($wuskythunder7>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime7. ' '.$lightningalert8.'';}
else if ($wuskythunder8>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime8. ' '.$lightningalert8.'';}
else if ($wuskythunder9>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime9. ' '.$lightningalert8.'';}
else if ($wuskythunder10>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime10. ' '.$lightningalert8.'';}
//snowfall wu
else if ($wuskysnow>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime. ' '.$freezing.'';}
else if ($wuskysnow1>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime1. ' '.$freezing.'';}
else if ($wuskysnow2>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime2. ' '.$freezing.'';}
else if ($wuskysnow3>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime3. ' '.$freezing.'';}
else if ($wuskysnow4>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime4. ' '.$freezing.'';}
else if ($wuskysnow5>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime5. ' '.$freezing.'';}
else if ($wuskysnow6>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime6. ' '.$freezing.'';}
else if ($wuskysnow7>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime7. ' '.$freezing.'';}
else if ($wuskysnow8>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime8. ' '.$freezing.'';}
else if ($wuskysnow9>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime9. ' '.$freezing.'';}
else if ($wuskysnow10>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime10. ' '.$freezing.'';}
//rainfall wu
else if ($wuskyrain>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime. ' '.$rainfallalert8.'';}
else if ($wuskyrain1>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime1.' '.$rainfallalert8.'';}
else if ($wuskyrain2>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime2.' '.$rainfallalert8.'';}
else if ($wuskyrain3>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime3. ' '.$rainfallalert8.'';}
else if ($wuskyrain4>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime4. ' '.$rainfallalert8.'';}
else if ($wuskyrain5>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime5. ' '.$rainfallalert8.'';}
else if ($wuskyrain6>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime6. ' '.$rainfallalert8.'';}
else if ($wuskyrain7>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime7. ' '.$rainfallalert8.'';}
else if ($wuskyrain8>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime8. ' '.$rainfallalert8.'';}
else if ($wuskyrain9>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime9. ' '.$rainfallalert8.'';}
else if ($wuskyrain10>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime10. ' '.$rainfallalert8.'';}
//heat index today caution wu
else if ($tempunit=='C' && $wuskyheatindex>29 ) {echo $infowu.'<wuheatindex>Heat Index </wuheatindex>High '.$wuskydayTime. ' '.$lightningalert8.'';}
else if ($tempunit=='F' && $wuskyheatindex>84 ) {echo $infowu.'<wuheatindex>Heat Index </wuheatindex>High '.$wuskydayTime. ' '.$lightningalert8.'';}
//uv index wu
else if ($wuskydayUV1>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime1.' '.$lightningalert8.'';}
else if ($wuskydayUV2>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime2.' '.$lightningalert8.'';}
else if ($wuskydayUV3>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime3. ' '.$lightningalert8.'';}
else if ($wuskydayUV4>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime4. ' '.$lightningalert8.'';}
else if ($wuskydayUV5>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime5. ' '.$lightningalert8.'';}
else if ($wuskydayUV6>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime6. ' '.$lightningalert8.'';}
else if ($wuskydayUV7>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime7. ' '.$lightningalert8.'';}
else if ($wuskydayUV8>6 ) {echo $infowu.'<ored>High UV </ored> '.$wuskydayTime8. ' '.$lightningalert8.'';}
else echo $lightningalert8. " No Cautions";
echo '</div>';?></div></div></div>