Author Topic: Wrong rainfall amounts in wxhistory.php  (Read 799 times)

0 Members and 1 Guest are viewing this topic.

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Wrong rainfall amounts in wxhistory.php
« on: December 29, 2021, 04:40:18 PM »
I'm not sure if this is a Weather Display issue or a script issue. This issue started in November and is continuing in December.

The November wxhistory.php file, (https://novawx.dscloud.me/~thunder/wxhistory.php?date=202111#header), (and November2021.htm) shows 0.00" of rain every day. The total for the month and total for the year in the Average and Extremes for Month table are correct. The Daily Rain Totals table shows three days with rain, two of which are the wrong days and amounts (see attached screen capture)

There were seven rain days in November, all correctly displayed on Weather Underground (https://www.wunderground.com/dashboard/pws/KVAALDIE28/table/2021-11-29/2021-11-29/monthly).

The WD daily, monthly, and yearly rain amounts in the 112021lg.txt log file are correct.

I keep my WD software current, but the issue started after I installed Build 132, so today I fell back to Build 131.

Any suggestions on the cause and remedy? Sometimes the 112021lg.txt file can get corrupted and manually editing and updating it in WD fixes rain error issues, but since the file is correct, I'm looking for suggestions on other places to investigate.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Wrong rainfall amounts in wxhistory.php
« Reply #1 on: December 30, 2021, 12:22:08 PM »
I think it's a WD issue.  The wxhistory.php page just parses and formats the data provided by WD (and makes translations for the text if needed).  The source data for that page (for 2021-11) is https://novawx.dscloud.me/~thunder/November2021.htm produced by WD.  The end of that page has the wrong daily totals
Quote
-----------------------------------
 Daily rain totals
 -----------------------------------
 00.03 in.  on day 21
 00.03 in.  on day 25
 00.04 in.  on day 26

You can re-create the Av/Ext report in Weather-Display by using View, Averages/Extremes, Recreate the Web Av/Ext Page and select 2021 11 for the month.  You may have to manually upload the November2021.htm page to your site afterwards.

Hope this helps...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #2 on: December 30, 2021, 12:45:20 PM »
Yeah, thanks Ken. I figured it was WD, which is why I fell back a few builds. I planned to recreate Nov and Dec in WD before the end of the year, which should fix those two months and hopefully the older build will prevent future issues. We shall see what happens in January.

Offline Weerstation

  • Member
  • *
  • Posts: 43
    • Westland De Poel
Re: Wrong rainfall amounts in wxhistory.php
« Reply #3 on: December 26, 2022, 08:42:41 AM »
Hello Ken and Weatherdoc.

Sorry for asking my question in a one year old thread.
My question is not related to your question Weatherdoc but I noticed on your site the same thing as on my site.
If you go to the january 2022 report, the first day.
You had 0.61 inches of rain on January 1st.
The month total for January on January 1 st is 3.41 inches. ( January 1st + Rain in January 2.803)

On January 31 month 2.82 and  year 5.61 inches (Double amount, it adds up the total rain in January to the accumulated amount in January!)

And on Up to day January 31 2.801 month and 2.801 year. (I believe this is correct)

A bit confusing but it  adds up the total rain in January on every single day.
Is this correct or a bug?
I don't understand why the script is doing that.

https://novawx.dscloud.me/wxhistory.php?date=202201

https://www.westland-depoel.nl/vantagevue/ws/wxhistory.php?date=202201

Zero rain on first day
0 mm for month
49.6 mm for year (Total rain in January was 49.6 mm)

« Last Edit: December 26, 2022, 08:44:33 AM by Weerstation »

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #4 on: December 26, 2022, 12:09:32 PM »
You are correct - I hadn't noticed that. I just ran my January 2022 log file (12022.lg.txt) through Stuart's script (http://www.stella-maris.org.uk/checklogs.php) and it identified the first line of the file as incorrect year. The hour and minute were correct (both zero) but the year was 2021 for some reason. That line also should've had zero for daily and annual precipitation, but it looks like it was a carry-over from December 2021 (but not the exact amounts). I corrected that line in the file and then updated it in WD and the January record (https://novawx.dscloud.me/wxhistory.php?date=202201) is now correct. Looking at January 1 2019, 2020, and 2021 - they all have an error for the monthly precipitation.

Here's January 1, 2021 - row 1 has the wrong year for hour and minute zero and the wrong monthly and yearly rain. There must be or had been a bug in the WD code.



It will be interesting to see if the error repeats itself on 1 January 2023.
« Last Edit: December 26, 2022, 12:41:01 PM by weatherdoc »

Offline Weerstation

  • Member
  • *
  • Posts: 43
    • Westland De Poel
Re: Wrong rainfall amounts in wxhistory.php
« Reply #5 on: December 27, 2022, 12:28:00 PM »
Have you checked other months.
I think all months have the same problem.

Offline hcorrin

  • Contributor
  • ***
  • Posts: 126
    • Ballaugh Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #6 on: December 27, 2022, 12:46:05 PM »
The problem is with the monthyyyy.htm file created by WD that wxhistory.php is reading
I had to use build 101 to get round the problem but the last build 145 I put on mid December still has the problem

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #7 on: December 27, 2022, 05:08:37 PM »
Only seems to be January for me.

Offline Weerstation

  • Member
  • *
  • Posts: 43
    • Westland De Poel
Re: Wrong rainfall amounts in wxhistory.php
« Reply #8 on: December 30, 2022, 08:59:16 AM »
The problem is with the monthyyyy.htm file created by WD that wxhistory.php is reading
I had to use build 101 to get round the problem but the last build 145 I put on mid December still has the problem

Ok, thanks for that info.

Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #9 on: January 01, 2023, 08:36:27 AM »
Here we go again...Happy New Year and the first row of the January 2023 log file (12023lg.txt) produced by WD is incorrect. The monthly and yearly rain is the same as the last row of December 2022 (122022lg.txt).


Offline weatherdoc

  • Senior Contributor
  • ****
  • Posts: 180
    • Willowsford Farm Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #10 on: January 01, 2023, 04:02:47 PM »
I contacted Brian about the error and his reply was:

it wont affect anything in any way though

as its the WD datafiles that are used for WDs data

Offline Vasco

  • Forecaster
  • *****
  • Posts: 334
    • PWS
Re: Wrong rainfall amounts in wxhistory.php
« Reply #11 on: January 01, 2023, 04:23:17 PM »
So if you try to convert WD log files to WD data files. . .?
Oregon Scientific WMR200 + Weather Display in Windows 10

Offline hcorrin

  • Contributor
  • ***
  • Posts: 126
    • Ballaugh Weather
Re: Wrong rainfall amounts in wxhistory.php
« Reply #12 on: January 01, 2023, 05:11:43 PM »
well if the values end up in the datafile that may be the cause of the monthyear.htm problem i have
i corrected the values and recreated the graph data file and will see what happens but will need to do the same on 1st Feb to be sure i am on the right track