Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Posted: Thu 15 Aug 2013 11:18 pm
by GraemeT
Hi all,
Not sure if this has been covered before.
It seems that some server/php configurations implement certain $_SERVER and $_ENV variables in a manner which causes their values to be incorrect.
One of these is the $_SERVER['PHP_SELF'] variable, used in the NOAA-reports.php script.
In my case this was returning /noaarep.php/noaarep.php instead of /noaarep.php
I found a description of the cause of this and a solution at
http://php.net/manual/en/reserved.variables.php
The solution is to change the code at about line 158 from:
to
Since this change I've had no more problems.
Here's a link to my test page:
http://weather.gktnet.com/noaarep.php
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Posted: Fri 16 Aug 2013 10:51 pm
by beteljuice
@wetter-pocking
I've copied some of your files and directory settings and replicated the problem, which only becomes obvious when there is more than 'this' years data, although the bug is deeper than that !
I continue to investigate ...
... but I do have other commitments ATM .............
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Posted: Sat 17 Aug 2013 3:28 pm
by nitrx
Hi I've never followed this but does the script handles NOAA-reports wit a comma as decimal separator ?
like this ?
Monthly Climatological Summary for aug 2013
Name: Apeldoornmeteo City: Apeldoorn State: The Netherlands
Elevation: 10 m Lat: N 52° 13' 12" Lon: E 006° 00' 02"
Temperature (°C), Rain (mm), Wind Speed (m/s)
Heat Cool Avg
Mean Deg Deg Wind Dom
Day Temp High Time Low Time Days Days Rain Speed High Time Dir
----------------------------------------------------------------------------------
1 24,7 30,7 18:04 18,1 05:59 0,0 6,6 0,0 1,4 6,6 15:17 ZZW
2 26,6 34,7 17:03 17,4 05:59 0,2 8,9 0,0 1,3 6,6 14:47 ZZW
3 22,2 27,9 00:00 16,2 23:58 0,0 4,1 0,0 2,1 8,7 13:54 WZW
4 20,1 26,4 17:32 12,5 05:52 1,4 3,3 0,0 0,9 5,1 19:48 WZW
5 22,2 29,3 16:10 14,0 05:56 1,0 5,0 0,0 1,1 8,7 13:10 ZZW
6 18,8 22,3 14:22 15,5 23:49 0,7 1,3 6,6 1,8 6,6 00:09 NW
7 14,5 16,6 10:16 12,1 05:40 3,8 0,0 11,0 3,2 11,7 15:52 NNO
8 16,7 21,7 16:54 13,1 23:55 2,4 0,7 1,5 1,9 8,1 16:34 NNO
9 17,4 23,3 15:23 10,6 05:38 2,6 1,7 0,0 0,9 5,1 14:43 WZW
10 16,8 21,0 16:21 11,6 23:47 1,9 0,4 0,0 1,7 8,1 18:35 WZW
11 16,1 22,8 17:10 10,3 03:08 3,0 0,8 0,3 1,4 6,6 15:48 WZW
12 16,5 22,3 16:35 12,1 23:58 2,3 0,6 0,0 1,2 6,1 17:50 WZW
13 14,5 19,6 17:47 10,3 06:25 3,8 0,1 3,0 1,7 8,1 16:56 W
14 15,3 21,3 16:37 9,3 05:13 3,6 0,6 0,0 1,2 7,2 13:27 N
15 15,1 20,2 19:22 8,2 06:07 3,5 0,2 0,5 1,0 6,1 11:16 ZW
16 19,5 27,3 15:46 12,7 06:14 1,6 2,8 0,5 1,4 8,1 13:55 ZW
----------------------------------------------------------------------------------
18,6 34,7 2 8,2 15 31,8 37,1 23,4 1,5 11,7 7 W
Max >= 25,0: 6
Max <= 30,0: 14
Min <= 0,0: 0
Min <= -10,0: 0
Max Rain: 11,0 on day 7
Days of Rain: 7 (>= 0,2 mm) 3 (>= 2,0 mm) 0 (>= 20,0 mm)
Heat Base: 18,3 Cool Base: 18,3 Method: Integration
Re: PHP Web 'viewer' for Cumulus NOAA Style reports
Posted: Sat 17 Aug 2013 4:06 pm
by mcrossley
Ron, it doesn't look at the content of the reports, it just displays them, so yes it will work fine with a comma decimal.