Author Topic: Regional NOAA Satellite Animator Scripts  (Read 2829 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Regional NOAA Satellite Animator Scripts
« on: February 14, 2017, 04:31:15 PM »
README FIRST!!!
 This is a SLOweather script to create an animated GIF which has been modified by
   SE Lincoln Weather to animate satellite images. Best use for this size animation
   is in 'index.php' of Saratoga Dashboard and alternates in place of the now defunct
   WU satellite animation.  Other size animations up to 720px should be able to be created,
   and this has been tested.

 Installation:  The current script(s) are configured to be placed in your site's
   root directory, while the 'satelliteexample.gif' should be placed in whatever
   you designate as your $cache directory.

 IMPORTANT!!!!

 In order to generate the animaged gif with fresh images,
   create a cron job to run this script at 18 and 48 minutes after the hour for 'east/' GOES
   and 04 and 34 after the hour for 'west/' GOES.  This updates the images within a few
   minutes of their actual creation by NOAA while ensuring that the new images should be present.
   Blank images may result if earlier update minutes are selected.
   
 Because of file renaming, the sample image,'satelliteexample.gif', must initially reside
   in your $cache directory in order initialize this script on first run,
   so the necessary files will all be created and don't need to pre-exist.
   
 The $satType is incorporated into the created files' names. You can then use
   the animation however you see fit.  See your cache directory for the
   'satellite???-anim.gif' filenams.
   
 This script bogged down terribly when I tried to run it on my shared-hosting GoDaddy site.
   For this reason I now run it locally on an apache server and then immediately upload the
   new files to my website's cache directory, still via Fling.  The seven hour animation is
   generally around 400KB in size when using a 320px width, so plan accordingly.  Individual
   320x240 images are around 30KB in size.
   
 It's possible to generate more than one satellite animation by setting the $satType to a different
   Satellite and Region and then saving this file with a new name, like
   'Satellite-GifAnimator-ir4.php' for an 'Infrared 4' series or 'Satellite-GifAnimator-rb.php' for
   a 'Rainbow' series. Of course this additional animation will require its own cron job.
   
 The Directories of the primary images are at 'http://www.ssd.noaa.gov/goes/east/cp/img?C=M;O=D' for
   GOES East Central Plains images for example, or 'http://www.ssd.noaa.gov/goes/west/cp/img?C=M;O=D' for
   the GOES West Central Plainsd images.  Etc.  The variables '?C=M;O=D' arrange the directory by time
   with the latest files first.
   
 At times the GOES system will not have a new image every half hour, at least it happened on GOES West only
   between 900Z and 1200Z 13 Feb 2016.  When the script encounters a missing image, it automatically seeks the
   previous image.  This may lead to duplicate images in the animation, but I think this is preferable to
   black images. This algorithm also avoids blank images due to mis-timed image downloads.
   
 In Summary:
   1) Review and change the settings in any of the files to suit your needs. Create a separate
     $cache, (now '/cachetest/') directory wherever you use the *-test.php scripts.
   2) Place a 'satelliteexample.gif' in your $cache directory or directories.
   3) Place all of the .php scripts in the root of your site/testing site.
   4) Create cron jobs to run the scripts you intend to use.
   5) Allow enough time to pass so that the animation(s) will be fully populated
     with fresh images before you actually go live with the animation(s).


This text, except the Summary and beyond, currently prefaces all of the Animator script files within the attached zip.

The animation along with the individual images can be seen here and here.  The script is currently unversioned.

New zip now ready.  It successfully traversed midnight GMT today using GOES East.  The GOES West animation is more problematic because sometimes images aren't updated every half hour which can cause black images. Delayed posting of images by NOAA can
also produce black images, which happened just after I posted the latest zip.
« Last Edit: February 21, 2017, 10:15:22 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #1 on: February 14, 2017, 09:56:24 PM »
The logic to determine when midnight GMT occurs was flawed, so the GMT 00:00 GOES West and 00:15 GOES East were old images.  I've attempted to correct this in the attached scripts.  It will take another day to see if this change is correct or if I overcorrected.

There was a problem with me fat-fingering the ir4-test script so it didn't point to the correct site.  It's now corrected.

