NWS forecast.weather.gov changing 24-Apr-2017. New advforecast2.php V5.00

No longer changing ‘at any time’ … the new date is 19-Jun-2017 for cutover. 4th time the charm, I guess.

Meanwhile you can prepare for the change (and use the new advforecast2.php V5.01 script) by checking your Settings.php for $SITE[‘NWSforecasts’] = array( … ); or if standalone, the $NWSforecasts = array( … ); entries.

If they look like

  "VTZ007|Coles Pond Area|http://forecast.weather.gov/MapClick.php?site=btv&FcstType=text&site=BTV&map.x=290&map.y=88&TextType=2",
  "VTZ004|Island Pond VT|http://forecast.weather.gov/MapClick.php?lat=44.817889670988784&lon=-71.87667846679688&site=btv&unit=0&lg=en&FcstType=text&TextType=2",
  "NHZ001|Pittsburg NH|http://forecast.weather.gov/MapClick.php?lat=45.05606124274415&lon=-71.38778686523438&site=gyx&unit=0&lg=en&FcstType=text&TextType=2",
  "VTZ007|St Johnsbury VT|http://forecast.weather.gov/MapClick.php?map.x=307&map.y=100&site=BTV&FcstType=text&zmx=1&zmy=1&TextType=2",
  "VTZ017|Burlington VT|http://forecast.weather.gov/MapClick.php?map.x=208&map.y=93&site=BTV&FcstType=text&zmx=1&zmy=1&TextType=2",
  "VTZ008|Montpelier VT|http://forecast.weather.gov/MapClick.php?map.x=261&map.y=118&site=BTV&FcstType=text&zmx=1&zmy=1&TextType=2",
  "VTZ003|Newport VT|http://forecast.weather.gov/MapClick.php?map.x=289&map.y=43&site=BTV&FcstType=text&zmx=1&zmy=1&TextType=2",

you should (while you can) convert them to MapClick.php URLS that have lat= and long= in them like

  "VTZ007|Coles Pond Area|http://forecast.weather.gov/MapClick.php?lat=44.5421&lon=-72.215&unit=0&lg=english&FcstType=text&TextType=2",
  "VTZ004|Island Pond VT|http://forecast.weather.gov/MapClick.php?lat=44.81788&lon=-71.87667&unit=0&lg=english&FcstType=text&TextType=2",
  "NHZ001|Pittsburg NH|http://forecast.weather.gov/MapClick.php?lat=45.05606&lon=-71.38778&unit=0&lg=english&FcstType=text&TextType=2",
  "VTZ007|St Johnsbury VT|http://forecast.weather.gov/MapClick.php?lat=44.4156&lon=-71.975&unit=0&lg=english&FcstType=text&TextType=2",
  "VTZ017|Burlington VT|http://forecast.weather.gov/MapClick.php?lat=44.4881&lon=-73.2262&unit=0&lg=english&FcstType=text&TextType=2",
  "VTZ008|Montpelier VT|http://forecast.weather.gov/MapClick.php?lat=44.2665&lon=-72.5719&unit=0&lg=english&FcstType=text&TextType=2",
  "VTZ003|Newport VT|http://forecast.weather.gov/MapClick.php?lat=44.937&lon=-72.2089&unit=0&lg=english&FcstType=text&TextType=2",

The easy way to do this (while the current forecast.weather.gov is up) is to:

  1. copy the URL into the browser and remove the &TextType=2 from the end of the URL and press enter.
  2. near the bottom of the page, right click on the “Printable Forecast” link and copy THAT URL to replace your URL in the list. It will have lat=…&lon=… in it.
  3. repeat for your entire list. then save the update to Settings.php (or the advforecast2.php script if standalone).

Then you’ll be fully ready for the conversion of the forecast.weather.gov site when it finishes.

Also, there is a small setting in advforecast2.php (JSON) V5.00 that controls what URLs are used for the clickable Alert and detail links. It is currently set as

$useProdNWS = true; // =false, use preview V3 sites, =true, use production sites (after 24-Apr-2017)

which causes the detail alerts from alerts.weather.gov and detail page links to forecast.weather.gov.
You might want to change it to

$useProdNWS = false; // =false, use preview V3 sites, =true, use production sites (after 24-Apr-2017)

to have the (working) alert details from alerts-v2.weather.gov and the (working) forecast-v3.weather.gov sites until the real conversion is finished.
V5.01 changed the setting to $useProdNWS = false; (only change, except versioning) from 5.00.

I do notice that the forecast-v3.weather.gov site shows some alerts that are missing from the api.weather.gov queries … they appear to be using some internal scripting from a different source to extract the alerts (which appear the same on the current forecast.weather.gov and forecast-v3.weather.gov for a particular point-forecast).

I hope they’ll iron out the differences before the next cutover… the api is to be the ‘official’ method of getting that data.

Impact to users of the advforecast2.php V5.X: some alerts may not be displayed on the page, but Curly’s nws-alerts script (which uses alerts.weather.gov) should continue to display them in the sidebar of Saratoga USA sites.

Fortunately, the api.weather.gov site (used for all the JSON retrieval) has been stable during their fiddling with forecast.weather.gov.