Web Weather > Weather Website PHP/AJAX scripting

Advforecast2 uncaught error


This happened a few weeks ago and saw it this afternoon also.
Would this be bad data from the NWs that caused the script to error like this?

Yes, it was likely a timeout where no data was returned from the curl request .. that is an issue with the V4.x advforecast2.php script if no (or unexpected HTML) is returned from forecast.weather.gov page.

Is the V5 advforecast still problematic? I remember there were NWS issues with that one a while back.

The V5 is much improved now that the NWS has fixed the majority of the issues with stale forecasts.  I still get 0 to 5 500-Server Error reponses per day, but that's quite livable.  The documentation updates area cites:
--- Quote ---    Radar station information (/radar endpoints) performance is unreliable.
    The zones endpoint has a constraint on the number of zones able to be returned at once. Requesting many zones will result in an error.
    The gridpoints endpoint returns a 500 error. Retrying the request generally returns valid data.
    Observations are not being sorted in chronological order.
    The API is returning gridpoints that are off by 1,1. This causes forecasts for AFG, AJK, CAE, DLH, HNX, LIX, LWX, MAF, MFR, MLB, MRX, MTR to fall outside the bounding box of the grid.
    The gridpoints/forecast and gridpoints/forecast/hourly endpoints do not work for WFO AFC (site id AER and ALU on the gridpoints endpoint).

Updated 5/10/2022
--- End quote ---
as 'known issues', and
--- Quote ---Upstream Issues/Changes

The following issues are related to upstream sources of the API, and are not an API bug.

    Delayed observations

    Observations may be delayed up to 20 minutes from MADIS, the upstream source.
--- End quote ---
--- Quote ---Resolutions

The following issues have been recently resolved. As of 2/25/22

    The gridpoints endpoint no longer serves stale data. For this endpoint we currently are not returning the Last-Modified header. In addition, the If-Modified-Since header is also being ignored for gridpoints request.

--- End quote ---

They've been having intermittent issues with NWS networking, so it's a good idea to check NCO Status messages when you experience a problem and see if they're having network problems with forecast.weather.gov or api.weather.gov.  They did have some yesterday :)

Bottom line:  the V5 script is pretty much as reliable as the V4 script now.


[0] Message Index

Go to full version