Author Topic: Local Storm Report  (Read 11435 times)

0 Members and 1 Guest are viewing this topic.

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Local Storm Report
« on: June 15, 2008, 06:24:47 PM »
NOAA provides a Local Storm Report (LSR) that lists the current storm events reported. They update frequently during a storm, page by page, and then they consolidate all reports after the storm. Not all NOAA web pages list this feature.

After a little beta testing, I have created an easier to read script that will show the reports for your area plus a menu for other locations. It's XHTML 1.0 Strict!
Maybe this is something you can use...

Local Storm Report http://www.weather.ricksturf.com/scripts/NOAAreport.zip

Let me know if you find any errors or have any question.

Curly


Note: This is for the US only
« Last Edit: December 25, 2012, 10:28:15 AM by Curly »

Offline tweatherman

  • Forecaster
  • *****
  • Posts: 537
Re: Local Storm Report
« Reply #1 on: June 16, 2008, 08:07:28 AM »
Very nice Curly... I will add it to my favorites.

Thanks,
Tim

Offline katlon

  • LONNIE'S WEATHER STATION
  • Contributor
  • ***
  • Posts: 142
  • GO HEELS!!!
    • LONNIE'S WEATHER STATION
Re: Local Storm Report
« Reply #2 on: June 16, 2008, 11:08:04 AM »
Curly
Good job. Thanks for the script. I edited it for just my region instead of entire US.
The final product is at: http://pulliamjr.com/php/NOAAreportSrc5.php

Lonnie

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #3 on: June 16, 2008, 06:15:35 PM »
Thanks all !

Sorry to say, I just spotted a bug in one of the reports.  #-o   After 3 weeks of testing the script, one showed up today.
If a report is issued and is not kept in format, it throws everything off by a line. I'll work on a bug remover tonight and will have it posted later on this evening.

Curly


Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #4 on: June 16, 2008, 08:31:39 PM »
The script is updated to accept a blank line that is entered in the remarks. That blank line breaks the page format and it may be the only occurance. If it happens again, that base is covered.

One line has been added.

On line 41 and 42 you will see this
Quote
$year = date("Y");
$html = implode('', file($noaasr));

Add this line directly below it
Quote
$html = preg_replace("/(\n)( \s\s+)([A-Z])(.*)(\n)(\n)( \s\s+)/", '${1}${2}${3}${4}${5}${7}', $html);

Sorry for the inconvenience.

   Curly


Offline jketcham

  • Member
  • *
  • Posts: 1
Re: Local Storm Report
« Reply #5 on: June 29, 2008, 07:52:38 AM »
Doesn't work, the only thing I get when I put it on my site was There are errors in the page format

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #6 on: June 29, 2008, 01:29:46 PM »
I'm working on it and giving it a thorough test.

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #7 on: June 29, 2008, 03:45:07 PM »
All known issues have been corrected that have been pointed out.

There a several changes to accomodate the way some offices format their page. An extra line or two here, one missing there...
You can now add the complete script to your page without dissecting it, or you can just include it.

The original script should be replaced with this new one even though your not having any problems. The links are the same that are posted in the first message.

Thanks for your patience.

Curly

Offline Carson Weather

  • Contributor
  • ***
  • Posts: 108
    • http://www.carsonweather.com
Re: Local Storm Report
« Reply #8 on: June 30, 2008, 12:33:47 PM »
Spiffy!
Now when I make my (infrequent) reports to NWS, I won't have to hunt around and see if they quoted me- "Nice weather was reported by trained spotter in Carson City"   :-P

http://www.carsonweather.com/storms.htm
Thanks for you effort!


Offline Carson Weather

  • Contributor
  • ***
  • Posts: 108
    • http://www.carsonweather.com
Re: Local Storm Report
« Reply #9 on: January 02, 2009, 12:02:58 PM »
Curly,

The script appears (your site and mine) to have stopped working.
Did NWS give us a New Year surprise??

"There are errors in the page format
View the original page "

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #10 on: January 02, 2009, 01:43:51 PM »
Uh oh.

Strange things have been happening at various NWS locations the last several days.  The weather story has been off and on too.

I'll give it a day or two and see if there are any changes.

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: Local Storm Report
« Reply #11 on: January 02, 2009, 02:12:05 PM »
Mine appears to be working..Im running both scripts on the same page..

http://www.snoqualmieweather.com/storm_report.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 Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #12 on: January 02, 2009, 02:46:12 PM »
Oh no...


I'll work on it this weekend. Hope they don't suprise us with a new forecast.


