31
Weather Website PHP/AJAX scripting / Re: Advforecast2.php error
« Last post by saratogaWX 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
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. -->