Author Topic: New Script to Display NWS Graphical Forecast Maps  (Read 4109 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
New Script to Display NWS Graphical Forecast Maps
« on: December 19, 2012, 08:16:13 AM »
This script was created in order to avoid using an iframe to display as well as to simplify the presentation of NWS Graphical Forecast Maps.  The script can be seen in action here on my site.  Implementation of the script in the Saratoga templates is fairly straightforward and requires no configuration, just the addition of the script to your menu after uploading the page to your site.

The standalone page can be seen here.
« Last Edit: December 19, 2012, 09:29:49 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1014
    • Southern Maryland Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #1 on: December 19, 2012, 08:48:15 AM »
Jerry,
  Very nice work!  =D>

Jim

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #2 on: December 19, 2012, 09:31:01 AM »
Thanks, Jim.  New Year's Eve at midnight will be the true test of the script. :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ed2kayak

  • Ed
  • Forecaster
  • *****
  • Posts: 613
  • Davis Vantage Pro2 w/12 hr FARS, solar/uv
    • Cumberland Valley Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #3 on: December 19, 2012, 02:15:38 PM »
 =D> I like it.

Ed
CoCoRaHS PA-CD-6,  Weather Underground KPAMECHA7, CWOP DW5425

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #4 on: December 19, 2012, 03:09:12 PM »
Very Nice! Thanks!

« Last Edit: February 23, 2020, 02:35:09 PM by ALITTLEweird1 »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #5 on: December 19, 2012, 10:32:11 PM »
Thanks for sharing your script.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline donj51

  • Garner Weather
  • Member
  • *
  • Posts: 30
  • wind power, runner, weather
    • www.donj51.com
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #6 on: December 20, 2012, 05:40:17 AM »
Very nice.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #7 on: December 20, 2012, 08:12:02 AM »
Thanks for the kind words, guys. :D I'm just looking for creative ways to give the group some payback for all the great help and free scripts here.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline katlon

  • LONNIE'S WEATHER STATION
  • Contributor
  • ***
  • Posts: 142
  • GO HEELS!!!
    • LONNIE'S WEATHER STATION
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #8 on: December 20, 2012, 08:25:56 AM »
Thanks for sharing your script with us. Very nice!  =D>

Lonnie

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #9 on: December 23, 2012, 10:40:50 AM »
Awesome script, Jerry!!!!  Thanks for sharing!!!!

Graph Cast

John Sacrey
GR2AE, GR3, Cumulus

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #10 on: December 23, 2012, 10:59:02 AM »
Awesome script, Jerry!!!!  Thanks for sharing!!!!

Graph Cast

John Sacrey
Thanks, John.  Your site is awesome.  I'm wondering why the 'Today | Tonight | etc.' links are broken on mouseover and onclick?  The source for your Graph Cast page looks OK, but for some reason the page isn't working as designed or on the NWS source site.  I suspect it has to do with your site specific modifications.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #11 on: December 23, 2012, 11:04:02 AM »
Hi Jerry,

On the part you are referring to, I did not change a thing.  Mostly what I modified was I made the script HTML5 compliant for my site. Hmmmm... will look into that.

Edit:  The mouseover and onclick work fine here for me.  I am using Firefox for my browser, if that helps any.

Edit2:  I tried the page in Chrome and the mouseover and onclick are not working there.
« Last Edit: December 23, 2012, 11:35:28 AM by sacreyweather »
GR2AE, GR3, Cumulus

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #12 on: December 23, 2012, 11:54:55 AM »
Hi Jerry,

I copied the page verbatim into a new blank page and everything works as it should.  I'll look at more closely and see what messed up when I converted it.  Probably something simple I overlooked or forgot. :oops:

John
GR2AE, GR3, Cumulus

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #13 on: December 23, 2012, 12:40:09 PM »
Perhaps we should take the attitude the NWS has regarding html standards compliance:  'What's that?'  Just kidding.  The original code contained all unclosed <img...>'s and <br>'s, but cleaned up fairly well with a lot of search and replace in order to make it HTML1.0 Transitional compliant.  Yes, I was using Chrome. :-) 
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ed2kayak

  • Ed
  • Forecaster
  • *****
  • Posts: 613
  • Davis Vantage Pro2 w/12 hr FARS, solar/uv
    • Cumberland Valley Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #14 on: December 23, 2012, 05:34:52 PM »
Ed
CoCoRaHS PA-CD-6,  Weather Underground KPAMECHA7, CWOP DW5425

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #15 on: December 30, 2012, 10:43:16 PM »
There may be a name space conflict on some servers with the $hour variable that disrupts the script.  The attached revised script, Version 1.1, changes this and all other date variables to $_, e.g. $_hour, in order to avoid potential and real name space conflicts.  I would urge anyone using this script to update their copy.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline tnwxman

  • Forecaster
  • *****
  • Posts: 423
  • KK4QXH
    • Weather for Lebanon, TN 37087
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #16 on: February 28, 2013, 08:27:34 PM »
Great job Jerry and thank you very much.

Bob
Bob
KK4QXH

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #17 on: October 26, 2019, 07:01:42 PM »
Hi Jerry. I'm running php 7.2 and I'm getting some errors on this script.

Quote
Warning: A non-numeric value encountered in /homepages/8/d252567151/htdocs/wxustempfc.php on line 54

Warning: A non-numeric value encountered in /homepages/8/d252567151/htdocs/wxustempfc.php on line 55

Warning: A non-numeric value encountered in /homepages/8/d252567151/htdocs/wxustempfc.php on line 56

Warning: A non-numeric value encountered in /homepages/8/d252567151/htdocs/wxustempfc.php on line 57

Code: [Select]

$_year[$i] = date('Y', mktime('H'+($i*12))); # Determine Present & Future Year,     <<<<54
$_month[$i] = date('m', mktime('H'+($i*12))); # Month,                                           <<<<55
$_day[$i] = date('d', mktime('H'+($i*12))); # Day of Month,                                         <<<<56
$_dow[$i] = date('D', mktime('H'+($i*12))); # Day of Week                                   <<<<57


https://www.northbendweather.com/wxustempfc.php
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #18 on: October 27, 2019, 12:11:22 AM »
Gosh this is an old script!  I got the same error on my 'wamp64' localhost server, but not on my web site or my testing server.

You can get the amended code that uses a brute force solution, i.e. 'error_reporting(0);' here on my testing server.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #19 on: February 22, 2020, 06:46:34 PM »
Hey Jerry. I totally forgot I asked about this script back in Oct...lol

I'm still getting the same error with the script you posted

Warning: A non-numeric value encountered in /homepages/8/d252567151/htdocs/wxustempfc.php on line 84

Line 84.... $_year[$i] = date('Y', time('H'+($i*12)));   # Determine Present & Future Year,

Old scripts never die....lol

"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline Bunty

  • Forecaster
  • *****
  • Posts: 2429
  • Stillwater, home of Oklahoma State University
    • Welcome to Stillwater Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #20 on: February 23, 2020, 12:19:05 PM »
Very Nice! Thanks!

Link removed

Better check that link.  It's screwed up big time.
« Last Edit: February 23, 2020, 02:36:27 PM by ALITTLEweird1 »

Also the 2nd home page using modified AltDashboard 6.95 at http://stillwaterweather.com/2ndhome.php

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: New Script to Display NWS Graphical Forecast Maps
« Reply #21 on: February 23, 2020, 02:35:42 PM »
Very Nice! Thanks!

Link removed

Better check that link.  It's screwed up big time.

I removed the link.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture