Author Topic: A script for Hazardous Weather Outlook  (Read 4527 times)

0 Members and 1 Guest are viewing this topic.

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1643
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
A script for Hazardous Weather Outlook
« on: March 23, 2011, 07:17:37 PM »
I have tried numerous times with my limited scripting abilities to either make from scratch or modify an existing script to pull my local Hazardous Weather Outlook and failed rather miserably every time :oops:  Has anyone written such a script or know of such a script that could be used freely on my web page?

I have tried several searches and came up empty so either none exist or I plugged in the wrong search parameters. Either way I didn't have a happy outcome.

Any help or advice or even criticism for the most part is appreciated :-P


Best Regards,

Wayne


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline ELDoradoWx

  • El Dorado Weather
  • Senior Contributor
  • ****
  • Posts: 298
  • Gentoo X = Complete_Control
    • El Dorado Weather
Re: A script for Hazardous Weather Outlook
« Reply #1 on: March 23, 2011, 10:15:15 PM »
I have tried numerous times with my limited scripting abilities to either make from scratch or modify an existing script to pull my local Hazardous Weather Outlook and failed rather miserably every time :oops:  Has anyone written such a script or know of such a script that could be used freely on my web page?

I have tried several searches and came up empty so either none exist or I plugged in the wrong search parameters. Either way I didn't have a happy outcome.

Any help or advice or even criticism for the most part is appreciated :-P


Best Regards,

Wayne

Hi Wayne,

Can you post a link to the Hazardous Weather Outlook you were working off of?

I use a nice Severe Weather Report script from Michiana. It may not be the type of content you are looking for though because it's for the entire country.
http://www.eldoradocountyweather.com/nws/spc-severe-weather-reports/SPCreport.php

-Danny
-root is everything

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1643
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
Re: A script for Hazardous Weather Outlook
« Reply #2 on: March 23, 2011, 11:19:08 PM »
Hi Danny,
The one I was been trying the hardest with is located on my WFO home page and it's here    http://www.erh.noaa.gov/displayprod.php?product=WBCHWORNK

I found another on one of the interactive pages and it's here   http://www.weather.gov/view/validProds.php?prod=HWO&node=KRNK

I like to glance at that during the day myself to see hat they are expecting and some loyal viewers have mentioned they would like something similar.So far I haven't been able to produce.. I'm learning but not by leaps and bounds it seems LOL!!!

Thanks for all you help over the past year!!

Regards,
Wayne



BTW I have that report from Curly as well as his LSR script here.They are super nice!!!  Looks great on your page as well :)
« Last Edit: March 23, 2011, 11:20:41 PM by W Thomas »


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline ELDoradoWx

  • El Dorado Weather
  • Senior Contributor
  • ****
  • Posts: 298
  • Gentoo X = Complete_Control
    • El Dorado Weather
Re: A script for Hazardous Weather Outlook
« Reply #3 on: March 24, 2011, 01:25:09 AM »
Hi Danny,
The one I was been trying the hardest with is located on my WFO home page and it's here    http://www.erh.noaa.gov/displayprod.php?product=WBCHWORNK

I found another on one of the interactive pages and it's here   http://www.weather.gov/view/validProds.php?prod=HWO&node=KRNK

I like to glance at that during the day myself to see hat they are expecting and some loyal viewers have mentioned they would like something similar.So far I haven't been able to produce.. I'm learning but not by leaps and bounds it seems LOL!!!

Thanks for all you help over the past year!!

Regards,
Wayne



BTW I have that report from Curly as well as his LSR script here.They are super nice!!!  Looks great on your page as well :)

Wayne,

Are you working in PHP? If so I have a little script that is actually several years old but I think it might serve as a good example for what you are trying to do. The script was written by Chris at Sloweather.

NOAA Fire Forecast PHP Script by Chris at Sloweather:

Code: [Select]
<?php
// This script by SLOweather disassembles the larger Sacramento Fire Weather Forecast
// and reassembles it into a smaller one with just the Northern Motherlode forecast
$data file_get_contents('http://www.wrh.noaa.gov/sto/cafw/print_version.php?sid=sto&pil=fwf&version=');

// Get the header
$regex '/FIRE WEATHER PLANNING(.+?)<br> <br>/';

