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

0 Members and 1 Guest are viewing this topic.

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
MPX-Sort of ok.

The warning box is missing the Hazerdous Weather Outlook

and the forecast box has a large space between the icon and the forecast.  maybe they changed the way it wraps around.

Could be worse


http://weather.rms.rdale.org
The missing 'Outlook' types from alerts has been noted to the developers .. I don't know if/when they'll fix that.  Currently the api.weather.gov site does have Advisory, Watch, Warning and Statement types, just not 'Outlook' types.
Not seeing either heat index or wind chill items in my forecasts but suspect my current temps, etc., are not in the right range to see those. Supposed to hit 87° the next few days which might change things. Not happy with the added '>' and '≈' items showing by the high and low temps. Makes it seem like NWS is even more unsure what the temp might be.
It looks like the point forecast wasn't available, so the Zone forecast was used .. that's where you get the symbols before the temps since the script has to parse the text Zone forecast for the temperature range(s).  It will return to a precise number when the point forecast is again available.  The V4.x advforecast2.php script had the same behavior.
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 jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
I do remember seeing those symbols from before. Thanks for the reminder.
John
W7JKG

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Until the NWS corrects this, I have temporarily added two lines after line 563 of the advforecast2.php to get rid of the Heat index and wind chill values of 0. I changed from:
Code: [Select]
$forecasttext[$i] = str_replace("\n",' ',$FCST['detailedForecast']); // sub blank for embedded NL

to
Code: [Select]
$forecasttext[$i] = str_replace("\n",' ',$FCST['detailedForecast']); // sub blank for embedded NL
$forecasttext[$i] = preg_replace('/Heat index values as high as 0./','',$forecasttext[$i]);
$forecasttext[$i] = preg_replace('/Wind chill values as low as 0./','',$forecasttext[$i]);
The extra Heat index... and Wind chill... entries in the text forecast are likely a bug in their new text forecast generator and will likely be fixed shortly.  I try to stay away from altering their text (except to fix up any 'bad' embedded HTML as was done in the prior version of the script).  I didn't want to second-guess their text, since they are solely responsible for the content of their site.
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

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Just saw this on the nws site dated the 6th.

Quote
Important - NWS Web Site Upgrade delayed until March 14th.


And... that's the reason I've not pushed out the 'official' update .. the forecast.weather.gov site needs to be fully V3 operational first (so I can test, change the advforecast2.php script to use it instead of forecast-v3.weather.gov, then push the update).

Meanwhile... for those who've installed, please continue to test and report issues/errata so we can collectively keep on-top of the changes.

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 jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
You may try different latitude/longitude combinations to get closer to your original location.
Hi Wim,

Had the same problem here when using the data directly from the NWS point URL - it then told me I was in Guadalupe rather than Phoenix. Using my own lat/lon I get '7 Miles NE Phoenix, AZ', which is right where I am.
John
W7JKG

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
I'm noticing 2 issues on my page:

http://www.bismarckweather.net/wxforecast.php

The text is now running outside of the white box.

And dual images are large, others are smaller.  I'd prefer the smaller images if I have a choice.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Now the forecast-v3.weather.gov site says
Quote
Notice of NWS' New Version of Forecast
A new version of Forecast will launch April 4, 2017.

Looks like we have some more time before cutover. 

The original date was December 1st, 2016 so I've been working on the replacement script since early November, 2016.  I can use the additional delay for a bit of code refactoring :) 
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
LOL

This reminds me of how everything works here at our institute too.... postponing, postponing and postponing as much as possible :D

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
You may try different latitude/longitude combinations to get closer to your original location.
Hi Wim,

Had the same problem here when using the data directly from the NWS point URL - it then told me I was in Guadalupe rather than Phoenix. Using my own lat/lon I get '7 Miles NE Phoenix, AZ', which is right where I am.
The text data for the location information comes from the metadata about the point forecast which includes the JSON
Code: [Select]
    [relativeLocation] => Array
        (
            [city] => Saratoga
            [state] => CA
            [geometry] => POINT (-122.025413 37.268493)
            [distance] => Array
                (
                    [value] => 593.34047270969
                    [unitCode] => unit:m
                )

            [bearing] => Array
                (
                    [value] => 149
                    [unitCode] => unit:degrees_true
                )

        )
  Using the provided city, state and the distance in miles (rounded) from the geometry POINT(lat,long) to the forecast lat/long and the bearing converted to cardinal direction is how the text for the 'n miles CCC CITY, STATE' is generated.

They may be changing the center-point data for the nearest city to the point-forecast and that's why the text may be different.
The JSON data in the point metadata is all the info I have.
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

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
I'm noticing 2 issues on my page:

http://www.bismarckweather.net/wxforecast.php

The text is now running outside of the white box.

