Author Topic: Forecast doesn't match printable point and click  (Read 201 times)

0 Members and 1 Guest are viewing this topic.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6080
    • LiVE WEATHER
Forecast doesn't match printable point and click
« on: January 14, 2020, 11:14:40 AM »
This has been driving me nuts for some time with all this wording about afternoon temperatures falling or rising to ## when the actual forecast says nothing about this.
My main Issue today tomorrow's high temp by NWS says 13F but my website says 19F.  I can't figure it out.
I've copied this exact URL address into both advforecast2.php and settings.php all places.

https://forecast.weather.gov/MapClick.php?lat=42.8737&lon=-100.55&unit=0&lg=english&FcstType=text&TextType=2
Looks like this:
 [ You are not allowed to view attachments ]
But get this, notice all the extra wording.
 [ You are not allowed to view attachments ]

I'm sure its something I've done but can't figure it out.



Randy

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 632
    • LexMAWeather
Re: Forecast doesn't match printable point and click
« Reply #1 on: January 14, 2020, 11:26:01 AM »
What's your site link again?

My first guess is that you are running Ken's latest (V5) advforecast, which translates the map click URL to the new API URL. Just want to see if that's happening.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6080
    • LiVE WEATHER
Re: Forecast doesn't match printable point and click
« Reply #2 on: January 14, 2020, 11:30:59 AM »
Thanks for looking, could the forecast temp. issue be they made a change and I'm using a cache?
https://www.valentinenebraska.net/wxforecast.php
Randy

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 632
    • LexMAWeather
Re: Forecast doesn't match printable point and click
« Reply #3 on: January 14, 2020, 11:32:45 AM »
Yeah, I think that's it. I just pulled from my site and I get the latter wording. You need to use the V4.xx version if you want it to match the map click.

https://lexmaweather.info/forecast.php?lat=42.8782&long=-100.5138

Ah, now I see you've replied and I can look for sure...

Code: [Select]
         <!-- advforecast2.php (JSON) - V5.13 - 08-Aug-2019 on PHP 5.4.45-->
Yup.

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 632
    • LexMAWeather
Re: Forecast doesn't match printable point and click
« Reply #4 on: January 14, 2020, 11:36:48 AM »
Also, I'd really recommend moving to a current PHP version if that comment line is correct vis-a-vis what you are running now. PHP 5.4 hasn't been supported / patched since 2015.


Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6080
    • LiVE WEATHER
Re: Forecast doesn't match printable point and click
« Reply #5 on: January 14, 2020, 11:41:22 AM »
Okay changed to the only old version I have 4.05 and it looks normal, Thankyou
I was under the impression we needed to change to the latest.
Randy

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7630
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Forecast doesn't match printable point and click
« Reply #6 on: January 14, 2020, 11:44:54 AM »
The forecast.weather.gov/MapClick uses data from internal(NWS) sources, the advforecast2 V5 script uses the data from api.weather.gov.
 
Sometimes, the API and the internal(NWS) sources do not match due to internal NWS data sync issues.  Since they took down the forecast-v3 site (which used the API, there's no longer a good way to show that the differences exist due to internal NWS issues.

The check-fetch-times.php?show=versions will always use the V5 script as the 'latest'.  The V4 script hasn't been updated since V4.05 - 21-May-2018 , but since the forecast.weather.gov site has remained the same, the script still works just fine.

Yes, reverting to the advforecast2 V4 script would keep your site in total sync with what forecast.weather.gov/MapClick says.
And yes to what Jasiu says.. PHP 5.4 has been 'gone' a long time.  Best to use PHP 7.2+ (I'm using 7.4.1)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6080
    • LiVE WEATHER
Re: Forecast doesn't match printable point and click
« Reply #7 on: January 14, 2020, 11:50:27 AM »
Thank you both. This change to PHP 7.2 is something I do at my host Godaddy?
Randy

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 632
    • LexMAWeather
Re: Forecast doesn't match printable point and click
« Reply #8 on: January 14, 2020, 11:53:28 AM »
Yes, it should be configurable there.

Note that if you are running code outside of stuff from the likes of Ken and Jerry that you may run into some issues as the new version of PHP has deprecated some practices that used to work (but were ambiguous) in previous versions.

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6080
    • LiVE WEATHER
Re: Forecast doesn't match printable point and click
« Reply #9 on: January 14, 2020, 11:55:22 AM »
Thanks, I'll give it a go and see what happens.
Randy

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6080
    • LiVE WEATHER
Re: Forecast doesn't match printable point and click
« Reply #10 on: January 15, 2020, 10:57:25 AM »
Just an update I upgraded to PHP 7.3 but had some issues so I tried 7.0 and everything is working.
 
I also upgraded Settings.php to the latest version but after I tried 7.3.  That took a while getting right because I use custom CSS scripts. 
Point and click forecast is working today.
Randy

 

anything