preg_match($regex,$data,$fwfhdr);

// Get the discussion
$regex '/DISCUSSION(.+?)<br> <br>/';

preg_match($regex,$data,$fwfdis);

// Get the Northern Motherlode FWF
$regex '/NORTHERN MOTHERLODE(.+?) <hr>/';

preg_match($regex,$data,$slofwf);

// Fix the <br>s
$br "<br>";

$fwfdis str_replace($br,"",$fwfdis);

// Reassemble and output the header, discussion, and the Northern Motherlode
// forecast

?>

<h2>
<?php
echo $fwfhdr[0];
?>

</h2>
<?php
echo $fwfdis[0];
?>

<br> <br>
<?php
echo $slofwf[0];
?>


-Danny
-root is everything

Online CNYWeather

  • Forecaster
  • *****
  • Posts: 2295
    • CNYWeather
Re: A script for Hazardous Weather Outlook
« Reply #4 on: March 24, 2011, 07:58:26 AM »
Code: [Select]
<?php
// PHP script by Ken True, webmaster@saratoga-weather.org
// forecast-discussion.php  version 1.00 - 14-Dec-2007
//   Version 1.01 - 14-Dec-2007 - added safety features per MChallis at http://www.carmosaic.com/weather/
//   Version 1.02 - 31-Dec-2007 - changed fetchUrlWithoutHanging function to fetchUrlWithoutHangingFD
//   Version 1.03 - 10-Jan-2008 - added "Forecast Discussion unavailable" feature per MChallis
//
    
$Version "hazardous-outlook.php V1.00 1-Sep-2010";
//  error_reporting(E_ALL);  // uncomment to turn on full error reporting
// script available at http://saratoga-weather.org/scripts.php
//  
// you may copy/modify/use this script as you see fit,
// no warranty is expressed or implied.
//
// Customized for: NOAA forecast discussions
//   http://www.crh.noaa.gov/product.php?site=NWS&issuedby=MTR&product=AFD&format=CI&version=1&glossary=0
//
// To find your local NWS office code for $myNWS, do this:
//   go to www.weather.gov
//   search for your city, state
//   look at the URL in the 'Forecast Discussion' link near the bottom of the page
//   use the 3-character abbreviation is in the &issuedby=XXX parameter on the 
//     Forecast Discussion link (XXX will be your local office)
//   put the XXX in the $myNWS variable below
//
// output: creates XHTML 1.0-Strict HTML page (default)
// Options on URL:
//      inc=Y    -- returns only the body code for inclusion
//                         in other webpages.  Omit to return full HTML.
// example URL:
//  http://your.website/forecast-discussion.php?inc=Y
//  would return data without HTML header/footer 
//
// Usage:
//  you can use this webpage standalone (customize the HTML portion below)
//  or you can include it in an existing page:
//  no parms:  $doIncludeFD = true; include("forecast-discussion.php"); 
//  parms:    include("http://your.website/forecast-discussion.php?inc=Y");
//
//
// settings:  
//  change myNWS to abbreviation for your local NWS office
//    other settings are optional
// 
  
$myNWS 'BGM';   // San Francisco, NWS office
//  $myNWS = 'PQR';   // Portland, OR
//  $myNWS = 'OAX';   // Omaha, NE (Carter Lake, IA)
//
  
$cacheName "hazardous-outlook.txt";  // used to store the file so we don't have to
//                          fetch it each time
  
$refetchSeconds 1800;     // refetch every nnnn seconds
// end of settings

// Constants
// don't change $fileName or script may break ;-)
  
$fileName "http://www.crh.noaa.gov/product.php?site=NWS&issuedby=$myNWS&product=HWO&format=CI&version=1&glossary=0";
// end of constants

// ------ start of code -------
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
//--self downloader --
   
$filenameReal __FILE__;
   
$download_size filesize($filenameReal);
   
header('Pragma: public');
   
header('Cache-Control: private');
   
header('Cache-Control: no-cache, must-revalidate');
   
header("Content-type: text/plain");
   
header("Accept-Ranges: bytes");
   
header("Content-Length: $download_size");
   
header('Connection: close');
   
readfile($filenameReal);
   exit;
}

// Check parameters and force defaults/ranges
if ( ! isset($_REQUEST['inc']) ) {
        
$_REQUEST['inc']="";
}
if (isset(
$doIncludeFD) and $doIncludeFD ) {
  
$includeMode "Y";
 } else {
  
$includeMode $_REQUEST['inc']; // any nonblank is ok
}

if (
$includeMode) {$includeMode "Y";}

if (isset(
$_REQUEST['cache'])) {$refetchSeconds 1; }

// omit HTML <HEAD>...</HEAD><BODY> if only tables wanted
// --------------- customize HTML if you like -----------------------
if (! $includeMode) {
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Refresh" content="300" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Forecast Discussion for <?php print $myNWS ?> NWS Office</title>
</head>
<body style="background-color:#FFFFFF;">
<?php
}

// ------------- code starts here -------------------
echo "<!-- $Version -->\n";

// refresh cached copy of page if needed
// fetch/cache code by Tom at carterlake.org

if (file_exists($cacheName) and filemtime($cacheName) + $refetchSeconds time()) {
      print 
"<!-- using Cached version of $cacheName -->\n";
      
$html implode(''file($cacheName));
    } else {
      print 
"<!-- loading $cacheName from $fileName -->\n";
      
$html fetchUrlWithoutHangingFD($fileName);
      
$fp fopen($cacheName"w");
  if ($fp) {
        
$write fputs($fp$html);
         
fclose($fp);  
         print 
"<!-- cache written to $cacheName. -->\n";
  } else {
     print "<!-- unable to save cache to $cacheName. -->\n";
  }
}
  
// extract the forecast discussion
 
preg_match('|<pre[^>]*>(.*)</pre>|Usi',$html,$matches);
 
$discussion $matches[1]; // now have the forecast as a string with \n delimiters

$discussion  trim($matches[1]); // prevent extra white space at beginning and end

 // uncomment next line if you like only lower case text, or it could be made an option
 // $discussion  = strtolower(trim($matches[1]));

  
if ($discussion  == '') {
           
$discussion  'Forecast discussion unavailable, please try later.';
  }
  print 
"<pre>\n";
  print 
htmlspecialchars(strip_tags($discussion));
  print 
"</pre>\n";  $niceFileName preg_replace('!&!is','&amp;',$fileName);
  print 
"<p><small><a href=\"$niceFileName\">NWS $myNWS Office Area Forecast Discussion</a></small></p>\n";
// print footer of page if needed    
// --------------- customize HTML if you like -----------------------
if (! $includeMode ) {   
?>


</body>
</html>

<?php
}

// ----------------------------functions ----------------------------------- 
 
 
function fetchUrlWithoutHangingFD($url// thanks to Tom at Carterlake.org for this script fragment
   
{
   
// Set maximum number of seconds (can have floating-point) to wait for feed before displaying page without feed
   
$numberOfSeconds=4;   

   
// Suppress error reporting so Web site visitors are unaware if the feed fails
   
error_reporting(0);

   
// Extract resource path and domain from URL ready for fsockopen

   
$url str_replace("http://","",$url);
   
$urlComponents explode("/",$url);
   
$domain $urlComponents[0];
   
$resourcePath str_replace($domain,"",$url);

   
// Establish a connection
   
$socketConnection fsockopen($domain80$errno$errstr$numberOfSeconds);

   if (!
$socketConnection)
       {
       
// You may wish to remove the following debugging line on a live Web site
          
print "<!-- Network error: $errstr ($errno) -->\n";
       }    
// end if
   
else    {
       
$xml '';
       
fputs($socketConnection"GET $resourcePath HTTP/1.0\r\nHost: $domain\r\n\r\n");
   
       
// Loop until end of file
       
while (!feof($socketConnection))
           {
           
$xml .= fgets($socketConnection4096);
           }    
// end while

       
fclose ($socketConnection);

       }    
// end else

   
return($xml);

   }    
// end function
   
// --------------end of functions ---------------------------------------

?>

I monkeyed around with Ken's forecast script. Just plop your NWS office in for $myNWS and should be good to go.

http://www.cnyweather.com/wxhazard.php

Tony  8-)
« Last Edit: March 24, 2011, 08:00:14 AM by CNYWeather »
Tony




Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1643
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
Re: A script for Hazardous Weather Outlook
« Reply #5 on: March 24, 2011, 11:54:03 AM »
Hi Danny,
The one I was been trying the hardest with is located on my WFO home page and it's here    http://www.erh.noaa.gov/displayprod.php?product=WBCHWORNK