I've added a colon, :, to the time string to make it an actual time.  I had originally made the time Zulu, but changed to GMT without actually displaying a traditional time.

The new zip is attached to the first post.
« Last Edit: February 14, 2017, 09:58:55 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #2 on: February 15, 2017, 10:55:36 AM »
That's cool, Jerry! It's nice to see someone else actually using and improving one of my scripts.

Chris

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #3 on: February 15, 2017, 10:08:57 PM »
Thanks, Chris.  I'm afraid it's still very much a work in progress.

The changes I made yesterday made the situation even worse!

I've greatly revised the timing logic so I have hopes that the transition into a new day will go more smoothly.  Time will tell.

I've also revised the ViewSatellite-GifAnimation scripts to handle widths up to 720px.

The current zip is 'Beta3', and again is internally unversioned.  It is attached to the first post.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline tbrasel

  • Contributor
  • ***
  • Posts: 141
    • Northwest Arkansas Weather.com
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #4 on: February 16, 2017, 06:02:12 PM »
Thank you, Jerry.

Question, is it possible to expand or add to the array?

I am interested in this one, but I would ask you first was this even possible?

http://www.ssd.noaa.gov/goes/comp/ceus/wv-animated.gif
 
Again, thank you & SLOweather for this script.
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #5 on: February 16, 2017, 06:55:57 PM »
Thank you, Jerry.

Question, is it possible to expand or add to the array?

I am interested in this one, but I would ask you first was this even possible?

http://www.ssd.noaa.gov/goes/comp/ceus/wv-animated.gif
 
Again, thank you & SLOweather for this script.

I was unaware of these five hour animated continental US satellite GIF's, and when I get a chance I'll look at them.  Where were you thinking about using them?

I've temporarily suspended my use of this script due to poor performance, especially around midnight.  I need to back off and ponder why I'm having problems identifying the latest images when they're up.  Meanwhile if anyone else has any ideas feel free to chime in.  I'm off to play my tuba this evening rather than beat my head against a brick wall over this. :-)  I'll revisit it in a day or two.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline tbrasel

  • Contributor
  • ***
  • Posts: 141
    • Northwest Arkansas Weather.com
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #6 on: February 17, 2017, 05:58:14 AM »
I was pondering about adding space to my index page. I like the smaller pixels. Although I am just playing/tinkering with the script for now. I have not applied it to my site for use, but I have copy running & I do not seem to be having any issues. I also am not up around midnight either, that could be it  :grin:.

I would really like to be able to pull in the "WFO Sectors" into these smaller pixels & then be able to drop off the white border frame & just have the image animation.

Enjoy your weekend & thanks Jerry.
 
« Last Edit: February 17, 2017, 06:42:28 AM by tbrasel »
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #7 on: February 17, 2017, 09:16:22 AM »
For the time-being I've placed the US Rainbow Animated GIF into my 'index.php' like this using this code:
Code: [Select]
  <td align="center">
    <a class="hvr-glow hvr-grow" onclick="x=window.open('wxus-allloops-h5.php')" target="_blank" title="US Satellite Loops in New Tab"><img src="http://www.ssd.noaa.gov/goes/comp/ceus/rb-animated.gif" width="320" height="<?php echo ((330*2)/3)?>" style="margin: 0px; padding: 0px; border: none; cursor:pointer"/></a>
  </td>
The 'hvr-glow' and 'hvr-grow', along with a 'hvr-shrink' class have been modified with much smaller proportions after having been stripped out of Hover.css, minified, and referenced by
Code: [Select]
<link href="css/hover-tiny.css" rel="stylesheet" media="all"/>
<style type="text/css">
.img-zoom {
position:relative;
z-index: 1;
cursor:auto;
}
 
.transition {
position:relative;
z-index: 999;
  transform: scale(2);
cursor:crosshair;
}
</style>
in my 'index.php' <head>.

I'm still pondering how best to create an animated GIF from the regional or WFO satellite images that successfully transits GMT midnight.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline tbrasel

  • Contributor
  • ***
  • Posts: 141
    • Northwest Arkansas Weather.com
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #8 on: February 17, 2017, 09:21:21 AM »
For the time-being I've placed the US Rainbow Animated GIF into my 'index.php'
 
I'm still pondering how best to create an animated GIF from the regional or WFO satellite images that successfully transits GMT midnight.

I like it!
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline tbrasel

  • Contributor
  • ***
  • Posts: 141
    • Northwest Arkansas Weather.com
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #9 on: February 17, 2017, 06:28:36 PM »
ssd.noaa.gov/goes is not https. This organization has been updating from http to https, so maybe https soon. When I placed the test version in my index.php, I lost my ssl (green pad lock). Otherwise, I liked it ! 

475 x 422 pixels size I like.

Code: [Select]
<a class="comp-ceus comp-ceus" onclick="x=window.open('wxus-allloops-h5.php')" target="_blank" title="US Satellite Loops in New Tab"><img src="http://www.ssd.noaa.gov/goes/comp/ceus/wv-animated.gif" width="475" height="<?php echo ((422*2)/3)?>" style="margin: 0px; padding: 0px; border: none; cursor:pointer"/></a>
Best Regards
tbrasel

Bentonville Arkansas, USA
Hardware: Davis 6153 - Wireless Vantage Pro2 with FARS
Software: VWS V15.00
Website: https://www.nwarwx.com

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #10 on: February 18, 2017, 08:58:19 AM »
Thanks, Jerry. Much better than the WU error screen!

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #11 on: February 18, 2017, 09:48:54 AM »
Still working on this, but it seems like there are always two steps forward and one step back with this script.  Zip removed from first post.  Meanwhile the US Continental Animation works well.  You can specify which satellite animation you want to display using the abbreviations you all know so well by now:
   vis -- Visible
   wv -- Water Vapor
   ir2 -- Infrared
   Enhanced Infrared
      ir4 -- No Enhancement
      avn -- AVN Color
      bd -- Dvorak
      jsl -- JSL Color
      rgb -- False Color RGB
      ft -- Funktop Color
      rb -- Rainbow
« Last Edit: February 18, 2017, 09:53:04 AM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #12 on: February 19, 2017, 11:29:56 AM »
For the time-being I've placed the US Rainbow Animated GIF into my 'index.php' like this using this code:
Thanks, Jerry! Sooooo much better than what WU left us.   :roll:  Modified slightly to fit my needs.
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #13 on: February 19, 2017, 12:40:50 PM »
For the time-being I've placed the US Rainbow Animated GIF into my 'index.php' like this using this code:
Thanks, Jerry! Sooooo much better than what WU left us.   :roll:  Modified slightly to fit my needs.
Your aspect ratio, while it more nearly fills the space, leaves a slightly oval NOAA logo...
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #14 on: February 19, 2017, 01:06:48 PM »
Ken True has posted in another thread a possible solution that uses a WU visible satellite animation which has the same map background as the WU radar background.  I understand that it also displays a nighttime image, but I wonder if any clouds show up. We'll see.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #15 on: February 19, 2017, 01:18:33 PM »
Your aspect ratio, while it more nearly fills the space, leaves a slightly oval NOAA logo...
I noticed that and was going to work with the settings but have been glued to my current PC problem. Hopefully NOAA won't mind.

Thanks.
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #16 on: February 19, 2017, 01:20:50 PM »
Your aspect ratio, while it more nearly fills the space, leaves a slightly oval NOAA logo...
I noticed that and was going to work with the settings but have been glued to my current PC problem. Hopefully NOAA won't mind.

Thanks.
No hurry.  I doubt the NOAA police are lurking about watching for such things.  :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #17 on: February 19, 2017, 01:32:18 PM »
No hurry.  I doubt the NOAA police are lurking about watching for such things.  :-)
All better now.  :-)
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #18 on: February 19, 2017, 01:33:53 PM »
No hurry.  I doubt the NOAA police are lurking about watching for such things.  :-)
All better now.  :-)
Indeed! 8-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #19 on: February 19, 2017, 02:02:27 PM »
Thanks for checking and visiting!
John
W7JKG

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: BETA: Possible Replacement for WU Satellite GIF Animation
« Reply #20 on: February 21, 2017, 10:08:56 PM »
The latest version of this script is now posted in the initial post of this thread.

Thinking about adding WFO's to the mix, just for fun.
« Last Edit: February 21, 2017, 10:15:59 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

 

anything