Author Topic: Advforecast2.php error  (Read 652 times)

0 Members and 1 Guest are viewing this topic.

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Advforecast2.php error
« on: March 25, 2025, 10:37:46 PM »
This just popped up on my main page of my site. My files are all up to date.

Warning: Undefined array key "properties" in /homepages/8/d252567151/htdocs/advforecast2.php on line 2412

Line 2412....   $rawPJSON = json_decode($content, true); // parse the JSON into an associative array
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Advforecast2.php error
« Reply #1 on: March 25, 2025, 11:01:23 PM »
The zones have changed recently in the Seattle WFO.  Your WAZ555 is no longer valid.  The forecast zone is now WAZ307 and county zone remains WAC033

See https://www.weather.gov/media/notification/pdf_2023_24/scn24-69_sew_public_zone_changes_march_2025_aac.pdf for details.

BTW, running wxforecast.php?force=1 and doing a view-source shows the issue
Quote
<!-- advforecast2.php (JSON) - V5.19 - 27-Dec-2022 on PHP 8.3.19-->
<!-- RAW NWS URL: https://forecast.weather.gov/MapClick.php?lat=47.4954&lon=-121.7869&unit=0&lg=english&FcstType=text&TextType=2  zone=WAZ555 -->
<!-- DualImage function is not available with .gif icons;     -->
<!-- first image of any dual-image found will be displayed instead -->
<!-- meta info re: point='47.4954,-121.7869' zone='zones' metacache= './cache/forecast-WAZ555-0-geojson-meta.txt' -->
<!-- metaZoneURL='https://api.weather.gov/zones/forecast/WAZ555' -->
<!-- meta cache ./cache/forecast-WAZ555-0-geojson-meta.txt age=2:56:23 h:m:s -->
<!-- loaded meta info from ./cache/forecast-WAZ555-0-geojson-meta.txt age=2:56:23 h:m:s -->
<!-- getting metadata for forecast zone from https://api.weather.gov/zones/forecast/WAZ555 -->
<!-- logged 'Fetch fail' to './cache/advforecast2-log-2025-03-25.txt' -->
<!-- curl fetching 'https://api.weather.gov/zones/forecast/WAZ555' -->
<!-- HTTP stats:  RC=404 dest=23.220.150.18 port=443 (from sce=74.208.58.89)
      Times: dns=0.001 conn=0.023 pxfer=0.055 get=0.031 total=0.085 secs -->
<!-- headers returned:
HTTP/2 404
server: nginx/1.20.1
content-type: application/problem+json
x-powered-by: PHP/8.0.30
x-request-id: 31decaf9-b3d1-41a5-b7aa-9986270ec868
x-correlation-id: 5cb26880
x-server-id: vm-lnx-nids-apiapp1.ncep.noaa.gov
access-control-allow-origin: *
access-control-expose-headers: X-Correlation-Id, X-Request-Id, X-Server-Id
pragma: no-cache
content-length: 264
cache-control: private, must-revalidate, max-age=2591995
expires: Fri, 25 Apr 2025 02:52:33 GMT
date: Wed, 26 Mar 2025 02:52:38 GMT
x-cache: TCP_NEGATIVE_HIT from a23-38-110-38.deploy.akamaitechnologies.com (AkamaiGHost/22.0.0.1-318443691900e5d3d78f5dd48f596007) (-)
x-edge-request-id: 1403e877
vary: Accept,Feature-Flags,Accept-Language
strict-transport-security: max-age=31536000 ; includeSubDomains ; preload
x-akamai-request-id: 1403e877
 -->
<!-- META
array (
  'city' => 'North Bend',
  'state' => 'WA',
  'point' => '47.4954,-121.7869',
  'forecastOfficeURL' => 'https://api.weather.gov/offices/SEW',
  'forecastURL' => 'https://api.weather.gov/gridpoints/SEW/141,59/forecast',
  'forecastZoneURL' => 'https://api.weather.gov/zones/forecast/WAZ307',
  'forecastZone' => 'WAZ307',
  'forecastHourlyURL' => 'https://api.weather.gov/gridpoints/SEW/141,59/forecast/hourly',
  'forecastGridDataURL' => 'https://api.weather.gov/gridpoints/SEW/141,59',
  'observationStationsURL' => 'https://api.weather.gov/gridpoints/SEW/141,59/stations',
  'countyZoneURL' => 'https://api.weather.gov/zones/county/WAC033',
  'countyZone' => 'WAC033',
  'fireWeatherZoneURL' => 'https://api.weather.gov/zones/fire/WAZ657',
  'fireWeatherZone' => 'WAZ657',
  'timeZone' => 'America/Los_Angeles',
  'radarStation' => 'KATX',
  'WFOname' => 'Seattle/Tacoma, WA',
  'WFOphone' => '(206) 526-6087',
  'WFOemail' => 'w-sew.webmaster@noaa.gov',
) -->
<!-- WARNING: NOAAZone='WAZ555' is not correct.  Will use 'WAZ307' for this point location per NWS. -->
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 ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: Advforecast2.php error
« Reply #2 on: March 25, 2025, 11:09:43 PM »
I just searched my forecastwx file and advforecast2 file and don't see anything with WAZ555 anymore. I changed all of those on the 19th when the zones changed.

This is my setting in the advforecast2 file... $NOAAZone = 'WAZ307'; // change this line to your NOAA warning zone.
« Last Edit: March 25, 2025, 11:12:25 PM by ALITTLEweird1 »
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9697
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Advforecast2.php error
« Reply #3 on: March 25, 2025, 11:24:02 PM »
Look in Settings.php
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 ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 956
    • North Bend Weather
Re: Advforecast2.php error
« Reply #4 on: March 25, 2025, 11:32:12 PM »
Look in Settings.php

 #-o #-o

I missed this line "WAZ307|North Bend|https://forecast.weather.gov/MapClick.php?lat=47.4954&lon=-121.7869&unit=0&lg=english&FcstType=text&TextType=2"

All good now. Thanks Ken.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Reolink Webcam + Soil temp + Soil Moisture