Author Topic: advforecast2.php V5 (JSON) not showing tropical storm icons...  (Read 401 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Looks like the API is using 'tropical_storm' and 'night/tropical_storm' for icon names, and they hadn't done that before.

A temporary fix is easy, only involving two tables in two scripts:

In advforecast2.php V5.08 change
Code: [Select]
    "night/ts_hurr_warn" => "ts_hur_flags|N|L|Night Tropical storm with hurricane warning in effect", // New NWS list
    'ts_warn' => 'tropstorm|Y|L|Tropical Storm Warning',
to
Code: [Select]
    "night/ts_hurr_warn" => "ts_hur_flags|N|L|Night Tropical storm with hurricane warning in effect", // New NWS list
    'tropical_storm' => 'tropstorm-noh|Y|L|Tropical Storm Warning',
    'night/tropical_storm' => 'tropstorm-noh|Y|L|Tropical Storm Warning',
    'ts_warn' => 'tropstorm|Y|L|Tropical Storm Warning',

In DualImage.php change
Code: [Select]
  'tropstorm-noh' => 'N|L|Tropical Storm old',
to
Code: [Select]
  'tropstorm-noh' => 'Y|L|Tropical Storm',
then it should show up fine (like attached).

Thanks to jdawg0208 on Weather-Watch.com forum for spotting the issue.
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 Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: advforecast2.php V5 (JSON) not showing tropical storm icons...
« Reply #1 on: May 26, 2018, 01:06:45 AM »
Hi Ken.

My site was not working since this morning and got it fixed with your update. All is well for now.

Thank you for all that you are doing to keep things working.

Regards,

--Stan Y.
   Maui, Hawaii
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advforecast2.php V5 (JSON) not showing tropical storm icons...
« Reply #2 on: May 26, 2018, 12:57:13 PM »
I've released advforecast2.php V5.09 (JSON) and DualImage.php V1.02 - 26-May-2018 to address the tropical storm/hurricane icon usage by the api.weather.gov 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