Author Topic: NOAA Reports  (Read 924 times)

0 Members and 1 Guest are viewing this topic.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1129
  • BismarckWeather.net
    • BismarckWeather.net
NOAA Reports
« on: August 27, 2021, 11:46:04 AM »
Looks like the wxnoaaclimatereports.php is no longer working.  My site is just showing 100 degrees for all temps.

Looking at my Bismarck page, it looks like they took down the old TXT version of the NOAA reports.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8649
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA Reports
« Reply #1 on: August 27, 2021, 01:53:32 PM »
I don't understand... https://www.bismarckweather.net/wxnoaaclimatereports.php shows NOAA txt reports correctly.

Is there a different URL to wxnoaaclimatereports.php I should be looking at that shows the problem you cited?
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 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1129
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA Reports
« Reply #2 on: August 27, 2021, 02:24:46 PM »
Sorry, wrong file.  noaarec.php is the one calling for the data in the ajax-dashboard file.  Right below my rain totals.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8649
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA Reports
« Reply #3 on: August 27, 2021, 02:34:52 PM »
I'm not familiar with 'noaarec.php' script.  I see in the view-source of the home page
Quote
<!-- noaarec.php loaded -->

<!-- server day found in cache 27,,,,,, -->
<!-- thisDayMax MISSING -->
<!-- thisDayMaxYear MISSING -->
<!-- thisDayMin MISSING -->
<!-- thisDayMinYear MISSING -->
<!-- thisDayMaxAvg MISSING -->
<!-- thisDayMinAvg MISSING -->
<!-- NO tomorrow found in cache -->

<!-- RING NOAA -->
<!-- NOAA data FAIL -->
<!-- Couldn't get valid thisDayMax -->
<!-- Couldn't get valid thisDayMaxYear -->
<!-- Couldn't get valid thisDayMin -->
<!-- Couldn't get valid thisDayMinYear -->
<!-- Couldn't get valid thisDayMaxAvg -->
<!-- Couldn't get valid thisDayMinAvg -->
<!-- NEW cache out: 27,,,,,,
 -->
You'll need to post the code of the noaarec.php for others to help fix the issue.
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 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1129
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA Reports
« Reply #4 on: August 27, 2021, 02:42:03 PM »
Sure thing.  Beetlejuice had originally created the program.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1129
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA Reports
« Reply #5 on: August 27, 2021, 03:16:32 PM »
I noticed the pages have changed.  So I'm wondering if the source file that was read has changed locations.
 
If you go to this site, change to the Observed Weather tab.  Then open Daily Climate report for Bismarck, I believe that is the text file that was being scraped.

https://www.weather.gov/wrh/climate?wfo=bis
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8649
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NOAA Reports
« Reply #6 on: August 27, 2021, 04:37:37 PM »
It took a bit of work, but I think I've fixed it using a different URL and access arrangement.
Had to add a stream context to the file_get_contents() request with a browser user agent.
Switched to using a preg_match_all() to extract the <pre> content for parsing.


« Last Edit: August 27, 2021, 05:01:36 PM by saratogaWX »
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 the beteljuice

  • the beteljuice
  • Forecaster
  • *****
  • Posts: 316
    • test site
Re: NOAA Reports
« Reply #7 on: August 27, 2021, 06:29:12 PM »
 =D&gt; Many Thanks Ken !!

This is proper to this thread.

I hadn't realised they'd changed everything around permanently again  :roll:

Your modified version is now 'the release' in the above thread.

Once again - thank you, my head feels better already  :grin:
« Last Edit: September 03, 2021, 10:28:11 AM by the beteljuice »
Imagine what you will KNOW tomorrow !

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1129
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA Reports
« Reply #8 on: August 27, 2021, 08:01:45 PM »
Thanks to you both.  It's up and running again.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 536
    • Up Country Maui Weather
Re: NOAA Reports
« Reply #9 on: September 01, 2021, 03:49:15 PM »
Hi All,

Got mine to work. Thanks Ken, beteljuice and John from Phoenix in steering me in the right direction for the fixes.

Aloha,

--Stan Y.
   Maui, Hawaii
« Last Edit: September 01, 2021, 03:51:28 PM by Silversword »
Stan Y. - KH6HHG - Maui, Hawaii --- Blitzortung ID: 993 --- FlightRadar24 ID: F-PHOG1
Weather Display 10.37s Build 120
WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
1-Wire Lighting
Webcam: Axis 211

Offline mikeym2m

  • Contributor
  • ***
  • Posts: 148
    • MikeyM's Thornhurst PA Weather
Re: NOAA Reports
« Reply #10 on: September 02, 2021, 09:52:20 PM »
Thanks Ken, beteljuice and John for the fix!  [tup]  All working good again.

Cheers

MikeyM

Offline ed2kayak

  • Ed
  • Forecaster
  • *****
  • Posts: 611
  • Davis Vantage Pro2 w/12 hr FARS, solar/uv
    • Cumberland Valley Weather
Re: NOAA Reports
« Reply #11 on: September 03, 2021, 09:57:47 AM »
Thanks! [tup]
Ed
CoCoRaHS PA-CD-6,  Weather Underground KPAMECHA7, CWOP DW5425

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2341
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: NOAA Reports
« Reply #12 on: September 29, 2021, 01:52:58 PM »
My Oklahoma City NOAA source failed.  The next nearest one, Tulsa, failed too.  The next nearest one, Wichita works.  Hopefully, they're not further failing elsewhere.

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1129
  • BismarckWeather.net
    • BismarckWeather.net
Re: NOAA Reports
« Reply #13 on: September 29, 2021, 02:13:47 PM »
Mine seems to be working fine.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI