HOW TO: Creating radar loops

This is the place to get help with Digital Atmosphere, suggest improvements, and get tips.
Tim Vasquez
Administrator
Posts: 535
Joined: Sat Nov 22, 2003 10:47 pm

HOW TO: Creating radar loops

Post by Tim Vasquez »

Digital Atmosphere does not have an animator built in yet, but you can do it in an automated manner like this.

Write a batch file in MS-DOS containing these commands.

Code: Select all

composite -compose xor -dissolve 50 basemap.gif baseradar.gif gif:radar.gif 
copy frame1.gif frame0.gif
copy frame2.gif frame1.gif
copy frame3.gif frame2.gif
copy radar.gif frame3.gif
convert -delay 50 frame0.gif -delay 50 frame1.gif -delay 50 frame2.gif -delay 200 frame3.gif -loop 0 radarloop.gif 
(be careful, there should be only six lines above; your browser may have word-wrapped them, especially the last line)

The first composite command gives me a better "merge" of radar data with the basemap. The file basemap.gif contains only the basemap, and baseradar.gif contains only the latest radar (with the basemap blanked before drawing echoes). The output is written to radar.gif. Now come four copy commands. This shifts all frames back one slot, with frame0.gif being the oldest and frame3.gif being the newest. Finally comes the final convert command, which builds the radar animation and saves it to radarloop.gif. Ouila!

Of course, make sure Digital Atmosphere is writing out the baseradar.gif file. You can also delete the first convert line and just have it write radar.gif. Be sure it's on a script called every so often, and by the time you execute this batch four times you'll have a full radar loop.

The convert command requires the freeware ImageMagick kit, available at:
http://www.imagemagick.org/script/index.php

But lucky for you, I've thinned out the mess of distributables to just a dozen key files, which you can get at:
http://www.weathergraphics.com/dl/convert.zip
Unzip these to the SAME directory where you will be running the batch file (or put in their own directory and change the Windows path in your system setup to point to that directory).

The ImageMagick library is quite powerful, and there's no limit to what it can do with a good batch file. With the radar upload hack I posted earlier, you can put animated radar on your server quite easily... running your own Weathertap site.

Tim
Weasel

Post by Weasel »

Just gave this a try..it works great!

Pat
Tim Vasquez
Administrator
Posts: 535
Joined: Sat Nov 22, 2003 10:47 pm

Post by Tim Vasquez »

Glad to hear it.
tornadoforecaster

Re: radar loops

Post by tornadoforecaster »

Howdy all:

I am not sure how to do this, since writing scripts was never my strong point. It can't be as simple as pasting Tim's batch file somewhere, then renaming the data files?!?! I'd like to set up a radar loop for my website.

Any help is appreciated! :)

Thanks,

Randy
Weasel

Post by Weasel »

Randy this is the script I use:

load,c:\maps\arxwhite.dmf
RADAR,BREF1,arx mpx dmx
export,c:\convert\baseradar.gif
SPAWN,c:\convert\radar.bat,,1
upload, radarloop.gif to your website (you'll have to include your own info here but you do this all the time anyway:)

What you'll want to do is download Tim's convert zip and extract it to c:\convert ... then copy and paste his batch file into notepad and save it as radar.bat in the c:\convert directory

Place basemap.gif found in C:\convert ...to get it to look like my loop use arxwhite which has no vectors place these two files in a directory named C:\maps.

Randy, you may have to load the arx basemap I already sent you and export it as a chart in gif format and save it to C:\convert\basemap.gif ..either that or you could export it as a bitmap and convert with other software to a gif to eliminate the dark colors. With any luck the basemap.gif will work ok and you won't have to:)

Pat
tornadoforecaster

Re: radar loops

Post by tornadoforecaster »

Pat:

I just downloaded the maps from your webserver and have them on my harddrive. What I'd like to do is set up one like you have with Lacrosse being the primary site, but with Minneapolis and Green Bay as merge ins.
And then Green Bay the primary site with Lacrosse and Minneapolis as the merge ins. Can this be done?

So then I won't need to download that program for "convert", because I really don't know what to download from there anyway. I'm going to set up the folders, and get the scripts put in order.

I'll check back later for additional instructions, if any.

Thanks Pat!

Randy
Weasel

Post by Weasel »

Randy,

You have to download the convert zip or the image will not look the same...it would just be radar echoes overlaid on the basemap like usual. The dissolve fuction helps the radar echoes blend with the terrain without distorting radar echo colors.

You only have to download and extract this file:

http://www.weathergraphics.com/dl/convert.zip

No installations or anything else is involved...that's why Tim only included what we really need. And you must create the batch file...otherwise nothing will happen.

In the script change this line:
from this: RADAR,BREF1,arx mpx dmx
to this: RADAR,BREF1,arx mpx grb
That will merge Minneapolis, La Crosse and Green Bay for the ARX map.

As far as the Green Bay center is concerned I have the maps for it (I think you do as well, except for the white map)...the merge isn't anything different than what was done above. So a small change and it will be done as well. I'll upload the map/maps for you later this evening or tomorrow.

Pat
tornadoforecaster

Re: radar loops

Post by tornadoforecaster »

Pat:

Okay, then I have all the files I need, including the batch files Tim wrote,
and the additional files we need. Yes, please send the additional colorized basemap. Can I use Tim's batchfile, or do I do my own.

I never wrote a batch file, so if I need to write one, I'll need some help with writing it. Anyway, I believe I have everything!

Randy
tornadoforecaster

Re: radar loops

Post by tornadoforecaster »

tornadoforecaster wrote:Pat:

Okay, then I have all the files I need, including the batch files Tim wrote,
and the additional files we need. Yes, please send the additional colorized basemap. Can I use Tim's batchfile, or do I do my own.

I never wrote a batch file, so if I need to write one, I'll need some help with writing it. Anyway, I believe I have everything!

I just double checked everything thus far, and I'm set! If your going to write me the script to do the maps, is that the same script I need to run the loops or do I make that? I'm totally lost :?

I wish I knew more than I do with understanding scripts etc.

Randy
tornadoforecaster

Re: Radar

Post by tornadoforecaster »

Pat:

So to be sure I understand you, I need seperate scripts to launch either grb or arx, right? And then the directories I made outside of DAWS, do I need to put them somewhere IN DAWS or leave them outside as they are now? The two directories are "convert" and "maps".

Randy
Post Reply