cloudy cloudy

Author Topic: NWS forecast issues  (Read 749 times)

0 Members and 1 Guest are viewing this topic.

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Posts: 5,155
  • North Bend, WA
  • OS/Browser:
  • Win NT 10.0
  • Mozilla compatible
    • North Bend Weather
NWS forecast issues
« on: November 18, 2018, 07:24:52 PM »
Im having a problem with my parents site with their forecast. It hasn't loaded for a few days now and everything looks good to me. The script on their site is the same as mine and is up to date. One error has me confused...

NWS server https://api.weather.gov/zones/JSON-LD/IDC009/forecast has an error.

I have no idea where IDC009 is coming from. There zone is IDZ004 and is set in the script correctly.

In the advforecast script Im using this...

Code: [Select]
$fileName = "https://forecast.weather.gov/MapClick.php?lat=47.0798&lon=-116.4201&unit=0&lg=english&FcstType=text&TextType=2";

http://www.fernwoodweather.com/wxforecast.php?force=1
"Nature can do without man, but man cannot do without nature."

Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam

Offline saratogaWX

  • Global Moderator
  • Posts: 5,945
  • Ken True
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win NT 10.0
  • Firefox 63.0
    • Saratoga Weather
Re: NWS forecast issues
« Reply #1 on: November 18, 2018, 08:28:40 PM »
In Settings.php, there is
Code: [Select]
$SITE['noaazone']         = 'IDC009'; // used for NOAA advisories and advforecast2.php forecasts
that should likely be
Code: [Select]
$SITE['noaazone']         = 'IDZ004'; // used for NOAA advisories and advforecast2.php forecasts
to have the fallback zone forecast available.  The County Zones do not contain forecast info (only warning stuff).

The point forecast is not displaying due to
Quote
<!-- point forecast more than 18hrs old (age h:m:s is 51:59:12) .. use Zone forecast instead -->
and since the Zone is misspecified, it fails too.  Correct the $SITE['noaazone'] and it should failover to the Zone forecast.
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Posts: 5,155
  • North Bend, WA
  • OS/Browser:
  • Android 8.0.0
  • Chrome 59.0.3071.125
    • North Bend Weather
Re: NWS forecast issues
« Reply #2 on: November 18, 2018, 10:11:39 PM »
Thanks ken,  got the forecast working.

Its strange though,  they have a air stagnation advisory for there area under IDC009, but when i use that in the settings script it causes the forecast error.  Using IDZ004 doesn't show the advisory,  but the forecast works using the IDZ004.
"Nature can do without man, but man cannot do without nature."

Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam

Offline saratogaWX

  • Global Moderator
  • Posts: 5,945
  • Ken True
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win NT 10.0
  • Firefox 63.0
    • Saratoga Weather
Re: NWS forecast issues
« Reply #3 on: November 19, 2018, 12:06:12 AM »
Sometimes, the warnings are County only and not propagated to the Zone forecast.  It's an NWS thing.
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates