check-fetch-times.php Version 1.56 - 16-Mar-2024

Website PHP information

Running on webhost 'www.komokaweather.com' @ IP='198.12.220.99' (reverse IP Name='p3plzcpnl499907.prod.phx3.secureserver.net')
Webserver OS: Linux p3plzcpnl499907.prod.phx3.secureserver.net 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
PHP Version: 8.0.30 built for Linux
PHP cmd location: /opt/alt/php80/usr/bin/php
Document root: /home/psoykkrhjuz3/public_html
Template root: /home/psoykkrhjuz3/public_html/komokaweather-ca
allow_url_fopen = ON
allow_url_include = off
request_order = GP
Stream support for http is available
Stream support for https is available
Streams supported: compress.bzip2, compress.zlib, data, file, ftp, ftps, glob, http, https, phar, php
Socket transports: ssl, sslv3, tcp, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3, udg, udp, unix

Contents of Weather Data files

Settings-weather.php permissions=-rw-r--r-- [0644]

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
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-World-ML template set)
############################################################################
#
#    Project:    Sample Included Website Design
#    Module:        Settings-weather.php
#    Purpose:    Provides the Site Settings Used Throughout the Site
#     Authors:    Kevin W. Reed <kreed@tnet.com>
#                TNET Services, Inc.
#               Ken True <webmaster@saratoga-weather.org>
#               Saratoga-Weather.org
#
#     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
############################################################################
//Version 1.01 - 27-Aug-2011 - added $SITE['NOAAdir'] for Cumulus NOAA-style reports
//Version 1.02 - 21-Sep-2011 - added setting for feelslike temperature
//Version 1.03 - 31-Mar-2012 - added $SITE['overrideRain'] to settings
//Version 1.04 - 13-Mar-2020 - update link url for software download
global $SITE;
#---------------------------------------------------------------------------
#  required settings for Cumulus software
#---------------------------------------------------------------------------
$SITE['WXtags']        = 'CUtags.php';    // for weather variables
$SITE['ajaxScript']     = 'ajaxCUwx.js';   // for AJAX enabled display
$SITE['realtimefile']   = '../weather/realtime.txt';  // directory and name of Cumulus realtime.txt file
$SITE['graphImageDir']  = '../weather/images/';     // directory location for graph images with trailing /
#---------------------------------------------------------------------------
# For NOAA reports
$SITE['NOAAdir']        = '../weather/reports/';   // relative location of the NOAA report files
# Weather Station sensors and options for dashboard
$SITE['conditionsMETAR'] = 'CYXU';  // set to nearby METAR for current conditions icon/text
#  comment out conditionsMETAR if no nearby METAR.. conditions icon/text will not be displayed
#
$SITE['overrideRain']   = true// =true then rain rate will set rain words instead of METAR rain words
#                               // =false - no change to METAR rain words (station rain rate not used)
$SITE['feelslike']      = 0;     // =0 use HeatIndex, =1 use Humidex, =2 use Apparent Temperature
$SITE['DavisVP']    = true;  // set to false if not a Davis VP weather station
$SITE['UV']        = true;  // set to false if no UV sensor
$SITE['SOLAR']        = true;  // set to false if no Solar sensor
#
##########################################################################
# end of configurable settings
#
#---------------------------------------------------------------------------
# do NOT change these settings below
$SITE['WXsoftware']     = 'CU';
$SITE['WXsoftwareURL']  = 'https://cumuluswiki.org/a/Software';
$SITE['WXsoftwareLongName'] = 'Cumulus'// will adjust to 'CumulusMX' for version 3+ detected
$SITE['ajaxDashboard']  = 'ajax-dashboard.php';
$SITE['trendsPage']     = 'CU-trends-inc.php'// CU-specific trends page
$SITE['showSnow']    = false;   // do not toggle snow panel.. Snow depth will be displayed if available
$SITE['showSnowTemp']     = -60;      // disabled feature for Cumulus

?>

CUtags.php permissions=-rw-r--r-- [0644]

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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
<?php
/*
 File: CUtags.txt

 Purpose: load Cumulus variables into a $WX[] array for use with the Canada/World/USA template sets

 Instructions:  
 Save this page as CUtags.txt and place in your cumulus\web directory
 
 Use the Cumulus, Configuration, Internet, Files panel select an unused entry.

 In the Local Filenames, press Browse and select the CUtags.txt file as the local filename.
 In the Remote Filenames box, enter the directory and CUtags.php as the Remote Filename to use. 
 Leave the Binary? box unchecked,
 Check the Process? box.
 Leave the Realtime? box unchecked.
 Check the FTP? box.
 
 Press OK on the Internet Settings dialog to close it and save the settings.


 Author: Ken True - webmaster@saratoga-weather.org

 (created by gen-CUtags.php - V1.07 - 02-Jan-2013)

 These tags generated on 2013-01-02 20:01:30 GMT
   From tags.txt updated 2013-01-02 20:01:32 GMT
 These tags generated on 2012-09-23 BCJKiwi for Cumulus Build 1047
 These tags generated on 2014-05-10 BCJKiwi for Cumulus Build 1094
 These tags revised 2015-03-28 BCJKiwi for Cumulus Build 1099 & MX

*/
// --------------------------------------------------------------------------

// allow viewing of generated source

if (isset($_REQUEST["sce"]) and strtolower($_REQUEST["sce"]) == "view" ) {
//--self downloader --
   
$filenameReal __FILE__;
   
$download_size filesize($filenameReal);
   
header("Pragma: public");
   
header("Cache-Control: private");
   
header("Cache-Control: no-cache, must-revalidate");
   
header("Content-type: text/plain");
   
header("Accept-Ranges: bytes");
   
header("Content-Length: $download_size");
   
header("Connection: close");
   
   
// readfile($filenameReal);
   
exit;
}
$WXsoftware 'CU';  
$defsFile 'CU-defs.php';  // filename with $varnames = $WX['CU-varnames']; equivalents
 
$rawdatalines = <<<END_OF_RAW_DATA_LINES
time|11:45 on 09 May 2024:|:
date|09/05/2024:|:
version|1.9.4:|:
build|10992:|:
update|09/05/2024 11:45:01 AM:|:
AllocatedMemory|104.05 MB:|:
altimeterpressure|1009.51:|:
altitude|817&nbsp;ft:|:
apptemp|12.5:|:
apptempH|43.4:|:
apptempL|-33.7:|:
apptempTH|13.8:|:
apptempTL|4.6:|:
apptempYH|20.3:|:
apptempYL|8.4:|:
avgbearing|77:|:
avgtemp|9.8:|:
avgtempY|15.5:|:
battery|4.54v:|:
bearing|84:|:
BearingRangeFrom|42:|:
BearingRangeFrom10|040:|:
BearingRangeTo|104:|:
BearingRangeTo10|110:|:
bearingTM|91:|:
bearingYM|260:|:
beaudesc|Gentle breeze:|:
beaufort|F3:|:
beaufortnumber|3:|:
ByMonthAppTempH|38.0:|:
ByMonthAppTempHT|at 3:25 PM on 31 May 2011:|:
ByMonthAppTempL|-7.2:|:
ByMonthAppTempLT|at 1:19 AM on 09 May 2020:|:
ByMonthDailyRainH|54.8:|:
ByMonthDailyRainHT|on 28 May 2013:|:
ByMonthDewPointH|26.0:|:
ByMonthDewPointHT|at 1:50 PM on 25 May 2009:|:
ByMonthDewPointL|-26.4:|:
ByMonthDewPointLT|at 7:26 PM on 18 May 2023:|:
ByMonthGustH|83.5:|:
ByMonthGustHT|at 3:51 PM on 04 May 2018:|:
ByMonthHeatIndexH|39.5:|:
ByMonthHeatIndexHT|at 3:25 PM on 31 May 2011:|:
ByMonthHighDailyTempRange|23.8:|:
ByMonthHighDailyTempRangeT|on 23 May 2015:|:
ByMonthHourlyRainH|19.0:|:
ByMonthHourlyRainHT|at 11:40 PM on 07 May 2024:|:
ByMonthHumH|100:|:
ByMonthHumHT|at 7:59 AM on 13 May 2009:|:
ByMonthHumL|5:|:
ByMonthHumLT|at 7:26 PM on 18 May 2023:|:
ByMonthLongestDryPeriod|15:|:
ByMonthLongestDryPeriodT|to 18 May 2023:|:
ByMonthLongestWetPeriod|9:|:
ByMonthLongestWetPeriodT|to 04 May 2019:|:
ByMonthLowDailyTempRange|1.5:|:
ByMonthLowDailyTempRangeT|on 25 May 2017:|:
ByMonthMaxTempL|5.8:|:
ByMonthMaxTempLT|at 3:02 PM on 08 May 2020:|:
ByMonthMinTempH|21.5:|:
ByMonthMinTempHT|at 6:44 AM on 31 May 2018:|:
ByMonthMonthlyRainH|127.2:|:
ByMonthMonthlyRainHT|May 2010:|:
ByMonthPressH|1032.99:|:
ByMonthPressHT|at 9:01 AM on 14 May 2015:|:
ByMonthPressL|986.43:|:
ByMonthPressLT|at 2:06 PM on 01 May 2023:|:
ByMonthRainRateH|523.6:|:
ByMonthRainRateHT|at 8:15 AM on 11 May 2020:|:
ByMonthTempH|32.8:|:
ByMonthTempHT|at 2:43 PM on 28 May 2018:|:
ByMonthTempL|-3.7:|:
ByMonthTempLT|at 6:16 AM on 13 May 2020:|:
ByMonthWChillL|-7.9:|:
ByMonthWChillLT|at 1:17 AM on 09 May 2020:|:
ByMonthWindH|40.7:|:
ByMonthWindHT|at 3:56 PM on 04 May 2018:|:
ByMonthWindRunH|446.2:|:
ByMonthWindRunHT|on 18 May 2020:|:
chillhours|3485.3:|:
cloudbase|1795 m:|:
cloudbaseunit|m:|:
cloudbasevalue|1795:|:
ConsecutiveDryDays|0:|:
ConsecutiveRainDays|2:|:
cooldegdays|0.0:|:
cooldegdaysY|0.6:|:
CpuCount|4:|:
CpuName|AMD A6-3620 APU with Radeon(tm) HD Graphics:|:
cumulusforecast|Fine, possible showers:|:
cumulusforecastenc|Fine, possible showers:|:
currcond|:|:
currcondenc|:|:
CurrentSolarMax|873:|:
currentwdir|E:|:
dailygraphperiod|31:|:
DataStopped|0:|:
DavisFirmwareVersion|1.75:|:
DavisMaxInARow|973:|:
DavisNumberOfResynchs|0:|:
DavisNumCRCerrors|20:|:
DavisTotalPacketsMissed|42:|:
DavisTotalPacketsReceived|10488:|:
dawn|05:37:|:
day|09:|:
daylength|14:26:|:
daylightlength|15:30:|:
dayname|Thursday:|:
DaysSince30Dec1899|45421.4896046528:|:
DaysSinceRecordsBegan|5767:|:
dew|2.0:|:
dewpointH|28.2:|:
dewpointL|-32.2:|:
dewpointTH|3.8:|:
dewpointTL|-1.9:|:
dewpointYH|7.9:|:
dewpointYL|2.2:|:
DiskFree|440.51 GB:|:
DiskSize|907.7 GB:|:
DisplayMode|1920x1080, 32 bit:|:
domwindbearing|83:|:
domwindbearingY|310:|:
domwinddir|E:|:
domwinddirY|NW:|:
dusk|21:07:|:
ErrorLight|1:|:
ET|1.09:|:
ExtraDP1|0.0:|:
ExtraDP2|0.0:|:
ExtraDP3|0.0:|:
ExtraDP4|0.0:|:
ExtraDP5|0.0:|:
ExtraDP6|0.0:|:
ExtraDP7|0.0:|:
ExtraDP8|0.0:|:
ExtraDP9|0.0:|:
ExtraDP10|0.0:|:
ExtraHum1|0:|:
ExtraHum2|0:|:
ExtraHum3|0:|:
ExtraHum4|0:|:
ExtraHum5|0:|:
ExtraHum6|0:|:
ExtraHum7|0:|:
ExtraHum8|0:|:
ExtraHum9|0:|:
ExtraHum10|0:|:
ExtraTemp1|0.0:|:
ExtraTemp2|0.0:|:
ExtraTemp3|0.0:|:
ExtraTemp4|0.0:|:
ExtraTemp5|0.0:|:
ExtraTemp6|0.0:|:
ExtraTemp7|0.0:|:
ExtraTemp8|0.0:|:
ExtraTemp9|0.0:|:
ExtraTemp10|0.0:|:
forecast| Increasing clouds with little temperature change. :|:
forecastenc| Increasing clouds with little temperature change. :|:
forecastnumber|5:|:
forum|:<a href="http://sandaysoft.com/forum/">forum</a>::|:
graphperiod|48:|:
gustM|85.7:|:
heatdegdays|4.2:|:
heatdegdaysY|3.4:|:
heatindex|16.4:|:
heatindexH|48.7:|:
heatindexTH|16.8:|:
heatindexYH|22.5:|:
HighAppTempRecordSet|0:|:
HighDailyRainRecordSet|0:|:
HighDailyTempRange|26.4:|:
HighDewPointRecordSet|0:|:
HighHeatIndexRecordSet|0:|:
HighHourlyRainRecordSet|0:|:
HighHumidityRecordSet|0:|:
HighMinTempRecordSet|0:|:
HighMonthlyRainRecordSet|0:|:
HighPressAlarm|0:|:
HighPressureRecordSet|0:|:
HighRainRateAlarm|0:|:
HighRainRateRecordSet|0:|:
HighRainTodayAlarm|0:|:
HighTempAlarm|0:|:
HighTempRangeRecordSet|0:|:
HighTempRecordSet|0:|:
HighWindGustAlarm|0:|:
HighWindGustRecordSet|0:|:
HighWindrunRecordSet|0:|:
HighWindSpeedAlarm|0:|:
HighWindSpeedRecordSet|0:|:
hour|11:|:
hourlyrainTH|0.0:|:
hourlyrainYH|18.6:|:
hum|50:|:
humH|100:|:
humidex|16.4:|:
HumidityRecordSet|0:|:
humL|5:|:
humTH|77:|:
humTL|49:|:
humYH|78:|:
humYL|42:|:
inhum|34:|:
intemp|26.9:|:
interval|5:|:
isdaylight|1:|:
IsFreezing|0:|:
IsRaining|0:|:
IsSunny|1:|:
IsSunUp|1:|:
LastDataReadT|09/05/2024 11:44:58 AM:|:
LastRainTipISO|2024-05-08 00:14:|:
LastRainTip|at 00:14 on 08/05/2024:|:
LastRainTipTime|at 00:14:|:
LatestError|FTP Connect Timeout:|:
LatestErrorDate|09/05/2024:|:
LatestErrorTime|12:00 AM:|:
LatestNOAAMonthlyReport|NOAAMO0524.txt:|:
LatestNOAAYearlyReport|NOAAYR2024.txt:|:
latitude|N&nbsp;42&deg;&nbsp;57&#39;&nbsp;36&quot;:|:
latitudedms|N&nbsp;42&deg;&nbsp;57&#39;&nbsp;36&quot;:|:
latitudedp6|42.960000:|:
LeafTemp1|0.0:|:
LeafTemp2|0.0:|:
LeafWetness1|0:|:
LeafWetness2|0:|:
Light|0.0:|:
location|komoka village:|:
LongestDryPeriod|21:|:
LongestDryPeriodRecordSet|0:|:
LongestWetPeriod|12:|:
LongestWetPeriodRecordSet|0:|:
longitude|W&nbsp;81&deg;&nbsp;26&#39;&nbsp;18&quot;:|:
longitudedms|W&nbsp;81&deg;&nbsp;26&#39;&nbsp;18&quot;:|:
longitudedp6|-81.438333:|:
longlocation|Komoka, ON  Canada (just west of London, Ontario):|:
LowAppTempRecordSet|0:|:
LowDailyTempRange|0.9:|:
LowDewPointRecordSet|0:|:
LowHumidityRecordSet|0:|:
LowMaxTempRecordSet|0:|:
LowPressAlarm|0:|:
LowPressureRecordSet|0:|:
LowTempAlarm|0:|:
LowTempRangeRecordSet|0:|:
LowTempRecordSet|0:|:
LowWindChillRecordSet|0:|:
maxtempL|-17.2:|:
MemoryStatus|2954/7642 MB (free/total):|:
metdate|09/05/2024:|:
metdateyesterday|08/05/2024:|:
mintempH|24.4:|:
minute|45:|:
MinutesSinceLastRainTip|:|:
month|05:|:
MonthAppTempH|25.8:|:
MonthAppTempHD|01 May:|:
MonthAppTempHT|6:02 PM:|:
MonthAppTempL|3.9:|:
MonthAppTempLD|01 May:|:
MonthAppTempLT|6:29 AM:|:
MonthDailyRainH|19.0:|:
MonthDailyRainHD|07 May:|:
MonthDewPointH|13.3:|:
MonthDewPointHD|04 May:|:
MonthDewPointHT|2:43 PM:|:
MonthDewPointL|-3.8:|:
MonthDewPointLD|07 May:|:
MonthDewPointLT|5:39 PM:|:
MonthGustH|55.6:|:
MonthGustHD|08 May:|:
MonthGustHT|12:59 PM:|:
MonthHeatIndexH|25.4:|:
MonthHeatIndexHD|01 May:|:
MonthHeatIndexHT|4:55 PM:|:
MonthHighDailyTempRange|19.7:|:
MonthHighDailyTempRangeD|01 May:|:
MonthHourlyRainH|19.0:|:
MonthHourlyRainHD|07 May:|:
MonthHourlyRainHT|11:40 PM:|:
MonthHumH|79:|:
MonthHumHD|04 May:|:
MonthHumHT|10:57 PM:|:
MonthHumL|23:|:
MonthHumLD|07 May:|:
MonthHumLT|5:39 PM:|:
MonthLongestDryPeriod|2:|:
MonthLongestDryPeriodD|02 May:|:
MonthLongestWetPeriod|2:|:
MonthLongestWetPeriodD|08 May:|:
MonthLowDailyTempRange|5.6:|:
MonthLowDailyTempRangeD|03 May:|:
MonthMaxTempL|17.3:|:
MonthMaxTempLD|03 May:|:
MonthMinTempH|11.8:|:
MonthMinTempHD|04 May:|:
monthname|May:|:
MonthPressH|1019.31:|:
MonthPressHD|06 May:|:
MonthPressHT|9:25 AM:|:
MonthPressL|999.80:|:
MonthPressLD|08 May:|:
MonthPressLT|1:51 AM:|:
MonthRainRateH|106.6:|:
MonthRainRateHD|07 May:|:
MonthRainRateHT|11:26 PM:|:
MonthTempH|25.4:|:
MonthTempHD|01 May:|:
MonthTempHT|4:55 PM:|:
MonthTempL|5.7:|:
MonthTempLD|01 May:|:
MonthTempLT|6:29 AM:|:
MonthWChillL|5.7:|:
MonthWChillLD|01 May:|:
MonthWChillLT|6:29 AM:|:
MonthWindH|23.5:|:
MonthWindHD|08 May:|:
MonthWindHT|1:24 PM:|:
MonthWindRunH|225.1:|:
MonthWindRunHD|04 May:|:
MoonAge|1:|:
MoonPercent|3:|:
MoonPercentAbs|3:|:
moonphase|Waxing Crescent:|:
moonrise|06:47:|:
moonset|22:57:|:
newrecord|0:|:
nextwindindex|3447:|:
OsLanguage|English:|:
OsVersion|Windows 8 x64 build 9200:|:
press|1009.66:|:
PressChangeDownAlarm|0:|:
PressChangeUpAlarm|0:|:
pressH|1045.31:|:
pressL|975.93:|:
pressTH|1010.47:|:
pressTL|1009.11:|:
presstrend|Falling slowly:|:
presstrendenglish|Falling:|:
presstrendval|-0.08:|:
pressunit|hPa:|:
PressureRecordSet|0:|:
pressYH|1009.62:|:
pressYL|999.80:|:
ProgramUpTime|1 day 2 hours:|:
r24hour|0.0:|:
RainRecordSet|0:|:
rainunit|mm:|:
RCapptempTH|13.8:|:
RCapptempTL|4.6:|:
RCdew|2.0:|:
RCdewpointTH|3.8:|:
RCdewpointTL|-1.9:|:
RCheatindex|16.4:|:
RCheatindexTH|16.8:|:
RChum|50:|:
RCinhum|34:|:
RCintemp|26.9:|:
RCpress|1009.66:|:
RCpressTH|1010.47:|:
RCpressTL|1009.11:|:
RCRecentDewPoint|2.0:|:
RCRecentHeatIndex|16.4:|:
RCRecentOutsideTemp|16.4:|:
RCRecentPressure|1009.66:|:
RCRecentRainToday|0.0:|:
RCRecentUV|4.9:|:
RCRecentWindChill|16.4:|:
RCRecentWindGust|34.2:|:
RCRecentWindLatest|8.5:|:
RCRecentWindSpeed|15.0:|:
RCrfall|0.0:|:
RCrrate|0.0:|:
RCrrateTM|0.0:|:
RCtemp|16.4:|:
RCtempTH|16.8:|:
RCtempTL|6.3:|:
RCwchill|16.4:|:
RCwchillTL|6.3:|:
RCwgust|34.2:|:
RCwgustTM|34.2:|:
RCwlatest|8.5:|:
RCwspeed|15.0:|:
realtimeinterval|8:|:
RecentDewPoint|2.0:|:
RecentDewPoint m=5|1.3:|:
RecentDewPoint m=10|1.4:|:
RecentDewPoint m=15|1.8:|:
RecentDewPoint m=20|2.6:|:
RecentDewPoint m=30|2.1:|:
RecentDewPoint m=45|2.3:|:
RecentDewPoint m=60|2.5:|:
RecentDewPoint m=75|2.7:|:
RecentDewPoint m=90|2.6:|:
RecentDewPoint m=105|3.0:|:
RecentDewPoint m=120|2.8:|:
RecentDewPoint h=3|1.2:|:
RecentDewPoint h=6|-1.2:|:
RecentDewPoint h=12|2.2:|:
RecentDewPoint h=18|5.5:|:
RecentDewPoint h=24|6.1:|:
RecentHeatIndex|16.4:|:
RecentHeatIndex m=5|15.9:|:
RecentHeatIndex m=10|16.1:|:
RecentHeatIndex m=15|16.2:|:
RecentHeatIndex m=20|16.6:|:
RecentHeatIndex m=30|16.5:|:
RecentHeatIndex m=45|16.3:|:
RecentHeatIndex m=60|15.8:|:
RecentHeatIndex m=75|14.8:|:
RecentHeatIndex m=90|14.4:|:
RecentHeatIndex m=105|13.9:|:
RecentHeatIndex m=120|13.6:|:
RecentHeatIndex h=3|10.6:|:
RecentHeatIndex h=6|6.9:|:
RecentHeatIndex h=12|10.1:|:
RecentHeatIndex h=18|16.9:|:
RecentHeatIndex h=24|21.4:|:
RecentHumidity|50:|:
RecentHumidity m=5|49:|:
RecentHumidity m=10|49:|:
RecentHumidity m=15|50:|:
RecentHumidity m=20|51:|:
RecentHumidity m=30|50:|:
RecentHumidity m=45|51:|:
RecentHumidity m=60|54:|:
RecentHumidity m=75|58:|:
RecentHumidity m=90|59:|:
RecentHumidity m=105|63:|:
RecentHumidity m=120|63:|:
RecentHumidity h=3|69:|:
RecentHumidity h=6|74:|:
RecentHumidity h=12|77:|:
RecentHumidity h=18|62:|:
RecentHumidity h=24|49:|:
RecentOutsideTemp|16.4:|:
RecentOutsideTemp m=5|15.9:|:
RecentOutsideTemp m=10|16.1:|:
RecentOutsideTemp m=15|16.2:|:
RecentOutsideTemp m=20|16.6:|:
RecentOutsideTemp m=30|16.5:|:
RecentOutsideTemp m=45|16.3:|:
RecentOutsideTemp m=60|15.8:|:
RecentOutsideTemp m=75|14.8:|:
RecentOutsideTemp m=90|14.4:|:
RecentOutsideTemp m=105|13.9:|:
RecentOutsideTemp m=120|13.6:|:
RecentOutsideTemp h=3|10.6:|:
RecentOutsideTemp h=6|6.9:|:
RecentOutsideTemp h=12|10.1:|:
RecentOutsideTemp h=18|16.9:|:
RecentOutsideTemp h=24|21.4:|:
RecentPressure|1009.66:|:
RecentPressure m=5|1009.55:|:
RecentPressure m=10|1009.52:|:
RecentPressure m=15|1009.49:|:
RecentPressure m=20|1009.55:|:
RecentPressure m=30|1009.42:|:
RecentPressure m=45|1009.45:|:
RecentPressure m=60|1009.66:|:
RecentPressure m=75|1009.93:|:
RecentPressure m=90|1009.93:|:
RecentPressure m=105|1009.89:|:
RecentPressure m=120|1009.99:|:
RecentPressure h=3|1009.89:|:
RecentPressure h=6|1009.59:|:
RecentPressure h=12|1009.45:|:
RecentPressure h=18|1006.84:|:
RecentPressure h=24|1002.44:|:
RecentRainToday|0.0:|:
RecentRainToday m=5|0.0:|:
RecentRainToday m=10|0.0:|:
RecentRainToday m=15|0.0:|:
RecentRainToday m=20|0.0:|:
RecentRainToday m=30|0.0:|:
RecentRainToday m=45|0.0:|:
RecentRainToday m=60|0.0:|:
RecentRainToday m=75|0.0:|:
RecentRainToday m=90|0.0:|:
RecentRainToday m=105|0.0:|:
RecentRainToday m=120|0.0:|:
RecentRainToday h=3|0.0:|:
RecentRainToday h=6|0.0:|:
RecentRainToday h=12|0.2:|:
RecentRainToday h=18|0.2:|:
RecentRainToday h=24|0.2:|:
RecentSolarRad|698:|:
RecentSolarRad m=5|510:|:
RecentSolarRad m=10|380:|:
RecentSolarRad m=15|396:|:
RecentSolarRad m=20|770:|:
RecentSolarRad m=30|640:|:
RecentSolarRad m=45|752:|:
RecentSolarRad m=60|738:|:
RecentSolarRad m=75|687:|:
RecentSolarRad m=90|640:|:
RecentSolarRad m=105|645:|:
RecentSolarRad m=120|585:|:
RecentSolarRad h=3|364:|:
RecentSolarRad h=6|0:|:
RecentSolarRad h=12|0:|:
RecentSolarRad h=18|446:|:
RecentSolarRad h=24|817:|:
RecentTS|11:45 AM 09/05/2024:|:
RecentUV|4.9:|:
RecentUV m=5|4.3:|:
RecentUV m=10|2.6:|:
RecentUV m=15|2.5:|:
RecentUV m=20|3.1:|:
RecentUV m=30|3.4:|:
RecentUV m=45|3.8:|:
RecentUV m=60|3.4:|:
RecentUV m=75|3.0:|:
RecentUV m=90|2.7:|:
RecentUV m=105|2.4:|:
RecentUV m=120|2.0:|:
RecentUV h=3|1.0:|:
RecentUV h=6|0.0:|:
RecentUV h=12|0.0:|:
RecentUV h=18|1.2:|:
RecentUV h=24|4.4:|:
RecentWindAvgDir|77:|:
RecentWindAvgDir m=5|77:|:
RecentWindAvgDir m=10|83:|:
RecentWindAvgDir m=15|91:|:
RecentWindAvgDir m=20|85:|:
RecentWindAvgDir m=30|77:|:
RecentWindAvgDir m=45|76:|:
RecentWindAvgDir m=60|84:|:
RecentWindAvgDir m=75|73:|:
RecentWindAvgDir m=90|76:|:
RecentWindAvgDir m=105|75:|:
RecentWindAvgDir m=120|83:|:
RecentWindAvgDir h=3|95:|:
RecentWindAvgDir h=6|0:|:
RecentWindAvgDir h=12|76:|:
RecentWindAvgDir h=18|335:|:
RecentWindAvgDir h=24|279:|:
RecentWindChill|16.4:|:
RecentWindChill m=5|15.9:|:
RecentWindChill m=10|14.4:|:
RecentWindChill m=15|16.2:|:
RecentWindChill m=20|16.4:|:
RecentWindChill m=30|16.5:|:
RecentWindChill m=45|16.2:|:
RecentWindChill m=60|15.8:|:
RecentWindChill m=75|14.8:|:
RecentWindChill m=90|14.2:|:
RecentWindChill m=105|13.1:|:
RecentWindChill m=120|10.7:|:
RecentWindChill h=3|9.4:|:
RecentWindChill h=6|6.9:|:
RecentWindChill h=12|10.1:|:
RecentWindChill h=18|16.9:|:
RecentWindChill h=24|21.4:|:
RecentWindDir|84:|:
RecentWindDir m=5|74:|:
RecentWindDir m=10|69:|:
RecentWindDir m=15|82:|:
RecentWindDir m=20|94:|:
RecentWindDir m=30|79:|:
RecentWindDir m=45|49:|:
RecentWindDir m=60|68:|:
RecentWindDir m=75|76:|:
RecentWindDir m=90|73:|:
RecentWindDir m=105|88:|:
RecentWindDir m=120|72:|:
RecentWindDir h=3|126:|:
RecentWindDir h=6|0:|:
RecentWindDir h=12|0:|:
RecentWindDir h=18|323:|:
RecentWindDir h=24|299:|:
RecentWindGust|34.2:|:
RecentWindGust m=5|34.2:|:
RecentWindGust m=10|25.7:|:
RecentWindGust m=15|27.8:|:
RecentWindGust m=20|27.8:|:
RecentWindGust m=30|25.7:|:
RecentWindGust m=45|29.9:|:
RecentWindGust m=60|27.8:|:
RecentWindGust m=75|25.7:|:
RecentWindGust m=90|27.8:|:
RecentWindGust m=105|32.1:|:
RecentWindGust m=120|29.9:|:
RecentWindGust h=3|19.3:|:
RecentWindGust h=6|0.0:|:
RecentWindGust h=12|8.5:|:
RecentWindGust h=18|25.7:|:
RecentWindGust h=24|47.1:|:
RecentWindLatest|8.5:|:
RecentWindLatest m=5|10.6:|:
RecentWindLatest m=10|21.4:|:
RecentWindLatest m=15|10.6:|:
RecentWindLatest m=20|15.0:|:
RecentWindLatest m=30|6.4:|:
RecentWindLatest m=45|12.9:|:
RecentWindLatest m=60|6.4:|:
RecentWindLatest m=75|4.3:|:
RecentWindLatest m=90|10.6:|:
RecentWindLatest m=105|15.0:|:
RecentWindLatest m=120|27.8:|:
RecentWindLatest h=3|12.9:|:
RecentWindLatest h=6|0.0:|:
RecentWindLatest h=12|0.0:|:
RecentWindLatest h=18|12.9:|:
RecentWindLatest h=24|8.5:|:
RecentWindSpeed|15.0:|:
RecentWindSpeed m=5|17.2:|:
RecentWindSpeed m=10|15.0:|:
RecentWindSpeed m=15|15.0:|:
RecentWindSpeed m=20|12.9:|:
RecentWindSpeed m=30|12.9:|:
RecentWindSpeed m=45|12.9:|:
RecentWindSpeed m=60|12.9:|:
RecentWindSpeed m=75|10.6:|:
RecentWindSpeed m=90|12.9:|:
RecentWindSpeed m=105|15.0:|:
RecentWindSpeed m=120|12.9:|:
RecentWindSpeed h=3|8.5:|:
RecentWindSpeed h=6|0.0:|:
RecentWindSpeed h=12|2.1:|:
RecentWindSpeed h=18|8.5:|:
RecentWindSpeed h=24|17.2:|:
recordsbegandate|25 July 2008:|:
rfall|0.0:|:
rfallH|79.8:|:
rfallhH|55.4:|:
rfallmH|198.2:|:
rfallY|0.2:|:
RG11RainToday|0.0:|:
RG11RainYest|0.0:|:
rhour|0.0:|:
rmidnight|0.0:|:
rmonth|27.8:|:
rollovertime|midnight:|:
rrate|0.0:|:
rrateM|1440.0:|:
rrateTM|0.0:|:
rrateYM|0.0:|:
ryear|357.6:|:
SensorContactLost|0:|:
shortdayname|Thu:|:
shortmonthname|May:|:
shortyear|24:|:
snowdepth|0:|:
SoilMoisture1|0:|:
SoilMoisture2|0:|:
SoilMoisture3|0:|:
SoilMoisture4|0:|:
SoilTemp1|0.0:|:
SoilTemp2|0.0:|:
SoilTemp3|0.0:|:
SoilTemp4|0.0:|:
SolarRad|698:|:
solarTH|902:|:
solarYH|1134:|:
stationtype|Vantage Pro 2 Plus with 24-Hr FARS:|:
StormRain|0.0:|:
StormRainStart|-----:|:
sunrise|06:09:|:
sunset|20:35:|:
SunshineHours|4.0:|:
SystemUpTime|70 days 22 hours:|:
TapptempH|at 4:39 PM on 26 August 2009:|:
TapptempL|at 6:55 AM on 20 February 2015:|:
TapptempTH|11:24:|:
TapptempTL|06:41:|:
TapptempYH|11:35:|:
TapptempYL|23:18:|:
Tbeaudesc|Gentle breeze:|:
Tbeaufort|F3:|:
Tbeaufortnumber|3:|:
TdewpointH|at 3:45 PM on 07 April 2012:|:
TdewpointL|at 6:59 AM on 20 February 2015:|:
TdewpointTH|10:43:|:
TdewpointTL|06:52:|:
TdewpointYH|14:29:|:
TdewpointYL|23:42:|:
temp|16.4:|:
TempChangeDownAlarm|0:|:
TempChangeLastHour|+0.7:|:
TempChangeUpAlarm|0:|:
tempH|35.8:|:
tempL|-29.8:|:
temprange|10.5:|:
temprangeY|12.4:|:
TempRecordSet|0:|:
tempTH|16.8:|:
tempTL|6.3:|:
temptrend|+1.9:|:
temptrendenglish|Rising:|:
temptrendtext|Rising:|:
tempunit|&deg;C:|:
tempunitnodeg|C:|:
tempYH|22.5:|:
tempYL|10.1:|:
TgustM|at 10:03 AM on 03 August 2017:|:
TheatindexH|at 2:59 PM on 26 August 2009:|:
TheatindexTH|11:19:|:
TheatindexYH|13:10:|:
THighDailyTempRange|on 01 July 2018:|:
ThourlyrainTH|00:00:|:
ThourlyrainYH|00:00:|:
THSWindex|0.0:|:
ThumH|at 6:56 AM on 30 March 2011:|:
ThumL|at 7:26 PM on 18 May 2023:|:
ThumTH|00:00:|:
ThumTL|11:20:|:
ThumYH|23:01:|:
ThumYL|13:05:|:
THWindex|14.8:|:
timehhmmss|11:45:01:|:
timehhmm|11:45:|:
timeUTC|15:45 on 09 May 2024:|:
TLongestDryPeriod|to 10 June 2023:|:
TLongestWetPeriod|to 12 April 2008:|:
TLowDailyTempRange|on 26 November 2008:|:
TmaxtempL|at 11:06 PM on 01 July 2014:|:
TmintempH|at 5:47 AM on 21 July 2011:|:
tomorrowdaylength|There will be 2min 19s more daylight tomorrow:|:
TpressH|at 2:54 AM on 13 February 2018:|:
TpressL|at 10:43 PM on 09 January 2024:|:
TpressTH|01:07:|:
TpressTL|03:12:|:
TpressYH|23:30:|:
TpressYL|01:51:|:
TrfallH|on 22 September 2021:|:
TrfallhH|at 2:28 AM on 23 June 2015:|:
TrfallmH|July 2023:|:
TrrateM|at 9:32 AM on 31 March 2020:|:
TrrateTM|00:00:|:
TrrateYM|00:00:|:
TsolarTH|11:41:|:
TsolarYH|14:09:|:
TtempH|at 4:44 PM on 21 July 2011:|:
TtempL|at 6:55 AM on 20 February 2015:|:
TtempTH|11:19:|:
TtempTL|06:41:|:
TtempYH|13:10:|:
TtempYL|23:17:|:
TUVTH|11:44:|:
TUVYH|13:56:|:
TwchillH|at 1:08 AM on 01 July 2014:|:
TwchillTL|06:41:|:
TwchillYL|21:59:|:
TwgustTM|11:39:|:
TwgustYM|12:59:|:
TwindrunH|on 02 April 2024:|:
TwindTM|11:07:|:
TwindYM|13:24:|:
TwspeedH|at 3:56 PM on 04 May 2018:|:
txbattery|TX Battery Status: 1-ok   2-ok   3-ok   4-ok   5-ok   6-ok   7-ok   8-ok   :|:
txbattery1|ok:|:
txbattery2|ok:|:
txbattery3|ok:|:
txbattery4|ok:|:
txbattery5|ok:|:
txbattery6|ok:|:
txbattery7|ok:|:
txbattery8|ok:|:
UV|4.9:|:
UVTH|4.9:|:
UVYH|6.0:|:
vpstormrainstart|-----:|:
vpstormrain|0.0:|:
wchill|16.4:|:
wchillH|-38.2:|:
wchillTL|6.3:|:
wchillYL|8.3:|:
wdir|ENE:|:
wdirdata|Array not required:|:
webcam|:<a href="http://www.komokaweather.com/pictures/sebec/image.jpg">webcam</a>::|:
wetbulb|10.2:|:
wgust|34.2:|:
wgustTM|34.2:|:
wgustYM|55.6:|:
WindRecordSet|0:|:
WindRoseData|Array not required:|:
WindRosePoints|16:|:
windrun|49.2:|:
windrunH|523.6:|:
windrununit|km:|:
windrunY|177.7:|:
WindSampleCount|3600:|:
windTM|17.2:|:
windunit|km/h:|:
windYM|23.5:|:
wlatest|8.5:|:
wsforecast| Increasing clouds with little temperature change. :|:
wsforecastenc| Increasing clouds with little temperature change. :|:
wspddata|Array not required:|:
wspeed|15.0:|:
wspeedH|40.7:|:
Ybeaudesc|Moderate breeze:|:
Ybeaufort|F4:|:
Ybeaufortnumber|4:|:
year|2024:|:
YearAppTempH|25.8:|:
YearAppTempHD|01 May:|:
YearAppTempHT|6:02 PM:|:
YearAppTempL|-23.0:|:
YearAppTempLD|15 January:|:
YearAppTempLT|4:56 AM:|:
YearDailyRainH|34.6:|:
YearDailyRainHD|11 April:|:
YearDewPointH|13.3:|:
YearDewPointHD|04 May:|:
YearDewPointHT|2:43 PM:|:
YearDewPointL|-24.7:|:
YearDewPointLD|17 January:|:
YearDewPointLT|12:22 AM:|:
YearGustH|68.5:|:
YearGustHD|12 April:|:
YearGustHT|10:56 PM:|:
YearHeatIndexH|25.4:|:
YearHeatIndexHD|01 May:|:
YearHeatIndexHT|4:55 PM:|:
YearHighDailyTempRange|20.9:|:
YearHighDailyTempRangeD|09 April:|:
YearHourlyRainH|19.0:|:
YearHourlyRainHD|07 May:|:
YearHourlyRainHT|11:40 PM:|:
YearHumH|81:|:
YearHumHD|24 January:|:
YearHumHT|11:22 AM:|:
YearHumL|23:|:
YearHumLD|26 April:|:
YearHumLT|10:00 AM:|:
YearLongestDryPeriod|7:|:
YearLongestDryPeriodD|26 February:|:
YearLongestWetPeriod|6:|:
YearLongestWetPeriodD|13 January:|:
YearLowDailyTempRange|1.5:|:
YearLowDailyTempRangeD|03 January:|:
YearMaxTempL|-10.3:|:
YearMaxTempLD|15 January:|:
YearMinTempH|15.6:|:
YearMinTempHD|28 April:|:
YearMonthlyRainH|129.2:|:
YearMonthlyRainHD|April:|:
YearPressH|1035.16:|:
YearPressHD|21 January:|:
YearPressHT|10:30 AM:|:
YearPressL|975.93:|:
YearPressLD|09 January:|:
YearPressLT|10:43 PM:|:
YearRainRateH|106.6:|:
YearRainRateHD|07 May:|:
YearRainRateHT|11:26 PM:|:
YearTempH|25.4:|:
YearTempHD|01 May:|:
YearTempHT|4:55 PM:|:
YearTempL|-18.4:|:
YearTempLD|15 January:|:
YearTempLT|5:40 AM:|:
YearWChillL|-26.1:|:
YearWChillLD|17 January:|:
YearWChillLT|1:56 AM:|:
YearWindH|32.1:|:
YearWindHD|02 April:|:
YearWindHT|9:57 PM:|:
YearWindRunH|523.6:|:
YearWindRunHD|02 April:|:
yesterday|08/05/2024:|:
YSunshineHours|11.5:|:
END_OF_RAW_DATA_LINES;

// end of generation script

// put data in  array
//
$WX = array();
global 
$WX;
$WXComment = array();
$data explode(":|:",$rawdatalines);
$nscanned 0;
foreach (
$data as $v => $line) {
  list(
$vname,$vval,$vcomment) = explode("|",trim($line).'|||');
  if(
substr($vname,0,1) == "#") { //
    
continue; // ignore comment records
  
}
  if (
$vname <> "") {
    
$WX[$vname] = trim($vval);
    if(
$vcomment <> "") { $WXComment[$vname] = trim($vcomment); }
  }
  
$nscanned++;
}
if(isset(
$_REQUEST['debug'])) {
  print 
"<!-- loaded $nscanned $WXsoftware \$WX[] entries -->\n";
}

if (isset(
$_REQUEST["sce"]) and strtolower($_REQUEST["sce"]) == "dump" ) {

  print 
"<pre>\n";
  print 
"// \$WX[] array size = $nscanned entries.\n";
  foreach (
$WX as $key => $val) {
      
$t =  "\$WX['$key'] = '$val';";
      if(isset(
$WXComment[$key])) {$t .=  $WXComment[$key]"; }
      print 
"$t\n";
  }
  print 
"</pre>\n";
  exit;
}

if(
file_exists("CU-defs.php")) { include_once("CU-defs.php"); }
?>

CU-defs.php permissions=-rw-r--r-- [0644]

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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
<?php
/*
 File: CU-defs.php

 Purpose: provide a bridge to naming of weather variables from the native Cumulus software package to
          Weather-Display names used in common scripts like ajax-dashboard.php and ajax-gizmo.php

 
 Author: Ken True - webmaster@saratoga-weather.org

 (created by gen-defs.php - V1.08 - 12-Jan-2013)
 Generated on 2013-01-14 11:01:26 PST

//Version CU-defs.php - V1.11 - 13-May-2020

*/
// --------------------------------------------------------------------------

// allow viewing of generated source

if (isset($_REQUEST["sce"]) and strtolower($_REQUEST["sce"]) == "view" ) {
//--self downloader --
   
$filenameReal __FILE__;
   
$download_size filesize($filenameReal);
   
header("Pragma: public");
   
header("Cache-Control: private");
   
header("Cache-Control: no-cache, must-revalidate");
   
header("Content-type: text/plain");
   
header("Accept-Ranges: bytes");
   
header("Content-Length: $download_size");
   
header("Connection: close");
   
   
readfile($filenameReal);
   exit;
}
$WXsoftware 'CU';  
// this has WD $varnames = $WX['CU-varnames']; equivalents
 
$uomtemp $WX['tempunit'];
$uombaro $WX['pressunit'];
$uomwind $WX['windunit'];
$uomrain $WX['rainunit'];
$uomdistance $WX['windrununit'];
$time  substr($WX['time'],0,5); // calculated value
$date $WX['date'];
$sunrise $WX['sunrise'];
$sunset $WX['sunset'];
$moonrise $WX['moonrise'];
$moonset $WX['moonset'];
$moonphase $WX['MoonPercentAbs'];
$hoursofpossibledaylight $WX['daylength'];
$stationlatitude $WX['latitude'];
$stationlongitude $WX['longitude'];
$windowsuptime $WX['SystemUpTime'];
$freememory $WX['MemoryStatus'];
$Startimedate $WX['ProgramUpTime'];
$wdversion  $WX['version'].'-b'.$WX['build']; // calculated value
$wdbuild $WX['build'];
if(
substr($wdversion,0,1) > '1') {$SITE['WXsoftwareLongName'] .= 'MX'; }
$timeofnextupdate  date('H:i',strtotime(CUfixupTime($time))+$WX['interval']*60); // calculated value
$temperature $WX['temp'];
$tempnodp  round(preg_replace('|,|','.',$WX['temp']),0); // calculated value
$humidity $WX['hum'];
$dewpt $WX['dew'];
$maxtemp $WX['tempTH'];
$maxtempt $WX['TtempTH'];
$mintemp $WX['tempTL'];
$mintempt $WX['TtempTL'];
$heati $WX['heatindex'];
$heatinodp  round(preg_replace('|,|','.',$WX['heatindex']),0); // calculated value
$windch $WX['wchill'];
$windchnodp  round(preg_replace('|,|','.',$WX['wchill']),0); // calculated value
$humidex $WX['humidex'];
$apparenttemp $WX['apptemp'];
$tempchangehour $WX['temptrend'];
$maxtempyest $WX['tempYH'];
$maxtempyestt $WX['TtempYH'];
$mintempyest $WX['tempYL'];
$mintempyestt $WX['TtempYL'];
if(isset(
$WX['RecentOutsideTemp h=24'])) { $temp24hoursago $WX['RecentOutsideTemp h=24']; } // beta tag
if(isset($WX['RecentHumidity m=60'])){$humchangelasthour=$WX['hum']-$WX['RecentHumidity m=60'];} // conditional value
if(isset($WX['RecentDewPoint m=60'])){$dewchangelasthour=$WX['dew']-$WX['RecentDewPoint m=60'];} // conditional value
if(isset($WX['RecentPressure m=60'])){$barochangelasthour=$WX['press']-$WX['RecentPressure m=60'];} // conditional value
$avgspd $WX['wspeed'];
$gstspd $WX['wgust'];
$maxgst $WX['wgustTM'];
$maxgstt $WX['TwgustTM'];
$dirlabel $WX['wdir'];
$baro $WX['press'];
$trend $WX['presstrendval'];
$pressuretrendname $WX['presstrend'];
$pressuretrendname3hour $WX['presstrendenglish'];
$vpforecasttext $WX['wsforecast'];
$dayrn $WX['rfall'];
$monthrn $WX['rmonth'];
$yearrn $WX['ryear'];
$currentrainratehr $WX['rrate'];
$maxrainrate $WX['rrateTM'];
$maxrainratehr $WX['rrateTM'];
$maxrainratetime $WX['TrrateTM'];
$yesterdayrain $WX['rfallY'];
$VPsolar $WX['SolarRad'];
$VPuv $WX['UV'];
if(isset(
$WX['solarTH'])) { $highsolar $WX['solarTH']; } // beta tag
if(isset($WX['UVTH'])) { $highuv $WX['UVTH']; } // beta tag
if(isset($WX['TsolarTH'])) { $highsolartime $WX['TsolarTH']; } // beta tag
if(isset($WX['TUVTH'])) { $highuvtime $WX['TUVTH']; } // beta tag
if(isset($WX['UVYH'])) { $highuvyest $WX['UVYH']; } // beta tag
if(isset($WX['TUVYH'])) { $highuvyesttime $WX['TUVYH']; } // beta tag
$mrecordwindgust $WX['MonthGustH'];
list(
$mrecordhighgustday,$mrecordhighgustmonth,$mrecordhighgustyear)=CU_getRecordDate($WX['MonthGustHD'],$WX['year']); // calculated value
$snownowin $WX['snowdepth'];
$snownowcm $WX['snowdepth'];
$temp0minuteago $WX['temp'];
$wind0minuteago $WX['wspeed'];
$gust0minuteago $WX['wgust'];
$dir0minuteago $WX['wdir'];
$hum0minuteago $WX['hum'];
$dew0minuteago $WX['dew'];
$baro0minuteago $WX['press'];
$rain0minuteago $WX['rfall'];
$VPsolar0minuteago $WX['SolarRad'];
$VPuv0minuteago $WX['UV'];
if(isset(
$WX['RecentOutsideTemp m=5'])) { $temp5minuteago $WX['RecentOutsideTemp m=5']; } // beta tag
if(isset($WX['RecentWindSpeed m=5'])) { $wind5minuteago $WX['RecentWindSpeed m=5']; } // beta tag
if(isset($WX['RecentWindGust m=5'])) { $gust5minuteago $WX['RecentWindGust m=5']; } // beta tag
if(isset($WX['RecentWindAvgDir m=5'])) {$dir5minuteago CU_deg2dir($WX['RecentWindAvgDir m=5']); } // conditional value
if(isset($WX['RecentHumidity m=5'])) { $hum5minuteago $WX['RecentHumidity m=5']; } // beta tag
if(isset($WX['RecentDewPoint m=5'])) { $dew5minuteago $WX['RecentDewPoint m=5']; } // beta tag
if(isset($WX['RecentPressure m=5'])) { $baro5minuteago $WX['RecentPressure m=5']; } // beta tag
if(isset($WX['RecentRainToday m=5'])) { $rain5minuteago $WX['RecentRainToday m=5']; } // beta tag
if(isset($WX['RecentSolarRad m=5'])) { $VPsolar5minuteago $WX['RecentSolarRad m=5']; } // beta tag
if(isset($WX['RecentUV m=5'])) { $VPuv5minuteago $WX['RecentUV m=5']; } // beta tag
if(isset($WX['RecentOutsideTemp m=10'])) { $temp10minuteago $WX['RecentOutsideTemp m=10']; } // beta tag
if(isset($WX['RecentWindSpeed m=10'])) { $wind10minuteago $WX['RecentWindSpeed m=10']; } // beta tag
if(isset($WX['RecentWindGust m=10'])) { $gust10minuteago $WX['RecentWindGust m=10']; } // beta tag
if(isset($WX['RecentWindAvgDir m=10'])) {$dir10minuteago CU_deg2dir($WX['RecentWindAvgDir m=10']); } // conditional value
if(isset($WX['RecentHumidity m=10'])) { $hum10minuteago $WX['RecentHumidity m=10']; } // beta tag
if(isset($WX['RecentDewPoint m=10'])) { $dew10minuteago $WX['RecentDewPoint m=10']; } // beta tag
if(isset($WX['RecentPressure m=10'])) { $baro10minuteago $WX['RecentPressure m=10']; } // beta tag
if(isset($WX['RecentRainToday m=10'])) { $rain10minuteago $WX['RecentRainToday m=10']; } // beta tag
if(isset($WX['RecentSolarRad m=10'])) { $VPsolar10minuteago $WX['RecentSolarRad m=10']; } // beta tag
if(isset($WX['RecentUV m=10'])) { $VPuv10minuteago $WX['RecentUV m=10']; } // beta tag
if(isset($WX['RecentOutsideTemp m=15'])) { $temp15minuteago $WX['RecentOutsideTemp m=15']; } // beta tag
if(isset($WX['RecentWindSpeed m=15'])) { $wind15minuteago $WX['RecentWindSpeed m=15']; } // beta tag
if(isset($WX['RecentWindGust m=15'])) { $gust15minuteago $WX['RecentWindGust m=15']; } // beta tag
if(isset($WX['RecentWindAvgDir m=15'])) {$dir15minuteago CU_deg2dir($WX['RecentWindAvgDir m=15']); } // conditional value
if(isset($WX['RecentHumidity m=15'])) { $hum15minuteago $WX['RecentHumidity m=15']; } // beta tag
if(isset($WX['RecentDewPoint m=15'])) { $dew15minuteago $WX['RecentDewPoint m=15']; } // beta tag
if(isset($WX['RecentPressure m=15'])) { $baro15minuteago $WX['RecentPressure m=15']; } // beta tag
if(isset($WX['RecentRainToday m=15'])) { $rain15minuteago $WX['RecentRainToday m=15']; } // beta tag
if(isset($WX['RecentSolarRad m=15'])) { $VPsolar15minuteago $WX['RecentSolarRad m=15']; } // beta tag
if(isset($WX['RecentUV m=15'])) { $VPuv15minuteago $WX['RecentUV m=15']; } // beta tag
if(isset($WX['RecentOutsideTemp m=20'])) { $temp20minuteago $WX['RecentOutsideTemp m=20']; } // beta tag
if(isset($WX['RecentWindSpeed m=20'])) { $wind20minuteago $WX['RecentWindSpeed m=20']; } // beta tag
if(isset($WX['RecentWindGust m=20'])) { $gust20minuteago $WX['RecentWindGust m=20']; } // beta tag
if(isset($WX['RecentWindAvgDir m=20'])) {$dir20minuteago CU_deg2dir($WX['RecentWindAvgDir m=20']); } // conditional value
if(isset($WX['RecentHumidity m=20'])) { $hum20minuteago $WX['RecentHumidity m=20']; } // beta tag
if(isset($WX['RecentDewPoint m=20'])) { $dew20minuteago $WX['RecentDewPoint m=20']; } // beta tag
if(isset($WX['RecentPressure m=20'])) { $baro20minuteago $WX['RecentPressure m=20']; } // beta tag
if(isset($WX['RecentRainToday m=20'])) { $rain20minuteago $WX['RecentRainToday m=20']; } // beta tag
if(isset($WX['RecentSolarRad m=20'])) { $VPsolar20minuteago $WX['RecentSolarRad m=20']; } // beta tag
if(isset($WX['RecentUV m=20'])) { $VPuv20minuteago $WX['RecentUV m=20']; } // beta tag
if(isset($WX['RecentOutsideTemp m=30'])) { $temp30minuteago $WX['RecentOutsideTemp m=30']; } // beta tag
if(isset($WX['RecentWindSpeed m=30'])) { $wind30minuteago $WX['RecentWindSpeed m=30']; } // beta tag
if(isset($WX['RecentWindGust m=30'])) { $gust30minuteago $WX['RecentWindGust m=30']; } // beta tag
if(isset($WX['RecentWindAvgDir m=30'])) {$dir30minuteago CU_deg2dir($WX['RecentWindAvgDir m=30']); } // conditional value
if(isset($WX['RecentHumidity m=30'])) { $hum30minuteago $WX['RecentHumidity m=30']; } // beta tag
if(isset($WX['RecentDewPoint m=30'])) { $dew30minuteago $WX['RecentDewPoint m=30']; } // beta tag
if(isset($WX['RecentPressure m=30'])) { $baro30minuteago $WX['RecentPressure m=30']; } // beta tag
if(isset($WX['RecentRainToday m=30'])) { $rain30minuteago $WX['RecentRainToday m=30']; } // beta tag
if(isset($WX['RecentSolarRad m=30'])) { $VPsolar30minuteago $WX['RecentSolarRad m=30']; } // beta tag
if(isset($WX['RecentUV m=30'])) { $VPuv30minuteago $WX['RecentUV m=30']; } // beta tag
if(isset($WX['RecentOutsideTemp m=45'])) { $temp45minuteago $WX['RecentOutsideTemp m=45']; } // beta tag
if(isset($WX['RecentWindSpeed m=45'])) { $wind45minuteago $WX['RecentWindSpeed m=45']; } // beta tag
if(isset($WX['RecentWindGust m=45'])) { $gust45minuteago $WX['RecentWindGust m=45']; } // beta tag
if(isset($WX['RecentWindAvgDir m=45'])) {$dir45minuteago CU_deg2dir($WX['RecentWindAvgDir m=45']); } // conditional value
if(isset($WX['RecentHumidity m=45'])) { $hum45minuteago $WX['RecentHumidity m=45']; } // beta tag
if(isset($WX['RecentDewPoint m=45'])) { $dew45minuteago $WX['RecentDewPoint m=45']; } // beta tag
if(isset($WX['RecentPressure m=45'])) { $baro45minuteago $WX['RecentPressure m=45']; } // beta tag
if(isset($WX['RecentRainToday m=45'])) { $rain45minuteago $WX['RecentRainToday m=45']; } // beta tag
if(isset($WX['RecentSolarRad m=45'])) { $VPsolar45minuteago $WX['RecentSolarRad m=45']; } // beta tag
if(isset($WX['RecentUV m=45'])) { $VPuv45minuteago $WX['RecentUV m=45']; } // beta tag
if(isset($WX['RecentOutsideTemp m=60'])) { $temp60minuteago $WX['RecentOutsideTemp m=60']; } // beta tag
if(isset($WX['RecentWindSpeed m=60'])) { $wind60minuteago $WX['RecentWindSpeed m=60']; } // beta tag
if(isset($WX['RecentWindGust m=60'])) { $gust60minuteago $WX['RecentWindGust m=60']; } // beta tag
if(isset($WX['RecentWindAvgDir m=60'])) {$dir60minuteago CU_deg2dir($WX['RecentWindAvgDir m=60']); } // conditional value
if(isset($WX['RecentHumidity m=60'])) { $hum60minuteago $WX['RecentHumidity m=60']; } // beta tag
if(isset($WX['RecentDewPoint m=60'])) { $dew60minuteago $WX['RecentDewPoint m=60']; } // beta tag
if(isset($WX['RecentPressure m=60'])) { $baro60minuteago $WX['RecentPressure m=60']; } // beta tag
if(isset($WX['RecentRainToday m=60'])) { $rain60minuteago $WX['RecentRainToday m=60']; } // beta tag
if(isset($WX['RecentSolarRad m=60'])) { $VPsolar60minuteago $WX['RecentSolarRad m=60']; } // beta tag
if(isset($WX['RecentUV m=60'])) { $VPuv60minuteago $WX['RecentUV m=60']; } // beta tag
if(isset($WX['RecentOutsideTemp m=75'])) { $temp75minuteago $WX['RecentOutsideTemp m=75']; } // beta tag
if(isset($WX['RecentWindSpeed m=75'])) { $wind75minuteago $WX['RecentWindSpeed m=75']; } // beta tag
if(isset($WX['RecentWindGust m=75'])) { $gust75minuteago $WX['RecentWindGust m=75']; } // beta tag
if(isset($WX['RecentWindAvgDir m=75'])) {$dir75minuteago CU_deg2dir($WX['RecentWindAvgDir m=75']); } // conditional value
if(isset($WX['RecentHumidity m=75'])) { $hum75minuteago $WX['RecentHumidity m=75']; } // beta tag
if(isset($WX['RecentDewPoint m=75'])) { $dew75minuteago $WX['RecentDewPoint m=75']; } // beta tag
if(isset($WX['RecentPressure m=75'])) { $baro75minuteago $WX['RecentPressure m=75']; } // beta tag
if(isset($WX['RecentRainToday m=75'])) { $rain75minuteago $WX['RecentRainToday m=75']; } // beta tag
if(isset($WX['RecentSolarRad m=75'])) { $VPsolar75minuteago $WX['RecentSolarRad m=75']; } // beta tag
if(isset($WX['RecentUV m=75'])) { $VPuv75minuteago $WX['RecentUV m=75']; } // beta tag
if(isset($WX['RecentOutsideTemp m=90'])) { $temp90minuteago $WX['RecentOutsideTemp m=90']; } // beta tag
if(isset($WX['RecentWindSpeed m=90'])) { $wind90minuteago $WX['RecentWindSpeed m=90']; } // beta tag
if(isset($WX['RecentWindGust m=90'])) { $gust90minuteago $WX['RecentWindGust m=90']; } // beta tag
if(isset($WX['RecentWindAvgDir m=90'])) {$dir90minuteago CU_deg2dir($WX['RecentWindAvgDir m=90']); } // conditional value
if(isset($WX['RecentHumidity m=90'])) { $hum90minuteago $WX['RecentHumidity m=90']; } // beta tag
if(isset($WX['RecentDewPoint m=90'])) { $dew90minuteago $WX['RecentDewPoint m=90']; } // beta tag
if(isset($WX['RecentPressure m=90'])) { $baro90minuteago $WX['RecentPressure m=90']; } // beta tag
if(isset($WX['RecentRainToday m=90'])) { $rain90minuteago $WX['RecentRainToday m=90']; } // beta tag
if(isset($WX['RecentSolarRad m=90'])) { $VPsolar90minuteago $WX['RecentSolarRad m=90']; } // beta tag
if(isset($WX['RecentUV m=90'])) { $VPuv90minuteago $WX['RecentUV m=90']; } // beta tag
if(isset($WX['RecentOutsideTemp m=105'])) { $temp105minuteago $WX['RecentOutsideTemp m=105']; } // beta tag
if(isset($WX['RecentWindSpeed m=105'])) { $wind105minuteago $WX['RecentWindSpeed m=105']; } // beta tag
if(isset($WX['RecentWindGust m=105'])) { $gust105minuteago $WX['RecentWindGust m=105']; } // beta tag
if(isset($WX['RecentWindAvgDir m=105'])) {$dir105minuteago CU_deg2dir($WX['RecentWindAvgDir m=105']); } // conditional value
if(isset($WX['RecentHumidity m=105'])) { $hum105minuteago $WX['RecentHumidity m=105']; } // beta tag
if(isset($WX['RecentDewPoint m=105'])) { $dew105minuteago $WX['RecentDewPoint m=105']; } // beta tag
if(isset($WX['RecentPressure m=105'])) { $baro105minuteago $WX['RecentPressure m=105']; } // beta tag
if(isset($WX['RecentRainToday m=105'])) { $rain105minuteago $WX['RecentRainToday m=105']; } // beta tag
if(isset($WX['RecentSolarRad m=105'])) { $VPsolar105minuteago $WX['RecentSolarRad m=105']; } // beta tag
if(isset($WX['RecentUV m=105'])) { $VPuv105minuteago $WX['RecentUV m=105']; } // beta tag
if(isset($WX['RecentOutsideTemp m=120'])) { $temp120minuteago $WX['RecentOutsideTemp m=120']; } // beta tag
if(isset($WX['RecentWindSpeed m=120'])) { $wind120minuteago $WX['RecentWindSpeed m=120']; } // beta tag
if(isset($WX['RecentWindGust m=120'])) { $gust120minuteago $WX['RecentWindGust m=120']; } // beta tag
if(isset($WX['RecentWindAvgDir m=120'])) {$dir120minuteago CU_deg2dir($WX['RecentWindAvgDir m=120']); } // conditional value
if(isset($WX['RecentHumidity m=120'])) { $hum120minuteago $WX['RecentHumidity m=120']; } // beta tag
if(isset($WX['RecentDewPoint m=120'])) { $dew120minuteago $WX['RecentDewPoint m=120']; } // beta tag
if(isset($WX['RecentPressure m=120'])) { $baro120minuteago $WX['RecentPressure m=120']; } // beta tag
if(isset($WX['RecentRainToday m=120'])) { $rain120minuteago $WX['RecentRainToday m=120']; } // beta tag
if(isset($WX['RecentSolarRad m=120'])) { $VPsolar120minuteago $WX['RecentSolarRad m=120']; } // beta tag
if(isset($WX['RecentUV m=120'])) { $VPuv120minuteago $WX['RecentUV m=120']; } // beta tag
if(isset($WX['ET'])) { $VPet $WX['ET']; } // beta tag
$dateoflastrainalways $WX['LastRainTipISO'];
$highbaro $WX['pressTH'];
$highbarot $WX['TpressTH'];
if(isset(
$WX['solarYH'])) { $highsolaryest $WX['solarYH']; } // beta tag
if(isset($WX['TsolarYH'])) { $highsolaryesttime $WX['TsolarYH']; } // beta tag
$hourrn $WX['rhour'];
$maxaverageyest $WX['windYM'];
$maxaverageyestt $WX['TwindYM'];
$maxbaroyest $WX['pressYH'];
$maxbaroyestt $WX['TpressYH'];
$maxgstdirectionletter  CU_deg2dir($WX['bearingTM']); // calculated value
$maxgustyest $WX['wgustYM'];
$maxgustyestt $WX['TwgustYM'];
$minchillyest $WX['wchillYL'];
$minchillyestt $WX['TwchillYL'];
$minwindch $WX['wchillTL'];
$minwindcht $WX['TwchillTL'];
$mrecordhighbaro $WX['MonthPressH'];
list(
$mrecordhighbaroday,$mrecordhighbaromonth,$mrecordhighbaroyear)=CU_getRecordDate($WX['MonthPressHD'],$WX['year']); // calculated value
$mrecordhightemp $WX['MonthTempH'];
list(
$mrecordhightempday,$mrecordhightempmonth,$mrecordhightempyear)=CU_getRecordDate($WX['MonthTempHD'],$WX['year']); // calculated value
$mrecordlowchill $WX['MonthWChillL'];
list(
$mrecordlowchillday,$mrecordlowchillmonth,$mrecordlowchillyear)=CU_getRecordDate($WX['MonthWChillLD'],$WX['year']); // conditional value
$mrecordlowtemp $WX['MonthTempL'];
list(
$mrecordlowtempday,$mrecordlowtempmonth,$mrecordlowtempyear)=CU_getRecordDate($WX['MonthTempLD'],$WX['year']); // calculated value
$windruntoday $WX['windrun'];
$yrecordhighbaro $WX['YearPressH'];
list(
$yrecordhighbaroday,$yrecordhighbaromonth,$yrecordhighbaroyear)=CU_getRecordDate($WX['YearPressHD'],$WX['year']); // calculated value
list($yrecordhighgustday,$yrecordhighgustmonth,$yrecordhighgustyear)=CU_getRecordDate($WX['YearGustHD'],$WX['year']); // calculated value
$yrecordhightemp $WX['YearTempH'];
list(
$yrecordhightempday,$yrecordhightempmonth,$yrecordhightempyear)=CU_getRecordDate($WX['YearTempHD'],$WX['year']); // calculated value
$yrecordlowchill $WX['YearWChillL'];
list(
$yrecordlowchillday,$yrecordlowchillmonth,$yrecordlowchillyear)=CU_getRecordDate($WX['YearWChillLD'],$WX['year']); // conditional value
$yrecordlowtemp $WX['YearTempL'];
list(
$yrecordlowtempday,$yrecordlowtempmonth,$yrecordlowtempyear)=CU_getRecordDate($WX['YearTempLD'],$WX['year']); // calculated value
$yrecordwindgust $WX['YearGustH'];
$yrecordwindspeed $WX['YearWindH'];
$minbaroyest $WX['pressYL'];
$minbaroyestt $WX['TpressYL'];
$mrecordlowbaro $WX['MonthPressL'];
list(
$mrecordlowbaroday,$mrecordlowbaromonth,$mrecordlowbaroyear)=CU_getRecordDate($WX['MonthPressLD'],$WX['year']); // calculated value
$yrecordlowbaro $WX['YearPressL'];
list(
$yrecordlowbaroday,$yrecordlowbaromonth,$yrecordlowbaroyear)=CU_getRecordDate($WX['YearPressLD'],$WX['year']); // calculated value
$recordhightemp $WX['tempH'];
list(
$recordhightempday,$recordhightempmonth,$recordhightempyear)=CU_getAlltimeDate($WX['TtempH']); // calculated value
$recordlowtemp $WX['tempL'];
list(
$recordlowtempday,$recordlowtempmonth,$recordlowtempyear)=CU_getAlltimeDate($WX['TtempL']); // calculated value
$maxheat $WX['heatindexTH'];
$maxheatt $WX['TheatindexTH'];
$maxheatyest $WX['heatindexYH'];
$mrecordhighheatindex $WX['MonthHeatIndexH'];
$yrecordhighheatindex $WX['YearHeatIndexH'];
$lowbaro $WX['pressTL'];
$lowbarot $WX['TpressTL'];
$maxheatyestt $WX['TheatindexYH'];
list(
$mrecordhighheatindexday,$mrecordhighheatindexmonth,$mrecordhighheatindexyear)=CU_getRecordDate($WX['MonthHeatIndexHD'],$WX['year']); // conditional value
list($yrecordhighheatindexday,$yrecordhighheatindexmonth,$yrecordhighheatindexyear)=CU_getRecordDate($WX['YearHeatIndexHD'],$WX['year']); // conditional value
$windrunyesterday $WX['windrunY'];

// end of generation script
# CU unique functions included from CU-functions-inc.txt 
#-------------------------------------------------------------------------------------
# function processed WD variables
#-------------------------------------------------------------------------------------

global $SITE;

$SITE['commaDecimal'] = strpos($temperature,',') !==false?true:false// using comma for decimal point?

if(substr($WX['LastRainTipISO'],0,4) <> '0000') { // got a last rain valid date
#  $WX['LastRainTipISO'] = '2012-06-05 03:58';
 
$cuDF = ($SITE['WDdateMDY'])?'m/d/y':'d/m/y';
 list(
$dateoflastrainalways,$timeoflastrainalways) =
     
explode(' ',date("$cuDF H:i",strtotime($WX['LastRainTipISO'])));
 
$dayswithnorain intval((strtotime(date('Y-m-d'))-strtotime(substr($WX['LastRainTipISO'],0,10)))/86400);
}

if(isset(
$SITE['conditionsMETAR'])) { // override with METAR conditions for text and icon if requested.
    
include_once("get-metar-conditions-inc.php");
    list(
$Currentsolardescription,$iconnumber,$icongraphic,$icontext,$mtrstuff) = mtr_conditions($SITE['conditionsMETAR'], $time$sunrise$sunset,true);
    if(isset(
$currentrainratehr) and 
      (!isset(
$SITE['overrideRain']) or (isset($SITE['overrideRain']) and $SITE['overrideRain'])) ) {
      list(
$Currentsolardescription,$iconnumber) = 
      
CU_RainRateIcon($Currentsolardescription,$iconnumber,$currentrainratehr,$uomrain,$time,$sunrise,$sunset,$WX['LastRainTipISO']);
    }
}

# generate the separate date/time variables by dissection of input date/time and format
list($date_year,$date_month,$date_day,$time_hour,$time_minute,$monthname,$dayname)
  = 
CU_setDateTimes($date,$time,$SITE['WDdateMDY']);

$beaufortnum =  CU_beaufortNumber($avgspd,$uomwind);
$bftspeedtext CU_beaufortText($beaufortnum);

list(
$chandler,$chandlertxt,$chandlerimg) = CU_CBI($temperature,$uomtemp,$humidity);

if(!isset(
$wdversion) and isset($SITE['WXsoftwareVersion'])) {$wdversion $SITE['WXsoftwareVersion']; }

list(
$feelslike,$heatcolourword) = CU_setFeelslike ($temperature,$windch,$heati,$humidex,$apparenttemp,$uomtemp);


if(
$dirlabel == '---'){$dirlabel $WX['currentwdir'];} // use current winddir when wdir='---' for avg=0.0 wind

#-------------------------------------------------------------------------------------
# WCT support function - CU_RainRateIcon
#-------------------------------------------------------------------------------------

function CU_RainRateIcon($inText,$inIcon,$inRate,$inUOM,$time,$sunrise,$sunset,$lastRain='0000-00-00T00:00:00') {
   global 
$Debug;
   
/*
Rainfall intensity is classified according to the rate of precipitation:

    Light rain — rate is < 2.5 mm (0.098 in) per hour
    Moderate rain — rate is between 2.5 mm (0.098 in) - 7.6 mm (0.30 in) or 10 mm (0.39 in) per hour
    Heavy rain — rate is > 7.6 mm (0.30 in) per hour, or between 10 mm (0.39 in) and 50 mm (2.0 in) per hour
    Violent rain — rate is > 50 mm (2.0 in) per hour
*/    
   
$Debug .= "<!-- CU_RainRateIcon in='$inText' icon='$inIcon' rate='$inRate' uom='$inUOM' -->\n";
   
$newText '';  // assume no changes
   
$newIcon $inIcon;
   
   
$rate $inRate;
   if(
preg_match('|in|i',$inUOM)) { // convert to mm/hr rate
     
$rate $inRate 25.4;
   }
   
   if(
substr($lastRain,0,4) <> '0000') {
      if(
$rate 0.001 and time()-strtotime($lastRain) < 30*60) {
         
$newText 'Moderate Drizzle';
      }
   }

   if (
$rate 0.0 and $rate 2.5) { $newText 'Light Rain'; }
   if (
$rate >=2.5 and $rate 7.6) { $newText 'Moderate Rain'; }
   if (
$rate >=7.6 and $rate 50.0) { $newText 'Heavy Rain'; }
   if (
$rate >= 50.0)         { $newText 'Violent Rain'; }
   
   if(
$newText <> '' or $rate == 0.0) {
       if (
$newText <> '' and $inText <> '') {$newText .= ', ';}
       
$newText .= 
          
preg_replace('/(Light|Moderate|Heavy|Violent|Extreme){0,1}\s*(Rain|Mist|Drizzle), /i','',$inText);
       
$newIcon mtr_get_iconnumber ($time,$newText,$sunrise,$sunset); 
   } else {
       
$newText $inText;
   }
   
$Debug .= "<!-- CU_RainRateIcon out='$newText' icon='$newIcon' rate='$rate' mm/hr -->\n";
   return(array(
$newText,$newIcon));
}

#-------------------------------------------------------------------------------------
# CU support function - CUfixupTime
#-------------------------------------------------------------------------------------

function CUfixupTime ($intime) {
  global 
$Debug;
  
$tfixed preg_replace('/^(\S+)\s+(\S+)$/is',"$2",$intime);
  
$t explode(':',$tfixed);
  if(!isset(
$t[1])) { $t explode('.',$tfixed); }
  if (
preg_match('/p/i',$tfixed)) { $t[0] = $t[0] + 12; }
  if (
$t[0] > 23) {$t[0] = 12; }
  if (
preg_match('/^12.*a/i',$tfixed)) { $t[0] = 0; }
  if (
$t[0] < '10') {$t[0] = sprintf("%02d",$t[0]); } // leading zero on hour.
  
$t2 join(':',$t); // put time back to gether;
  
$t2 preg_replace('/[^\d\:]/is','',$t2); // strip out the am/pm if any
  
$Debug .= "<!-- CUfixupTime in='$intime' tfixed='$tfixed' out='$t2' -->\n";
  return(
$t2);
      
// end CUfixupTime

#-------------------------------------------------------------------------------------
# CU support function - CU_setDateTimes
#-------------------------------------------------------------------------------------

function CU_setDateTimes ($indate,$intime,$MDYformat=true) {
// returns: $date_year,$date_month,$date_day,$time_hour,$time_minute,$date_month,$monthname,$dayname
  
global $Debug;
  
$Debug .= "<!-- CU_setDateTimes date='$indate' time=$intime' MDY=$MDYformat -->\n";
  
$d explode('/',$indate);
  if(!isset(
$d[2])) {$d explode("-",$indate);}
  if(!isset(
$d[2])) {$d explode(".",$indate);}
  if(
$d[2]<2000) {$d[2]+=2000;}
  if(
$MDYformat) { // mm/dd/yyyy
    
$YMD "$d[2]-$d[0]-$d[1]";
  } else {         
// dd/mm/yyyy
    
$YMD "$d[2]-$d[1]-$d[0]";
  }
  
$t CUfixupTime($intime);
  
  
$CUtime strtotime("$YMD $t:00");
  
$Debug .= "<!-- CU_setDateTimes CUtime='$YMD $t:00' assembled -->\n";
   
  
$CUtime date('Y m d H i F l',$CUtime);
  
$Debug .= "<!-- CU_setDateTimes CUtime='$CUtime' values set -->\n";
  if(isset(
$_REQUEST['debug'])) {echo $Debug; } 
  return(
explode(' ',$CUtime)); // results returned in array for list() assignment
      
// end CU_setDateTimes

#-------------------------------------------------------------------------------------
# CU support function - CU_beaufortNumber
#-------------------------------------------------------------------------------------

function CU_beaufortNumber ($inWind,$usedunit) {
   global 
$Debug;
   
   
$rawwind $inWind;
// first convert all winds to knots
   
if(strpos($inWind,',') !== false) {
       
$rawwind preg_replace('|,|','.',$inWind);
   }
   
$WINDkts 0.0;
   if       (
preg_match('/kts|knot/i',$usedunit)) {
       
$WINDkts $rawwind 1.0;
   } elseif (
preg_match('/mph/i',$usedunit)) {
       
$WINDkts $rawwind 0.8689762;
   } elseif (
preg_match('/mps|m\/s/i',$usedunit)) {
       
$WINDkts $rawwind 1.94384449;
   } elseif  (
preg_match('/kmh|km\/h/i',$usedunit)) {
       
$WINDkts $rawwind 0.539956803;
   } else {
       
$Debug .= "<!-- CU_beaufortNumber .. unknown input unit '$usedunit' for wind=$rawwind -->\n";
       
$WINDkts $rawwind 1.0;
   }

// return a number for the beaufort scale based on wind in knots
  
if ($WINDkts ) {return(0); }
  if (
$WINDkts ) {return(1); }
  if (
$WINDkts ) {return(2); }
  if (
$WINDkts 11 ) {return(3); }
  if (
$WINDkts 17 ) {return(4); }
  if (
$WINDkts 22 ) {return(5); }
  if (
$WINDkts 28 ) {return(6); }
  if (
$WINDkts 34 ) {return(7); }
  if (
$WINDkts 41 ) {return(8); }
  if (
$WINDkts 48 ) {return(9); }
  if (
$WINDkts 56 ) {return(10); }
  if (
$WINDkts 64 ) {return(11); }
  if (
$WINDkts >= 64 ) {return(12); }
  return(
"0");
// end CU_beaufortNumber

#-------------------------------------------------------------------------------------
# CU support function - CU_beaufortText
#-------------------------------------------------------------------------------------

function CU_beaufortText ($beaufortnumber) {

  
$B = array( /* Beaufort 0 to 12 in English */
   
"Calm""Light air""Light breeze""Gentle breeze""Moderate breeze""Fresh breeze",
   
"Strong breeze""Near gale""Gale""Strong gale""Storm",
   
"Violent storm""Hurricane"
  
);

  if(isset(
$B[$beaufortnumber])) {
    return 
$B[$beaufortnumber];
  } else {
    return 
"Unknown $beaufortnumber Bft";
  }
    
    
// end CU_beaufortText

#-------------------------------------------------------------------------------------
# CU support function - CU_setFeelslike
#-------------------------------------------------------------------------------------


function CU_setFeelslike ($temp,$windchill,$heatindex,$humidex,$apparenttemp,$tempUOM) {
global 
$Debug$SITE;
// establish the feelslike temperature and return a word describing how it feels

$HeatWords = array(
 
'Unknown''Extreme Heat Danger''Heat Danger''Extreme Heat Caution''Extremely Hot''Uncomfortably Hot',
 
'Hot''Warm''Comfortable''Cool''Cold''Uncomfortably Cold''Very Cold''Extreme Cold' );
 
 if(isset(
$SITE['feelslike'])) {
   
$flVar $SITE['feelslike'];
 } else {
   
$flVar = -1;
 }

// first convert all temperatures to Centigrade if need be
  
$TC $temp;
  
$WC $windchill;
  switch (
$flVar) {
      case 
0
          
$HC $heatindex;
          
$using 'HeatIndex';
          break;
      case 
1
          
$HC $humidex;
          
$using 'Humidex';
          break;
      case 
2
          
$HC $apparenttemp;
          
$using 'ApparentTemp';
          break;
       default: 
          
$HC $heatindex;
          
$using 'HeatIndex(default)';
          break;
  }
 
  if(
strpos($TC,',') !== false) {
    
$TC preg_replace('|,|','.',$TC);
    
$WC preg_replace('|,|','.',$WC);
    
$HC preg_replace('|,|','.',$HC);
  }
  
  if (
preg_match('|F|i',$tempUOM))  { // convert F to C if need be
     
$TC sprintf("%01.1f",round(($TC-32.0) / 1.8,1));
     
$WC sprintf("%01.1f",round(($WC-32.0) / 1.8,1));
     
$HC sprintf("%01.1f",round(($HC-32.0) / 1.8,1));
  }
 
 
// Feelslike
 
  
if ($TC <= 16.0 ) {
    
$feelslike $WC//use WindChill
  
} elseif ($TC >=27.0) {
    
$feelslike $HC//use HeatIndex/Humidex/ApparentTemp
  
} else {
    
$feelslike $TC;   // use temperature
  
}

  if (
preg_match('|F|i',$tempUOM))  { // convert C back to F if need be
    
$feelslike = (1.8 $feelslike) + 32.0;
  }
  
$feelslike round($feelslike,0);

// determine the 'heat color word' to use  
 
$hcWord $HeatWords[0];
 
$hcFound false;
 if (
$TC 32 and $HC 29) {
    if (
$HC 54 and ! $hcFound) { $hcWord $HeatWords[1]; $hcFound true;}
    if (
$HC 45 and ! $hcFound) { $hcWord $HeatWords[2]; $hcFound true; }
    if (
$HC 39 and ! $hcFound) { $hcWord $HeatWords[4]; $hcFound true; }
    if (
$HC 29 and ! $hcFound) { $hcWord $HeatWords[6]; $hcFound true; }
 } elseif (
$WC 16 ) {
    if (
$WC < -18 and ! $hcFound) { $hcWord $HeatWords[13]; $hcFound true; }
    if (
$WC < -and ! $hcFound)  { $hcWord $HeatWords[12]; $hcFound true; }
    if (
$WC < -and ! $hcFound)  { $hcWord $HeatWords[11]; $hcFound true; }
    if (
$WC and ! $hcFound)   { $hcWord $HeatWords[10]; $hcFound true; }
    if (
$WC 16 and ! $hcFound)  { $hcWord $HeatWords[9]; $hcFound true; }
 } elseif (
$WC >= 16 and $TC <= 32) {
    if (
$TC <= 26 and ! $hcFound) { $hcWord $HeatWords[8]; $hcFound true; }
    if (
$TC <= 32 and ! $hcFound) { $hcWord $HeatWords[7]; $hcFound true; }
 }

 if(isset(
$_REQUEST['debug'])) {
  echo 
"<!-- CU_setFeelslike input T,WC,HI,HU,AT,U='$temp,$windchill,$heatindex,$humidex,$apparenttemp,$tempUOM'\n";
  echo 
"     cnvt T,WC,$using='$TC,$WC,$HC'&deg;C\n";
  echo 
"     feelslike=$feelslike hcWord=$hcWord\n -->\n";
 }

 return(array(
$feelslike,$hcWord));
    
// end of CU_setFeelslike

#-------------------------------------------------------------------------------------
# CU support function - CU_CBI - Chandler Burning Index
#-------------------------------------------------------------------------------------

function CU_CBI($inTemp,$inTempUOM,$inHumidity) {
    
// thanks to Chris from sloweather.com for the CBI calculation script
    // modified by Ken True for template usage
    
    
preg_match('/([\d\.\,\+\-]+)/',$inTemp,$t); // strip non-numeric from inTemp if any
    
$ctemp $t[1];
    if(
strpos($ctemp,',') !== false) {
        
$ctemp preg_replace('|,|','.',$ctemp);
    }
    if(!
preg_match('|C|i',$inTempUOM)) {
      
$ctemp = ($ctemp-32.0) / 1.8// convert from Fahrenheit    
    
}
    
preg_match('/([\d\.\,\+\-]+)/',$inHumidity,$t); // strip non-numeric from inHumidity if any
    
$rh $t[1];
    if(
strpos($rh,',') !== false) {
        
$rh preg_replace('|,|','.',$rh);
    }

    
// Start Index Calcs
    
    // Chandler Index
    
$cbi = (((110 1.373 $rh) - 0.54 * (10.20 $ctemp)) * (124 pow(10,-0.0142 $rh) ))/60;
    
// CBI = (((110 - 1.373*RH) - 0.54 * (10.20 - T)) * (124 * 10**(-0.0142*RH)))/60
    
    //Sort out the Chandler Index
    
$cbi round($cbi,1);
    if (
$cbi "97.5") {
        
$cbitxt "EXTREME";
        
$cbiimg"fdl_extreme.gif";
    
    } elseif (
$cbi >="90") {
        
$cbitxt "VERY HIGH";
        
$cbiimg"fdl_vhigh.gif";
    
    } elseif (
$cbi >= "75") {
        
$cbitxt "HIGH";
        
$cbiimg"fdl_high.gif";
    
    } elseif (
$cbi >= "50") {
        
$cbitxt "MODERATE";
        
$cbiimg"fdl_moderate.gif";
    
    } else {
        
$cbitxt="LOW";
        
$cbiimg"fdl_low.gif";
    }
     
$data = array($cbi,$cbitxt,$cbiimg);
     return 
$data;
     
// end CU_CBI

#-------------------------------------------------------------------------------------
# CU support function - CU_getRecordDate - Convert 'dd Month '.'YYYY' to list(d,m,y)
#-------------------------------------------------------------------------------------

function CU_getRecordDate($inDayMonth,$inYear) {
  global 
$SITE,$Debug;
  
  
$EnglishMonths = array(
   
'January','February','March','April','May','June',
   
'July','August','September','October','November','December');
   
  
  
$tstr $inDayMonth ' ' $inYear;
  
$Debug .= "<!-- CU_getRecordDate input tstr='$tstr' -->\n";

 
// input dates are assumed to be in English only
 
if (isset($SITE['monthNames'])) {
    
// convert TO English for strtotime()
    
foreach ($EnglishMonths as $i => $monthEN) {
       
$tstr preg_replace('|'.$SITE['monthNames'][$i].'|i',$monthEN,$tstr);
    }  
    
$Debug .= "<!-- CU_getRecordDate after tstr='$tstr' -->\n";
  }

  
$ttime strtotime($tstr);
  
$ltime date('j n Y',$ttime);
  
$Debug .= "<!-- CU_getRecordDate result ltime='$ltime' -->\n";
  return(
explode(' ',$ltime));

}

#-------------------------------------------------------------------------------------
# CU support function - CU_getAlltimeDate - Convert 'at 2:45 PM on 16 October 2009' to list(d,m,y)
#-------------------------------------------------------------------------------------

function CU_getAlltimeDate($inDate) {
  global 
$SITE,$Debug;
  
  
$EnglishMonths = array(
   
'January','February','March','April','May','June',
   
'July','August','September','October','November','December');

  
$Debug .= "<!-- CU_getAlltimeDate input inDate='$inDate' -->\n";
   
  if(
preg_match('|^at (.*) on (.*)$|i',$inDate,$m)) { // at 2:45 PM on 16 October 2009
    
$tstr $m[2] . " " .$m[1];
  } elseif (
preg_match('|^on (.*)$|i',$inDate,$m)) { // on 16 October 2009
    
$tstr $m[1];
  }

 
// input dates are assumed to be in English only
 
if (isset($SITE['monthNames'])) {
    
// convert TO English for strtotime()
    
foreach ($EnglishMonths as $i => $monthEN) {
       
$tstr preg_replace('|'.$SITE['monthNames'][$i].'|i',$monthEN,$tstr);
    }  
    
$Debug .= "<!-- CU_getAlltimeDate after tstr='$tstr' -->\n";
  }

  
$ttime strtotime($tstr);
  
$ltime date('j n Y H:i',$ttime);
  
$Debug .= "<!-- CU_getAlltimeDate result ltime='$ltime' -->\n";
  return(
explode(' ',$ltime));

}

#-------------------------------------------------------------------------------------
# CU support function - CU_deg2dir - Convert wind direction degrees to cardinal name
#-------------------------------------------------------------------------------------

function CU_deg2dir ($degrees) {
   
// figure out a text value for compass direction
// Given the wind direction, return the text label
// for that value.  16 point compass
   
$winddir $degrees;
   if (
$winddir == "n/a") { return($winddir); }

  if (!isset(
$winddir)) {
    return 
"---";
  }
  if (!
is_numeric($winddir)) {
    return(
$winddir);
  }
  
$windlabel = array ("N","NNE""NE""ENE""E""ESE""SE""SSE""S",
     
"SSW","SW""WSW""W""WNW""NW""NNW");
  
$dir $windlabelfmod((($winddir 11) / 22.5),16) ];
  return(
$dir);

// end function CU_deg2dir


#-------------------------------------------------------------------------------------
# end of CU support functions
#-------------------------------------------------------------------------------------

?>