Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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

include-NOAA-reports.php year rollover anomaly

Discussion of Ken True's web site templates

Moderator: saratogaWX

BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

include-NOAA-reports.php year rollover anomaly

Post by BCJKiwi »

It is currently the 1st Jan 2013 here and we are in daylight saving time (summertime?) and are 13hrs AHEAD of UTC rather than the 'normal' 12 hrs.
Our website and data started in July 2012 so we still don't have a full year of data, and until tomorrow won't have any NOAA data for 2013.
So I was looking at our site to see if there were any anomalies and unfortunately found one with the NOAA style reports.

I have checked and the script we are running is unchanged from the original (ver 2.03 03-Dec-2011).

The latest month file (webserver time stamp - 1/01/2013 12:00:11 a.m.) is NOAAMO1212
The latest year file (webserver time stamp - 1/01/2013 12:00:11 a.m.) is NOAAYR2012

It seems to me (but what do I know in this area of programming?) that the problem may be to do with the special handling for Cumulus to determine the date range of the available NOAA reports. This appears to use the current date rather than determining the actual files available in the folder.
The following result occurs (and will probably only occur on the first day of each year) which results in this output.
If 2013 is clicked there is a message saying there is no data (ideally the 2013 row should not be there) and if you click the Jan button beside 2013 you get December 2012.
You do not have the required permissions to view the files attached to this post.
User avatar
saratogaWX
Posts: 1181
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by saratogaWX »

I think it is an error caused by supporting multiple weather software with one script. My original script supported only WeatherLink, which uploads a current-year and current-month file every upload cycle. VWS does likewise. Cumulus only uploads the month and year updated files just after midnight. Weather-Display does the same (update daily). This is likely a 1-day a year issue for Cumulus, but I'll look at what might be done to fix that issue.

Best regards,
Ken
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by BCJKiwi »

Thanks
User avatar
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: include-NOAA-reports.php year rollover anomaly

Post by beteljuice »

@Ken

Just checked a few Aus & NZ sites using the original code and their menus / display are correct.
ie. In 'classic' style The current year (2013) is all 'dead' and the (last) Dec 2012 report is displayed.
Image
......................Imagine, what you will KNOW tomorrow !
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by BCJKiwi »

@ Beteljuice
I had some difficulty finding sites to comapre. Can you give me a couple of links please. Since it is now 2/Jan/2013 here I don't know if they will be much use to me but I would like to look.

Did you notice if they had data for Jan 2012 (which I don't)?

Of course, now that it is the 2 Jan, everything looks OK.
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by mcrossley »

I *think* mine is pretty much stock...
http://weather.wilmslowastro.com/reports.php

Edit: Oops, sorry just noticed this thread is about Kens templates. Mine is the vanilla cu page
Last edited by mcrossley on Tue 01 Jan 2013 10:37 pm, edited 2 times in total.
User avatar
saratogaWX
Posts: 1181
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by saratogaWX »

I'm seeing the issue on my CU page now.. (it's still 1/1/2013 here) so I'm debugging it while I have this once-a-year chance :)
User avatar
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: include-NOAA-reports.php year rollover anomaly

Post by beteljuice »

@BCJKiwi

Here's a partial screen grab of an Aus site I viewed earlier.
Original script and in drop-down style.

Nav bar created for (New) year with no active links (because a Jan 2013 file has not been created yet) and last known report displayed.
NOAA_Reports.png
You do not have the required permissions to view the files attached to this post.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
saratogaWX
Posts: 1181
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by saratogaWX »

I think I've got it worked out for the 4 software types (WL, Cumulus, VWS and wview) on my test site.
Yes, it does create a no-links 2013 row, but correctly displays the last monthly file available.

I'll make sure it works correctly tomorrow (2-Jan-2013) after the reports are available overnight.

The revised script is attached :)

Test on my site with:

Cumulus: http://saratoga-weather.org/wxtemplates ... .php?wx=cu
WeatherLink: http://saratoga-weather.org/wxtemplates ... .php?wx=wl
wview: http://saratoga-weather.org/wxtemplates ... .php?wx=wv
VWS: http://saratoga-weather.org/wxtemplates ... php?wx=vws

Best regards,
Ken
You do not have the required permissions to view the files attached to this post.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by BCJKiwi »

@Beteljuice
I'm not sure about that site;
1. It has a different button array arrangement (^v selectable years) and presumably different code around the year/mo setup.
2. Does it get it's data from Cumulus?


@Ken
It is now 2 Jan in NZ (in the afternoon already!)
I see there was a ver 2.04 between the 2.03 I'm using and the new 2.05. Without great study I presume the changes in 2.04 were only for wview?
Have another issue now with the proposed fix. It shows Jan1 data when first opened but when you click on anything else or come back to Jan 2013 all I see is this;
You do not have the required permissions to view the files attached to this post.
User avatar
saratogaWX
Posts: 1181
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by saratogaWX »

Yes, the main difference between 2.03 and 2.04 was adding support for wview.

Do you have the page with the 2.05 version up on your site? I'd like to see it directly (not just a picture) to see what is happening.. there is additional debugging code built-in to 2.05. If you clone your current wxnoaaclimatereports.php page to a new name, and include the v2.05 include-noaa-reports.php (using a different name) that would help debug what's going on.

Best regards,
Ken
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by BCJKiwi »

User avatar
saratogaWX
Posts: 1181
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by saratogaWX »

Thanks... Try the attached.. I think I fixed the issue. .. replace your V2.05 with this one.

Best regards,
Ken
You do not have the required permissions to view the files attached to this post.
BCJKiwi
Posts: 1255
Joined: Mon 09 Jul 2012 8:40 pm
Weather Station: Davis VP2 Cabled
Operating System: Windows 10 Pro
Location: Auckland, New Zealand
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by BCJKiwi »

Yes that seems to work OK.

It does display the 2013 row even when there is no 2013 data but we are in the 2013 year (renamed 2013 month and year NOAA files to exclude them for the test).

It does work properly for the 2nd Jan with 2013 mo and yr NOAA files in place, showing only the 1 Jan data (since the NOAA data for 2 Jan won't be available until 3 Jan).

Thanks V Much.
User avatar
saratogaWX
Posts: 1181
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: include-NOAA-reports.php year rollover anomaly

Post by saratogaWX »

Thanks for spotting the issue and testing the fix(es).. I'll release the update on 2-Jan (Pacific time).

Best regards,
Ken
Post Reply