Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
Extreme Weather script(s)
Moderator: daj
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Extreme Weather script(s)
This is a script that I was unaware of until a couple of days ago. It was from relayweather, although I could no longer find it on their website. I can't find any reference to it on the Cumulus forum so, apologies if it is referenced here.
Anyway, I was able to find a copy of the script and incorporated it into my website at...
http://jerbils.info/saratoga/wxextremes.php
There is a "gadget" script too but I haven't installed that.
As the scripts weren't visible at relayweather, I have made them available at my own site...
http://www.jerbils.info/worldextremes.zip
http://www.jerbils.info/worldextremesGadget.zip
I was a bit disappointed that there are only 7 places listed for my country of residence, Bulgaria. I assumed CWOP (which I contribute to) data would be used.
However, I made some mods to make the table length variable, in case the number of places returned was less than the specified max parameter.
To do that I inserted the lines
if($hiextremesLoc[1][$i] === null) break; - immediately prior to the ?> line, around line 274
if($loextremesLoc[1][$i] === null) break; - immediately prior to the ?> line, around line 306
and
if($precipextremesLoc[1][$i] === null) break; - immediately prior to the ?> line, around line 336
...perhaps it could be improved upon but it works
I'm not sure why I get no data for World and Northern Hemisphere. The rest seem to be ok. I have noticed on another site that specifying "world" fails to display any data too so perhaps there is a coding problem or perhaps NOAA have made some access changes.
Anyway, I was able to find a copy of the script and incorporated it into my website at...
http://jerbils.info/saratoga/wxextremes.php
There is a "gadget" script too but I haven't installed that.
As the scripts weren't visible at relayweather, I have made them available at my own site...
http://www.jerbils.info/worldextremes.zip
http://www.jerbils.info/worldextremesGadget.zip
I was a bit disappointed that there are only 7 places listed for my country of residence, Bulgaria. I assumed CWOP (which I contribute to) data would be used.
However, I made some mods to make the table length variable, in case the number of places returned was less than the specified max parameter.
To do that I inserted the lines
if($hiextremesLoc[1][$i] === null) break; - immediately prior to the ?> line, around line 274
if($loextremesLoc[1][$i] === null) break; - immediately prior to the ?> line, around line 306
and
if($precipextremesLoc[1][$i] === null) break; - immediately prior to the ?> line, around line 336
...perhaps it could be improved upon but it works
I'm not sure why I get no data for World and Northern Hemisphere. The rest seem to be ok. I have noticed on another site that specifying "world" fails to display any data too so perhaps there is a coding problem or perhaps NOAA have made some access changes.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- PaulMy
- Posts: 3881
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Extreme Weather script(s)
Thank you for searching and posting. World and North Hemisphere seems to work for me, as do all the other included areas http://www.komokaweather.com/komokaweat ... tremes.php.
Paul
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
Thanks
I wondered whether it was a timeout problem. Those that do show data are almost instant, even after clearing cache, whereas World and Northern Hemisphere display nothing for 12 or 13 seconds before just displaying the surrounding text.
World on your site (for me) takes 20 seconds to display and Northern Hemisphere about 16 seconds initially.
Update: I tried using some code that was applied to a fopen() (the script uses file() but I hoped it would have the same effect) to set the default_socket_timeout and I set the refresh cache to 60 seconds and I managed to see results for World and Northern Hemisphere once for each (out of half a dozen attempts) but that was all so it may have just been coincidence.
I wondered whether it was a timeout problem. Those that do show data are almost instant, even after clearing cache, whereas World and Northern Hemisphere display nothing for 12 or 13 seconds before just displaying the surrounding text.
World on your site (for me) takes 20 seconds to display and Northern Hemisphere about 16 seconds initially.
Update: I tried using some code that was applied to a fopen() (the script uses file() but I hoped it would have the same effect) to set the default_socket_timeout and I set the refresh cache to 60 seconds and I managed to see results for World and Northern Hemisphere once for each (out of half a dozen attempts) but that was all so it may have just been coincidence.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Extreme Weather script(s)
I think I've found a small niggle ...
The number of stations (results) requested has no connection with the $stations var.This means if you wanted to show more than 20 'results' (&rank=20) the extra data would never be called. In a similar way If you only want to display 15 (default $stations) you are requesting more records than you are displaying.
Fix (untested);
The number of stations (results) requested has no connection with the $stations var.
Code: Select all
/////////////////////////////////////////////////////////////////////////////
// Site to Parse
$siteSource = "http://www.ogimet.com/cgi-bin/gsynext?lang=en&state=$country&rank=20&ano=$year&mes=$month&day=$day&hora=$hour&Send=send";
/////////////////////////////////////////////////////////////////////////////
Fix (untested);
Code: Select all
/////////////////////////////////////////////////////////////////////////////
// Site to Parse
$siteSource = "http://www.ogimet.com/cgi-bin/gsynext?lang=en&state=$country&rank=$stations&ano=$year&mes=$month&day=$day&hora=$hour&Send=send";
/////////////////////////////////////////////////////////////////////////////
......................Imagine, what you will KNOW tomorrow !
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
Well spotted.
I thought that might be something to do with the timeout but, having already tried much smaller numbers for $stations, reducing the number to 5 still resulted in nothing being displayed for World and Northern Hemisphere for me, following a pause of 15-16 seconds.
btw, just specifying, http://www.ogimet.com/cgi-bin/gsynext in a browser, it takes 30 seconds to respond and lists (a default of) 30 stations for World ranking.
I thought that might be something to do with the timeout but, having already tried much smaller numbers for $stations, reducing the number to 5 still resulted in nothing being displayed for World and Northern Hemisphere for me, following a pause of 15-16 seconds.
btw, just specifying, http://www.ogimet.com/cgi-bin/gsynext in a browser, it takes 30 seconds to respond and lists (a default of) 30 stations for World ranking.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
I've updated mine to include all countries by populating the $extremesLocations and $extremesLocNames arrays with the appropriate codes and names.
The only problem I have found so far is that a request for Netherlands picks up both Netherlands and Netherlands Antilles because the code for the former is a subset of the latter. Invariably there are two words in similar circumstances so, for example, USA and UK have codes United+S and United+K whereas these two are Netherland and Netherlands+A (although, having said that, Niger and Nigeria work fine). I have emailed the site owner with details.
I added World, Europe and the two Hemispheres at the end but you can arrange them however you like.
Have placed the cache files in a sub-directory under cache.
If anyone is interested, pm me or, if there is much interest, I guess I could post the arrays here.
The only problem I have found so far is that a request for Netherlands picks up both Netherlands and Netherlands Antilles because the code for the former is a subset of the latter. Invariably there are two words in similar circumstances so, for example, USA and UK have codes United+S and United+K whereas these two are Netherland and Netherlands+A (although, having said that, Niger and Nigeria work fine). I have emailed the site owner with details.
I added World, Europe and the two Hemispheres at the end but you can arrange them however you like.
Have placed the cache files in a sub-directory under cache.
If anyone is interested, pm me or, if there is much interest, I guess I could post the arrays here.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- pernaczy
- Posts: 134
- Joined: Thu 15 Nov 2012 5:42 pm
- Weather Station: Fine Offset WH 2080, TFA Spring
- Operating System: Windows 7
- Location: Niesiolowice, Northern Poland
- Contact:
Re: Extreme Weather script(s)
Thanks Jerry.gluepack wrote:I've updated mine to include all countries by populating the $extremesLocations and $extremesLocNames arrays with the appropriate codes and names.
If anyone is interested, pm me or, if there is much interest, I guess I could post the arrays here.
I've installed this script and it works: http://www.pogoda-niesiolowice.kaszuby. ... nedane.php
Both 'World' and 'Northern Hemisphere' data are being displayed.
BTW. When entering Paul's site I can't see 'World' and 'Northern Hemisphere' data.
Piotr
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
I'm sure it has to be a timeout issue because, yesterday, I actually got World and Northern Hemisphere data to display.
There are site settings in (my) php.ini but, in the script, my host says...
The cache file usually shows text but cuts out before the location data.
When yours displays, how long is there between hitting enter and the data appearing?
Update: Well, that was a silly question, I can test it myself. World took 30 seconds at least. I think you must have a more lenient host.
There are site settings in (my) php.ini but, in the script, my host says...
The values appear to be high enough to not time out though. Mine goes to about 12-15 seconds.if you make adjustments to either max_execution_time, max_input_time or memory_limit, you risk getting your account suspended without any further warnings
The cache file usually shows text but cuts out before the location data.
When yours displays, how long is there between hitting enter and the data appearing?
Update: Well, that was a silly question, I can test it myself. World took 30 seconds at least. I think you must have a more lenient host.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- PaulMy
- Posts: 3881
- Joined: Sun 28 Sep 2008 11:54 pm
- Weather Station: Davis VP2 Plus 24-Hour FARS
- Operating System: Windows8 and Windows10
- Location: Komoka, ON Canada
- Contact:
Re: Extreme Weather script(s)
Hi Piotr,
My World and Northern Hemisphere do come up in IE10 for me but it takes some time for the initial one. All my others are nearly instant. Your World and Northern Hemisphere come up but takes about 30 secs for each whereas the others are quicker..
Paul
My World and Northern Hemisphere do come up in IE10 for me but it takes some time for the initial one. All my others are nearly instant. Your World and Northern Hemisphere come up but takes about 30 secs for each whereas the others are quicker..
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
Well, I tried IE to see if it was browser oriented and they still both display after 14-15 seconds with no locations.
I also tried Opera and essentially the same thing although there was a delay each time of a few seconds before Opera responded to the request, then the 14-15 seconds.
btw, I refresh my cache files, if they are more than a minute old. It isn't as if it automatically refreshes the screen. I figure that you are rarely going to want to look at the data for the same country more than once in a reasonable time period and, at least for me, it is pretty unlikely that I will have many people in a day looking at the same location and forcing an update so it is pointless setting it to anything else.
I also tried Opera and essentially the same thing although there was a delay each time of a few seconds before Opera responded to the request, then the 14-15 seconds.
btw, I refresh my cache files, if they are more than a minute old. It isn't as if it automatically refreshes the screen. I figure that you are rarely going to want to look at the data for the same country more than once in a reasonable time period and, at least for me, it is pretty unlikely that I will have many people in a day looking at the same location and forcing an update so it is pointless setting it to anything else.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- pernaczy
- Posts: 134
- Joined: Thu 15 Nov 2012 5:42 pm
- Weather Station: Fine Offset WH 2080, TFA Spring
- Operating System: Windows 7
- Location: Niesiolowice, Northern Poland
- Contact:
Re: Extreme Weather script(s)
Hi Paul,
Now it's OK. I can see your 'World' and 'Northern Hemisphere' data after 10-15 second (under Firefox). Jerry's data are still not visible.
Piotr
Now it's OK. I can see your 'World' and 'Northern Hemisphere' data after 10-15 second (under Firefox). Jerry's data are still not visible.
Piotr
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
Bear in mind that, if the site owner (or a visitor) has been able to access the data and the cache file duration is long, you may be able to access it speedily, within that timeframe.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- ace2
- Posts: 679
- Joined: Tue 14 Jan 2014 12:38 pm
- Weather Station: maxkon ws-1081pc
- Operating System: windows 7 & 8
- Location: Adelaide, south Australia, Australia
- Contact:
Re: Extreme Weather script(s)
I love these scripts and I've got them up and running
http://ace2weather.com/extremes.htm
But I'm finding sometimes the data is incomplete(Australia mainly and others)
It can be missing the rain or only have a few station listed...
Any ideas, I have changed the time zone to Australia, would that have anything to do with it??
http://ace2weather.com/extremes.htm
But I'm finding sometimes the data is incomplete(Australia mainly and others)
It can be missing the rain or only have a few station listed...
Any ideas, I have changed the time zone to Australia, would that have anything to do with it??
CHRIS
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
web site
http://www.ace2weather.com
Follow me on Twitter
http://tinyurl.com/kwlr9re
YouTube channel
http://tinyurl.com/lehwpgp
Facebook page
http://tinyurl.com/k3sap4s
Tiny URL links used
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
I assume you mean date_default_timezone_set('UTC');
Did you check it out with UTC before changing it (or have you rolled back to test it)?
Did you check it out with UTC before changing it (or have you rolled back to test it)?
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau
- gluepack
- Posts: 460
- Joined: Tue 22 Jan 2013 9:20 pm
- Weather Station: PCE-FWS 20
- Operating System: Win 7 Pro
- Location: Zlatina, Bulgaria
Re: Extreme Weather script(s)
btw rain is missing on some and many places don't have 20 stations, that's why I added the code that I have in my opening post, in order to make the lists variable length.
However, I see what you mean about the missing data, I would try with UTC.
Update: Oh, of course, year month day and hour are passed to the source site so, presumably, no appropriate data exists as you are so far ahead. Look at your header for temp/rain, it shows your date and time but UTC.
Looking at the code for the source site, there is no parameter for timezone so you are stuck with specifying UTC.
However, I see what you mean about the missing data, I would try with UTC.
Update: Oh, of course, year month day and hour are passed to the source site so, presumably, no appropriate data exists as you are so far ahead. Look at your header for temp/rain, it shows your date and time but UTC.
Looking at the code for the source site, there is no parameter for timezone so you are stuck with specifying UTC.
Last edited by gluepack on Wed 26 Aug 2015 2:37 pm, edited 2 times in total.
PWS links: Wunderground➤IVARNAPR3…CWOP/APRS➤E(W)2048…PWSWeather➤ZLATINABG…Awekas➤10631…Twitter➤@Zlatina_weather
Station type: PCE-FWS 20…Webcam link: View south to edge of Provadisko plateau