Curly
« Last Edit: January 03, 2009, 12:10:09 AM by curly »

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #13 on: January 03, 2009, 12:14:12 AM »
Fixed it !

You can fix it by finding this
Code: [Select]
$year = date("Y");
$html = implode('', file($noaasr));

and replace it with this
Code: [Select]
$year = date("Y");
$html = implode('', file($noaasr));
// show last years reports
preg_match_all('|([0-9][0-9]/[0-9][0-9]/)(.*)(\s)|Uis', $html, $lastyear);
$preyear = $lastyear[2][0];
if($preyear == date("Y")-1) {
$year = date("Y")-1;
}


Or download the complete file
Local Storm Report http://www.weather.ricksturf.com/scripts/NOAAreport.zip


Curly
« Last Edit: January 03, 2009, 12:54:22 AM by curly »

Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Local Storm Report
« Reply #14 on: January 03, 2009, 01:45:11 AM »
I installed this script, works nice. I did notice I can not get the right background behind it like my other pages. I am sure it is something I am doing wrong. Also, if there are more than 7 reports, the rest of the reports move over to the left. Again, I think this has to do with me and how I put it into my website. I will play with it a bit more and see if I can get things to look more the same. Here is the url-->http://www.myidahoweather.com/NOAAreport.php If any one has time to give me a few pointers I would appreciate it. I am by no means a programmer of any kind.

Thanks again for a nice script.

EDIT:I figured out how to get the background correct and also the alignment right. Trial and error does work at times.
« Last Edit: January 03, 2009, 02:28:29 AM by prvrt »
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #15 on: January 03, 2009, 07:49:17 AM »
Quote
if there are more than 7 reports, the rest of the reports move over to the left.
The alignment is now fixed in the script.

Quote
Trial and error does work at times.
No argues there!  Determination is the key for results.   :lol:

Thanks!
Curly

Offline gulfbreeze

  • Member
  • *
  • Posts: 4
    • Waveland Weather Center
Re: Local Storm Report
« Reply #16 on: December 24, 2012, 08:49:36 PM »
EDIT:I figured out how to get the background correct and also the alignment right. Trial and error does work at times.

What did you do to align the page correctly, I'm having the same problem, after the first 3 everything is shifted to the left.

Thanks, & Happy Holidays,
Doug
<a href="http://waveland-weather.org/">
<img src="http://waveland-weather.com/wxgraphic.php?type=banner"
alt="Current Weather Conditions in Waveland, MS"
title="Current Weather Conditions in Waveland, MS"
width="500" height="80" /></a>

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Local Storm Report
« Reply #17 on: December 24, 2012, 10:36:18 PM »
Does anyone have a copy of this script by chance?  I would like to get one, if possible.

Thanks and Merry Christmas,

John
GR2AE, GR3, Cumulus

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #18 on: December 25, 2012, 10:33:09 AM »
I've updated the script to take care of alignments and errors.
This is a complete web page for the Saratoga Base - USA template only.
If you don't use the template set, email me.

There is only one setting near the top of the file that you set to your nearest Weather Forecast Office.
$noaa_id = "iwx";  // Three letter code for YOUR nearest NOAA center

Local Storm Report http://www.weather.ricksturf.com/scripts/NOAAreport.zip

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Local Storm Report
« Reply #19 on: December 25, 2012, 10:49:00 AM »
Thank you very much, Curly!!!  Have it running here:  LSR Reports

Merry Christmas,

JOhn
GR2AE, GR3, Cumulus

Offline prvrt

  • Contributor
  • ***
  • Posts: 128
  • WL7COQ
    • My Idaho Weather
Re: Local Storm Report
« Reply #20 on: March 03, 2016, 12:05:19 AM »
Just curious if there are any updates to this script as I am starting to get errors.
Davis Instruments 6163-Wireless VantagePro2 Plus w/wireless Anemometer, Software = Weather Display
Blackfoot, Idaho

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #21 on: March 03, 2016, 04:42:44 AM »
I've been working on an update and it should be available next week.

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: Local Storm Report
« Reply #22 on: March 06, 2016, 07:56:13 PM »

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: Local Storm Report
« Reply #23 on: March 06, 2016, 09:06:15 PM »
Works great... Thanks Curly.
"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 AWL

  • Forecaster
  • *****
  • Posts: 727
    • Ardmore Weather Live
Re: Local Storm Report
« Reply #24 on: March 06, 2016, 09:30:05 PM »
Works great... Thanks Curly.

I agree!  Thanks for not only this update but all the great scripts you have given all of us to use over the years!

Doug