I found another on one of the interactive pages and it's here   http://www.weather.gov/view/validProds.php?prod=HWO&node=KRNK

I like to glance at that during the day myself to see hat they are expecting and some loyal viewers have mentioned they would like something similar.So far I haven't been able to produce.. I'm learning but not by leaps and bounds it seems LOL!!!

Thanks for all you help over the past year!!

Regards,
Wayne



BTW I have that report from Curly as well as his LSR script here.They are super nice!!!  Looks great on your page as well :)

Wayne,

Are you working in PHP? If so I have a little script that is actually several years old but I think it might serve as a good example for what you are trying to do. The script was written by Chris at Sloweather.

NOAA Fire Forecast PHP Script by Chris at Sloweather:

Code: [Select]
<?php
// This script by SLOweather disassembles the larger Sacramento Fire Weather Forecast
// and reassembles it into a smaller one with just the Northern Motherlode forecast
$data file_get_contents('http://www.wrh.noaa.gov/sto/cafw/print_version.php?sid=sto&pil=fwf&version=');

// Get the header
$regex '/FIRE WEATHER PLANNING(.+?)<br> <br>/';

preg_match($regex,$data,$fwfhdr);

// Get the discussion
$regex '/DISCUSSION(.+?)<br> <br>/';

preg_match($regex,$data,$fwfdis);

// Get the Northern Motherlode FWF
$regex '/NORTHERN MOTHERLODE(.+?) <hr>/';

preg_match($regex,$data,$slofwf);

// Fix the <br>s
$br "<br>";

$fwfdis str_replace($br,"",$fwfdis);

// Reassemble and output the header, discussion, and the Northern Motherlode
// forecast

?>

<h2>
<?php
echo $fwfhdr[0];
?>

</h2>
<?php
echo $fwfdis[0];
?>

<br> <br>
<?php
echo $slofwf[0];
?>





Thanks for the ideas!! I like that script as is !!! We have had a red flag warning or two lately and other than my CBI display and the radar there was not not much mention.. Definitely gonna look at that one!! Thanks!

Wayne


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1643
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
Re: A script for Hazardous Weather Outlook
« Reply #6 on: March 24, 2011, 03:03:58 PM »
Are you looking for something like this: http://www.ardmoreweatherlive.com/outlook.php

This is what I have been trying to render :)  So far bout all I have done is see just how many PHP errors a given server can spit out!
Bet mine has taken Pepto Bismol by now LOL!!


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline AWL

  • Forecaster
  • *****
  • Posts: 727
    • Ardmore Weather Live
Re: A script for Hazardous Weather Outlook
« Reply #7 on: March 24, 2011, 04:07:50 PM »
Here is the code I use. Very similar to Tony's above:
Code: [Select]
<?php
// PHP script by Ken True, webmaster@saratoga-weather.org
// forecast-discussion.php  version 1.00 - 14-Dec-2007
//   Version 1.01 - 14-Dec-2007 - added safety features per MChallis at http://www.carmosaic.com/weather/
//   Version 1.02 - 31-Dec-2007 - changed fetchUrlWithoutHanging function to fetchUrlWithoutHangingFD
//   Version 1.03 - 10-Jan-2008 - added "Forecast Discussion unavailable" feature per MChallis
//
    
$Version "hazard-outlook.php V1.03 10-Jan-2008";
//  error_reporting(E_ALL);  // uncomment to turn on full error reporting
// script available at http://saratoga-weather.org/scripts.php
//  
// you may copy/modify/use this script as you see fit,
// no warranty is expressed or implied.
//
// Customized for: NOAA forecast discussions
//   http://www.crh.noaa.gov/product.php?site=NWS&issuedby=MTR&product=AFD&format=CI&version=1&glossary=0
//
// To find your local NWS office code for $myNWS, do this:
//   go to www.weather.gov
//   search for your city, state
//   look at the URL in the 'Forecast Discussion' link near the bottom of the page
//   use the 3-character abbreviation is in the &issuedby=XXX parameter on the 
//     Forecast Discussion link (XXX will be your local office)
//   put the XXX in the $myNWS variable below
//
// output: creates XHTML 1.0-Strict HTML page (default)
// Options on URL:
//      inc=Y    -- returns only the body code for inclusion
//                         in other webpages.  Omit to return full HTML.
// example URL:
//  http://your.website/forecast-discussion.php?inc=Y
//  would return data without HTML header/footer 
//
// Usage:
//  you can use this webpage standalone (customize the HTML portion below)
//  or you can include it in an existing page:
//  no parms:  $doIncludeFD = true; include("forecast-discussion.php"); 
//  parms:    include("http://your.website/forecast-discussion.php?inc=Y");
//
//
// settings:  
//  change myNWS to abbreviation for your local NWS office
//    other settings are optional
// 
  