And dual images are large, others are smaller.  I'd prefer the smaller images if I have a choice.
Your DualImage.php has the image type set for PNG, set it to JPG to get the smaller dual-image.

Code: [Select]
$outType    = 'jpg';          # =jpg (55x55) =png (86x86)
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 jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Had the same problem here when using the data directly from the NWS point URL - it then told me I was in Guadalupe rather than Phoenix. Using my own lat/lon I get '7 Miles NE Phoenix, AZ', which is right where I am.
Ken, my comment wasn't a complaint, just an explanation of what I had to do to get 'Phoenix' back. Before NWS started all the changes the point info yielded Phoenix, but the same URL then pushed Guadalupe with the changes. Not a problem, but thanks for your explanation.
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Jerry looks like you also have the 0 heat index in forecast. Looks like its only occurring on our Nebraska forecast.  #-o
Not much to be done on our part.  We have to wait for the NWS to wake up, I guess.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2846
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
For ken for putting up with us and the NWS
 UU



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

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6373
    • 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
Not much to be done on our part.  We have to wait for the NWS to wake up, I guess.

This works as temporary fix.

Until the NWS corrects this, I have temporarily added two lines after line 563 of the advforecast2.php to get rid of the Heat index and wind chill values of 0. I changed from:
Code: [Select]
$forecasttext[$i] = str_replace("\n",' ',$FCST['detailedForecast']); // sub blank for embedded NL

to
Code: [Select]
$forecasttext[$i] = str_replace("\n",' ',$FCST['detailedForecast']); // sub blank for embedded NL
$forecasttext[$i] = preg_replace('/Heat index values as high as 0./','',$forecasttext[$i]);
$forecasttext[$i] = preg_replace('/Wind chill values as low as 0./','',$forecasttext[$i]);
Randy

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
I'm now getting heat Index and Wind Chill text today.


You can fix adding the 2 lines Murry added, temporarily removes heat index 0 until real fix. Post 101

I applied this "fix" and mine still shows the heat index and wind chill at 0...
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6373
    • Valentine Nebraska's Real-Time Weather
Worked for several others you might double check code was put in correctly.
Randy

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Worked for several others you might double check code was put in correctly.

I did and checked it twice
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Worked for several others you might double check code was put in correctly.

My advforecast2.php .. http://prntscr.com/eh8w6s
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Worked for several others you might double check code was put in correctly.

My advforecast2.php .. http://prntscr.com/eh8w6s

Got it to work it was actually in the advforecast-json.php that had to be changed.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Im not sure what is wrong http://www.gosportwx.com/cell-forecast.php
This is still Beta, not a real production environment.
Use force=1 at the url to discard the forecast with errors and try to reload the forecast.

http://www.gosportwx.com/cell-forecast.php?force=1

Wim

how do i get this to do it automatically so I dont have to keep doing ?force=1?
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
I would think you could just change your link to have the force=1 on it.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
I would think you could just change your link to have the force=1 on it.

it effects my cell.php too..
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Im not sure what is wrong http://www.gosportwx.com/cell-forecast.php
This is still Beta, not a real production environment.
Use force=1 at the url to discard the forecast with errors and try to reload the forecast.

http://www.gosportwx.com/cell-forecast.php?force=1

Wim

how do i get this to do it automatically so I dont have to keep doing ?force=1?
The ?force=1 forces the reload of the cache with the point forecast.  If the point forecast returns a 503, then the zone forecast is fetched instead.  If you omit the ?force=1, the cache should automatically reload after $refetchTime seconds have elapsed from the last cache reload. 
Code: [Select]
$refreshTime = 600; // default refresh of cache 600=10 minutes
You shouldn't need to use ?force=1 on the routine invocation of the script.. why do you feel it's necessary to do that?
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 mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Im not sure what is wrong http://www.gosportwx.com/cell-forecast.php
This is still Beta, not a real production environment.
Use force=1 at the url to discard the forecast with errors and try to reload the forecast.

http://www.gosportwx.com/cell-forecast.php?force=1

Wim

how do i get this to do it automatically so I dont have to keep doing ?force=1?
The ?force=1 forces the reload of the cache with the point forecast.  If the point forecast returns a 503, then the zone forecast is fetched instead.  If you omit the ?force=1, the cache should automatically reload after $refetchTime seconds have elapsed from the last cache reload. 
Code: [Select]
$refreshTime = 600; // default refresh of cache 600=10 minutes
You shouldn't need to use ?force=1 on the routine invocation of the script.. why do you feel it's necessary to do that?

i have to use the ?force=1 for it to force reload the cache with point forecast due to the fact that on my cell.php page it says No forecast found for Gosport every so often.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Ahh.. if you're using the advforecast2.php (posted above), then you shouldn't see that any more.. this version does load the Zone forecast when the Point forecast is unavailable.
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