Author Topic: NWS forecast.weather.gov changing 7-Mar-2017. New advforecast2.php V5.00  (Read 17776 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
The announced changover date for forecast.weather.gov is still 7-Mar-2017 and it has a lot of changes.  The forecast-v3.weather.gov site (preview NWS site) shows what the new site will look like.

For we who operate personal weather websites that use my advforecast2.php script, be aware that the coming changes will make V4.x of the script NO LONGER WORK as they have removed the /MapClick.php?... functionality of the forecast.weather.gov website in favor of a new request mechanism.

I've put together advforecast2.php V5.00 as a fairly complete rewrite of the prior script.  It now uses the api.weather.gov website to retrieve JSON data for point-forecasts, zone forecasts and the needed metadata about both.
I'm not going to release the update via my usual channels (script page and Saratoga template Updates tool) until AFTER their cutover is done, but... you can make your USA website ready by installing the contents of the attached zip file.

Here's the README file included with the .zip file that helps explain what's changed:

Code: [Select]
This is the updated support package for version of advforecast2.php V5.00 - 06-Mar-2017

The advforecast2.php V5.00 uses the new NWS api.forecast.gov to retrieve JSON data and construct the forecast
display, so it differs from all prior versions (which used page scraping of the point-printable
forecast).

Since the new forecast.weather.gov website uses a different method to specify the point forecast,
the script includes auto-conversion of old-format point-printable forecast URLs to the new
format required.

As of 6-Mar-2017, the api.weather.gov alerts query returns only alerts of types:
Advisory, Watch, Warning and Statement.
The Outlook type alert is NOT currently included in the feed.
That may change in the future, but be aware that "Hazardous Weather Outlook" will not be displayed.

New with this release:

Improved diagnostics (available with ?debug=y on the URL) as HTML comments on the page
Improved cURL-based fetch for all data from api.weather.gov

cache files for the script have new (but related) names:
./cache/forecast-{Zone}-{n}-json.txt  contains the forecast data for the point or Zone
./cache/forecast-{Zone}-{n}-json-alerts.txt  contains the alert data for the Zone
./cache/forecast-{Zone}-{n}-json-meta.txt  contains the metadata about the point, Zone and WFO

New icon template file:
./forecast/icon-templates/nsmoke.png   (nighttime smoke image)

New icons with PoP stamps:
./forecast/images/cold[0..100].[jpg|png]  daytime cold w/PoP stamps
./forecast/images/ncold[0..100].[jpg|png] nighttime cold w/PoP stamps

DualImage.php V1.01 - 06-Mar-2017 supports the modified/new icon names from the NWS

advforecast2.php V5.00 - 06-Mar-2017 has additional new features:

setting addition:
$showTwoIconRows = true;   // =true; show all icons, =false; show 9 icons in one row (new V5.00)

If =true;, then two rows of up-to 9 columns of icons for day and night icons are shown
If =false;, then the original style of one row of 9 icons are shown.

running advforecast2.php?convert will display the the converted new-format point forecast URLs and
other settings needed.  If run on a site with a Saratoga template, the $SITE[] settings for Settings.php
will display, otherwise, the internal settings needed for advforecast2.php itself will be displayed.

Samples:
----------original settings----------
$NWSforecasts = array(
 // the entries below are for testing use.. replace them with your own entries if using the script
 // outside the AJAX/PHP templates.
 // ZONE|Location|point-forecast-URL  (separated by | characters
"CAZ513|Saratoga, CA (WRH)|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"NEZ052|Omaha, NE (CRH)|http://forecast.weather.gov/MapClick.php?lat=41.2586&lon=-95.9378&unit=0&lg=english&FcstType=text&TextType=2",
"ALZ266|Gulf Shores, AL (SRH)|http://forecast.weather.gov/MapClick.php?CityName=Gulf+Shores&state=AL&site=MOB&textField1=30.27&textField2=-87.7015&e=0&TextType=2",
'MDZ022|Salisbury, MD (ERH)|http://forecast.weather.gov/MapClick.php?lat=38.36818&lon=-75.59761&unit=0&lg=english&FcstType=text&TextType=2',
'AKZ101|Anchorage, AK (ARH)|http://forecast.weather.gov/MapClick.php?lat=61.21806&lon=-149.90027780000003&unit=0&lg=english&FcstType=text&TextType=2',
'HIZ005|Honolulu, HI (HRH)|http://forecast.weather.gov/MapClick.php?lat=21.30694&lon=-157.85833330000003&unit=0&lg=english&FcstType=text&TextType=2',
'IAZ068|Riverdale, IA|http://forecast.weather.gov/MapClick.php?lat=41.5354&lon=-90.4671&unit=0&lg=english&FcstType=text&TextType=2',
'MEZ030|Bar Harbor, ME|http://forecast.weather.gov/MapClick.php?lat=44.76&lon=-67.5477&unit=0&lg=english&FcstType=text&TextType=2',
'TXZ147|Fairfield, TX|http://forecast.weather.gov/MapClick.php?&lat=31.7188&lon=-96.1655&lg=english&FcstType=text&TextType=2',
'SDZ021|Millbank, SD|http://forecast.weather.gov/MapClick.php?lat=45.194&lon=-96.6869&unit=0&lg=english&FcstType=text&TextType=2',
'MNZ034|Brainerd, MN|http://forecast.weather.gov/MapClick.php?lat=46.3544&lon=-94.1941&unit=0&lg=english&FcstType=text&TextType=2',
'COZ010|Vail, CO|http://forecast.weather.gov/MapClick.php?lat=39.5864&lon=-106.3822&unit=0&lg=english&FcstType=text&TextType=2',
'CAZ072|South Lake Tahoe, CA|http://forecast.weather.gov/MapClick.php?lat=38.93333&lon=-119.98333&unit=0&lg=english&FcstType=text&TextType=2',
'WAZ037|Colville, WA|http://forecast.weather.gov/MapClick.php?lat=48.5433&lon=-117.8951&unit=0&lg=english&FcstType=text&TextType=2',
'ILZ014|Hoffman Estates, IL|http://forecast.weather.gov/MapClick.php?lat=42.03921&lon=-88.11001&unit=0&lg=english&FcstType=text&TextType=2',
'NDZ027|Grand Forks,  ND|http://forecast.weather.gov/MapClick.php?lat=47.9169&lon=-97.072&unit=0&lg=english&FcstType=text&TextType=2',
'MTZ055|Bozeman, MT|http://forecast.weather.gov/MapClick.php?lat=45.6354&lon=-111.0633&unit=0&lg=english&FcstType=text&TextType=2',
"AZZ023|Phoenix|http://forecast.weather.gov/MapClick.php?CityName=Phoenix&state=AZ&site=PSR&textField1=33.646&textField2=-112.007&e=0&TextType=2",
'KSZ078|Dodge City, KS|http://forecast.weather.gov/MapClick.php?lat=37.7528&lon=-100.0171&unit=0&lg=english&FcstType=text&TextType=2',
'OKZ020|Stillwater, OK|http://forecast.weather.gov/MapClick.php?lat=36.1156&lon=-97.0584&unit=0&lg=english&FcstType=text&TextType=2',
);
//*/
//*
//
 $NOAAZone = 'CAZ513';  // change this line to your NOAA warning zone.
// set $fileName to the URL for the point-printable forecast for your area
// NOTE: this value (and $NOAAZone) will be overridden by the first entry in $NWSforecasts if it exists.
 $fileName = "http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2";
//*/
$showTwoIconRows = true;   // =true; show all icons, =false; show 9 icons in one row (new V5.00)

-------------------------------------

-----Converted settings for standalone ------
// advforecast2.php (JSON) - V5.00 - 06-Mar-2017
// settings converted to new point-forecast request URLs.
// Put these in advforecast2.php to update the settings there.

// -- start of converted settings for advforecast2.php JSON version.
$NWSforecasts = array(
// the entries below are for testing use.. replace them with your own entries if using the script
// outside the Saratoga AJAX/PHP templates.
// ZONE|Location|point-forecast-URL  (separated by | characters
 'CAZ513|Saratoga, CA (WRH)|https://forecast-v3.weather.gov/point/37.2639,-122.022',
 'NEZ052|Omaha, NE (CRH)|https://forecast-v3.weather.gov/point/41.2586,-95.9378',
 'ALZ266|Gulf Shores, AL (SRH)|https://forecast-v3.weather.gov/point/30.27,-87.7015',
 'MDZ022|Salisbury, MD (ERH)|https://forecast-v3.weather.gov/point/38.3682,-75.5976',
 'AKZ101|Anchorage, AK (ARH)|https://forecast-v3.weather.gov/point/61.2181,-149.9003',
 'HIZ005|Honolulu, HI (HRH)|https://forecast-v3.weather.gov/point/21.3069,-157.8583',
 'IAZ068|Riverdale, IA|https://forecast-v3.weather.gov/point/41.5354,-90.4671',
 'MEZ030|Bar Harbor, ME|https://forecast-v3.weather.gov/point/44.76,-67.5477',
 'TXZ147|Fairfield, TX|https://forecast-v3.weather.gov/point/31.7188,-96.1655',
 'SDZ021|Millbank, SD|https://forecast-v3.weather.gov/point/45.194,-96.6869',
 'MNZ034|Brainerd, MN|https://forecast-v3.weather.gov/point/46.3544,-94.1941',
 'COZ010|Vail, CO|https://forecast-v3.weather.gov/point/39.5864,-106.3822',
 'CAZ072|South Lake Tahoe, CA|https://forecast-v3.weather.gov/point/38.9333,-119.9833',
 'WAZ037|Colville, WA|https://forecast-v3.weather.gov/point/48.5433,-117.8951',
 'ILZ014|Hoffman Estates, IL|https://forecast-v3.weather.gov/point/42.0392,-88.11',
 'NDZ027|Grand Forks,  ND|https://forecast-v3.weather.gov/point/47.9169,-97.072',
 'MTZ055|Bozeman, MT|https://forecast-v3.weather.gov/point/45.6354,-111.0633',
 'AZZ023|Phoenix|https://forecast-v3.weather.gov/point/33.646,-112.007',
 'KSZ078|Dodge City, KS|https://forecast-v3.weather.gov/point/37.7528,-100.0171',
 'OKZ020|Stillwater, OK|https://forecast-v3.weather.gov/point/36.1156,-97.0584',

);
//
$NOAAZone = 'CAZ513'; // change this line to your NOAA warning zone.
//
// set $fileName  to the URL for the point-printable forecast for your area
// NOTE: this value (and $NOAAZone) will be overridden by the first entry in $NWSforecasts if it exists.
//
$fileName = 'https://forecast-v3.weather.gov/point/37.2639,-122.022';
//
$showTwoIconRows = true;   // =true; show all icons, =false; show 9 icons in one row (new V5.00)
//
// -- end of converted settings for advforecast2.php JSON version.
-------------------------------------

-----Converted settings for Saratoga template ------
// advforecast2.php (JSON) - V5.00 - 06-Mar-2017
// settings converted to new point-forecast request URLs.
// Put these in Settings.php to update the settings there.

// -- start of converted settings for advforecast2.php JSON version.
$SITE['NWSforecasts'] = array(
// the entries below are for testing use.. replace them with your own entries if using the script
// outside the Saratoga AJAX/PHP templates.
// ZONE|Location|point-forecast-URL  (separated by | characters
 'CAZ513|Saratoga, CA (WRH)|https://forecast-v3.weather.gov/point/37.2639,-122.022',
 'NEZ052|Omaha, NE (CRH)|https://forecast-v3.weather.gov/point/41.2586,-95.9378',
 'ALZ266|Gulf Shores, AL (SRH)|https://forecast-v3.weather.gov/point/30.27,-87.7015',
 'MDZ022|Salisbury, MD (ERH)|https://forecast-v3.weather.gov/point/38.3682,-75.5976',
 'AKZ101|Anchorage, AK (ARH)|https://forecast-v3.weather.gov/point/61.2181,-149.9003',
 'HIZ005|Honolulu, HI (HRH)|https://forecast-v3.weather.gov/point/21.3069,-157.8583',
 'IAZ068|Riverdale, IA|https://forecast-v3.weather.gov/point/41.5354,-90.4671',
 'MEZ030|Bar Harbor, ME|https://forecast-v3.weather.gov/point/44.76,-67.5477',
 'TXZ147|Fairfield, TX|https://forecast-v3.weather.gov/point/31.7188,-96.1655',
 'SDZ021|Millbank, SD|https://forecast-v3.weather.gov/point/45.194,-96.6869',
 'MNZ034|Brainerd, MN|https://forecast-v3.weather.gov/point/46.3544,-94.1941',
 'COZ010|Vail, CO|https://forecast-v3.weather.gov/point/39.5864,-106.3822',
 'CAZ072|South Lake Tahoe, CA|https://forecast-v3.weather.gov/point/38.9333,-119.9833',
 'WAZ037|Colville, WA|https://forecast-v3.weather.gov/point/48.5433,-117.8951',
 'ILZ014|Hoffman Estates, IL|https://forecast-v3.weather.gov/point/42.0392,-88.11',
 'NDZ027|Grand Forks,  ND|https://forecast-v3.weather.gov/point/47.9169,-97.072',
 'MTZ055|Bozeman, MT|https://forecast-v3.weather.gov/point/45.6354,-111.0633',
 'AZZ023|Phoenix|https://forecast-v3.weather.gov/point/33.646,-112.007',
 'KSZ078|Dodge City, KS|https://forecast-v3.weather.gov/point/37.7528,-100.0171',
 'OKZ020|Stillwater, OK|https://forecast-v3.weather.gov/point/36.1156,-97.0584',

);
//
$SITE['noaazone'] = 'CAZ513'; // change this line to your NOAA warning zone.
//
// set $SITE['fcsturlNWS']  to the URL for the point-printable forecast for your area
// NOTE: this value (and $SITE['noaazone']) will be overridden by the first entry in $SITE['NWSforecasts'] if it exists.
//
$SITE['fcsturlNWS'] = 'https://forecast-v3.weather.gov/point/37.2639,-122.022';
//
$SITE['showTwoIconRows'] = true;   // =true; show all icons, =false; show 9 icons in one row (new V5.00)
//
// -- end of converted settings for advforecast2.php JSON version.
-------------------------------------

I'm sure there will be additional updates as the new forecast.weather.gov settles in.

My thanks to the brave beta testers of the advforecast-json.php script!  That script is now named advforecast2.php for backward compatibility reasons.

Best regards,
Ken
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Ken do you have a link to some page with a list of what exactly will stop working? I couldnt find it...

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Many thanks, Ken.  =D> Superb job, as usual! \:D/
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Thanks-if it is ready, I will put mine in later today.
Teacher inservice day today.



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Ken do you have a link to some page with a list of what exactly will stop working? I couldnt find it...

https://forecast-v3.weather.gov/documentation

Specifically, the MapClick.php function will no longer be available (the script used that in V1.x->V4.x)
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 Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Thanks Ken, I think I dont use this, so hopefully no need for changing anything in Meteotemplate

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
IS there anything different in the package other that the adv file?



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
The Readme talks about DualImage and the added icons etc.

Forum Search and Google Can be Your Best Friends

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
The .zip in the first post includes the added icons+DualImage
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
IS there anything different in the package other that the adv file?
Yes.  The new icons, icon template, DualImage.php and advforecast2.php + the README is in the .zip in the first post.  You'll need it all.
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 chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
cool. Maybe I will wait till tomorrow.  Tornado watch just issued.  IN MARCH!!!!!!!!!!!!!!!



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2296
    • CNYWeather
Ken (or anyone), where can I find the PNG icon images? I was looking on your site and didnt see them
or I missed them.

Thanks!
Tony




Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Ken (or anyone), where can I find the PNG icon images? I was looking on your site and didnt see them
or I missed them.

Thanks!
Sorry.. forgot to pack 'em up.. here you go.
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 CNYWeather

  • Forecaster
  • *****
  • Posts: 2296
    • CNYWeather
There's only 20 files in there Ken.
« Last Edit: March 06, 2017, 05:49:13 PM by CNYWeather »
Tony




Offline Weather Goat

  • Member
  • *
  • Posts: 12
  • Peet Bros. Ultimeter 2100 Pro
    • New Milford CT Weather
I'm not sure if it was the new forecast that came early or what but my beta forecast page stopped working this afternoon.  I loaded your new page into my beta page and used the new web addresses and  that new site seems to be up.  (Connecticut)
http://www.newmilfordctweather.com/wxforecast-beta.php
Roger

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6367
    • Valentine Nebraska's Real-Time Weather
Getting some odd stuff in latest version. Small icons mixed in and heat index value of 0 in forecast.
Randy

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Getting some odd stuff in latest version. Small icons mixed in and heat index value of 0 in forecast.
The small icons are due to DualImage.php not set for PNG icons, but for JPG icons (which are small).

The Heat Index stuff is all from the NWS API.. (as is all the weather data displayed by the script)
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
I'm not sure if it was the new forecast that came early or what but my beta forecast page stopped working this afternoon.  I loaded your new page into my beta page and used the new web addresses and  that new site seems to be up.  (Connecticut)
http://www.newmilfordctweather.com/wxforecast-beta.php
Roger
That's great, Roger.
I do notice you have a older icon set (pre 2015 when the NWS changed the base icons to 55x55px from 55x58px)
You might consider updating the icon set to the current version (http://saratoga-weather.org/saratoga-icons2.zip ) to make the look consistent between the static icons and the ones created by DualImage.php for the 6hr:6hr forecasts.
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 pimohdaimaoh

  • Forecaster
  • *****
  • Posts: 300
  • "Be aware to our nature"
    • PIMOHWEATHER
I'm not sure if it was the new forecast that came early or what but my beta forecast page stopped working this afternoon.  I loaded your new page into my beta page and used the new web addresses and  that new site seems to be up.  (Connecticut)
http://www.newmilfordctweather.com/wxforecast-beta.php
Roger
That's great, Roger.
I do notice you have a older icon set (pre 2015 when the NWS changed the base icons to 55x55px from 55x58px)
You might consider updating the icon set to the current version (http://saratoga-weather.org/saratoga-icons2.zip ) to make the look consistent between the static icons and the ones created by DualImage.php for the 6hr:6hr forecasts.


Thank You sir for the new updated Icons, I updated mine too since those icons are old versions

http://pimohweather.webutu.com/wxindex.php
« Last Edit: March 07, 2017, 07:56:41 AM by pimohdaimaoh »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9277
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
The Saratoga icons work with NWS, WU and WXSIM forecasts .. I regenrated them from the NWS new icons that were released in 2015.
There is a larger 86x86 PNG set also available, but without the new cold[10...100].png/ncold[10...100].png icons.
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 ValentineWeather

  • Forecaster
  • *****
  • Posts: 6367
    • Valentine Nebraska's Real-Time Weather
Thanks Ken, I was in a hurry when I added the latest zip and forgot I even added a new dual icon.php. The Settings php also needs set to png or it will be mixed bag also with png and jpg depending on forecast. At least was how mine looked.

I went back to older forecast for now without the 0 heat index stuff.
Randy

Offline wvdkuil

  • Wim van der kuil
  • Forecaster
  • *****
  • Posts: 1986
    • My PWS at Leuven Belgium Europe
Today March 7, the new api fead has a new error, the link to the icons is invalid when there is no PoP value.

Code: [Select]
            {
                "number": 3,
                "name": "Tuesday Night",
                "startTime": "2017-03-07T18:00:00-06:00",
                "endTime": "2017-03-08T06:00:00-06:00",
                "isDaytime": false,
                "temperature": 40,
                "windSpeed": " 1 to 6 mph",
                "windDirection": "W",
                "icon": "https://api.weather.gov/icons/land/night/fog,?size=medium",
                "shortForecast": "Patchy Fog",
                "detailedForecast": "Patchy fog. Mostly clear, with a low around 40. Heat index values as high as 0. West wind 1 to 6 mph.",
                "detailedForecastSI": "Patchy fog. Mostly clear, with a low around 4. Heat index values as high as 0. West wind 2 to 9 km/h."
            },
These icon-links in the json file => https://api.weather.gov/icons/land/night/fog,?size=medium return a 400-error with not so helpfull text
Code: [Select]
{
    "correlationId": "ecd52946-2cf3-4382-8ddf-a481a5e6e8ee",
    "title": "Unexpected Problem",
    "type": "https://api.weather.gov/problems/UnexpectedProblem",
    "status": 400,
    "detail": "An unexpected problem has occurred.",
    "instance": "https://api.weather.gov/requests/ecd52946-2cf3-4382-8ddf-a481a5e6e8ee"
}
The correct link is without the extra,   => https://api.weather.gov/icons/land/night/fog?size=medium

I will wait to see if and when to switch to he new api based system as the old MapClick site
http://forecast.weather.gov/MapClick.php?lat=35.07&lon=-89.736&FcstType=dwml
 is still operational and returns correct links to the "old" icons
<icon-link>   http://forecast.weather.gov/newimages/medium/nfg.png  </icon-link>

Wim
« Last Edit: March 07, 2017, 06:53:27 AM by wvdkuil »

Offline Weather Goat

  • Member
  • *
  • Posts: 12
  • Peet Bros. Ultimeter 2100 Pro
    • New Milford CT Weather
Thanks, Ken,  I did notice while updating the forecast page that my icons were a mess.  For now I disabled the DualImage.php until I get them straightened out. 

BTW, both the new and old forecast pages are still working here.

Roger

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6367
    • Valentine Nebraska's Real-Time Weather
Looks like it switched over the old advforecast2 no longer working. Still getting the heat index 0 in my forecast. Compared with NWS page heat index isn't there.   
Also load times seem to of increased.

Randy

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6367
    • Valentine Nebraska's Real-Time Weather
Jerry looks like you also have the 0 heat index in forecast. Looks like its only occurring on our Nebraska forecast.  #-o
Randy

 

anything