$myNWS 'OUN';   // Norman, NWS office
//  $myNWS = 'PQR';   // Portland, OR
//  $myNWS = 'OAX';   // Omaha, NE (Carter Lake, IA)
//
  
$cacheName "hazard-outlook.txt";  // used to store the file so we don't have to
//                          fetch it each time
  
$refetchSeconds 1800;     // refetch every nnnn seconds
// end of settings

// Constants
// don't change $fileName or script may break ;-)
  
$fileName "http://forecast.weather.gov/product.php?site=oun&product=HWO&issuedby=oun";
// end of constants

// ------ start of code -------
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
//--self downloader --
   
$filenameReal __FILE__;
   
$download_size filesize($filenameReal);
   
header('Pragma: public');
   
header('Cache-Control: private');
   
header('Cache-Control: no-cache, must-revalidate');
   
header("Content-type: text/plain");
   
header("Accept-Ranges: bytes");
   
header("Content-Length: $download_size");
   
header('Connection: close');
   
readfile($filenameReal);
   exit;
}

// Check parameters and force defaults/ranges
if ( ! isset($_REQUEST['inc']) ) {
        
$_REQUEST['inc']="";
}
if (isset(
$doIncludeFD) and $doIncludeFD ) {
  
$includeMode "Y";
 } else {
  
$includeMode $_REQUEST['inc']; // any nonblank is ok
}

if (
$includeMode) {$includeMode "Y";}

if (isset(
$_REQUEST['cache'])) {$refetchSeconds 1; }

// omit HTML <HEAD>...</HEAD><BODY> if only tables wanted
// --------------- customize HTML if you like -----------------------
if (! $includeMode) {
?>


<?php
}

// ------------- code starts here -------------------
echo "<!-- $Version -->\n";

// refresh cached copy of page if needed
// fetch/cache code by Tom at carterlake.org

if (file_exists($cacheName) and filemtime($cacheName) + $refetchSeconds time()) {
      print 
"<!-- using Cached version of $cacheName -->\n";
      
$html implode(''file($cacheName));
    } else {
      print 
"<!-- loading $cacheName from $fileName -->\n";
      
$html fetchUrlWithoutHangingFD($fileName);
      
$fp fopen($cacheName"w");
  if ($fp) {
        
$write fputs($fp$html);
         
fclose($fp);  
         print 
"<!-- cache written to $cacheName. -->\n";
  } else {
     print "<!-- unable to save cache to $cacheName. -->\n";
  }
}
  
// extract the hazard outlook
 
preg_match('|<pre[^>]*>(.*)</pre>|Usi',$html,$matches);
 
$discussion $matches[1]; // now have the forecast as a string with \n delimiters

$discussion  trim($matches[1]); // prevent extra white space at beginning and end

 // uncomment next line if you like only lower case text, or it could be made an option
 // $discussion  = strtolower(trim($matches[1]));

  
if ($discussion  == '') {
           
$discussion  'Hazardous Outlook unavailable, please try later.';
  }
  print 
"<pre>\n";
  print 
htmlspecialchars(strip_tags($discussion));
  print 
"</pre>\n";  $niceFileName preg_replace('!&!is','&amp;',$fileName);
  print 
"<p><small><a href=\"$niceFileName\">NWS $myNWS Office Hazardous Weather Outlook</a></small></p>\n";
// print footer of page if needed    
// --------------- customize HTML if you like -----------------------
if (! $includeMode ) {   
?>




<?php
}

// ----------------------------functions ----------------------------------- 
 
 
function fetchUrlWithoutHangingFD($url// thanks to Tom at Carterlake.org for this script fragment
   
{
   
// Set maximum number of seconds (can have floating-point) to wait for feed before displaying page without feed
   
$numberOfSeconds=4;   

   
// Suppress error reporting so Web site visitors are unaware if the feed fails
   
error_reporting(0);

   
// Extract resource path and domain from URL ready for fsockopen

   
$url str_replace("http://","",$url);
   
$urlComponents explode("/",$url);
   
$domain $urlComponents[0];
   
$resourcePath str_replace($domain,"",$url);

   
// Establish a connection
   
$socketConnection fsockopen($domain80$errno$errstr$numberOfSeconds);

   if (!
$socketConnection)
       {
       
// You may wish to remove the following debugging line on a live Web site
          
print "<!-- Network error: $errstr ($errno) -->\n";
       }    
// end if
   
else    {
       
$xml '';
       
fputs($socketConnection"GET $resourcePath HTTP/1.0\r\nHost: $domain\r\n\r\n");
   
       
// Loop until end of file
       
while (!feof($socketConnection))
           {
           
$xml .= fgets($socketConnection4096);
           }    
// end while

       
fclose ($socketConnection);

       }    
// end else

   
return($xml);

   }    
// end function
   
// --------------end of functions ---------------------------------------

?>

I believe this will get yours:
Change: http://forecast.weather.gov/product.php?site=oun&product=HWO&issuedby=oun
To:
http://forecast.weather.gov/product.php?site=rnk&product=HWO&issuedby=rnk
Also you change NWS office to: RNK and create a blank txt file named 'hazard-outlook.txt' if it doesn't create one on its own.

Hope this helps, Doug
« Last Edit: March 24, 2011, 04:33:10 PM by DougW »

Online CNYWeather

  • Forecaster
  • *****
  • Posts: 2295
    • CNYWeather
Re: A script for Hazardous Weather Outlook
« Reply #8 on: March 24, 2011, 04:23:28 PM »
You got it Doug. I just emailed Wayne that. RNK as the office produces:

http://www.cnyweather.com/hazardous-outlook-rnk.php
Tony




Offline ELDoradoWx

  • El Dorado Weather
  • Senior Contributor
  • ****
  • Posts: 298
  • Gentoo X = Complete_Control
    • El Dorado Weather
Re: A script for Hazardous Weather Outlook
« Reply #9 on: March 24, 2011, 06:19:10 PM »

Thanks for the ideas!! I like that script as is !!! We have had a red flag warning or two lately and other than my CBI display and the radar there was not not much mention.. Definitely gonna look at that one!! Thanks!

Wayne

Hi Wayne,

Just so you know:

You mentioned that you were trying to learn to code. So on the code sample I posted for you - I purposefully did not give you a working script, in the hopes that the script would help you advance in your learning to code, and perhaps put you in the right direction. My objective was the hope that it might help you to figure out how to make Chris' simple script work for your own current project in helping to further your coding knowledge.

« Last Edit: March 24, 2011, 06:27:04 PM by ELDoradoWx »
-Danny
-root is everything

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1643
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
Re: A script for Hazardous Weather Outlook
« Reply #10 on: March 24, 2011, 06:32:39 PM »

Thanks for the ideas!! I like that script as is !!! We have had a red flag warning or two lately and other than my CBI display and the radar there was not not much mention.. Definitely gonna look at that one!! Thanks!

Wayne

Hi Wayne,

Just so you know:

You mentioned that you were trying to learn to code. So on the code sample I posted for you - I purposefully did not give you a working script, in the hopes that the script would help you advance in your learning to code, and perhaps put you in the right direction. My objective was the hope that it might help you to figure out how to make Chris' simple script work for your own current project in helping to further your coding knowledge.



No problem at all Danny!!! With your help and ideas and snippets from others I think I have finally been successful in getting the result I wanted.
Haven't started on any validation issues (if there are any) but that will come in time as well I hope. The very way you have mentioned is exactly how some of my product scripts have came into existence...using a similar working example and making changes till I get close and go from there however I can to get the end result. Mistakes are the very best teacher no bones about it LOL!!!

Thanks!!

Wayne


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092