Tuesday, September 23, 2008

Poor Man's Mesoanalysis for GRLevel3

What do you get with you merge SPC's mesoanalysis page with GRLevel3? I call it the "Poor Man's Mesoanalysis."

If you have the URL2File and ImageMagick programs already on your computer through my "Web Cam Project", then you're in business! If not, see my earlier post on this. You'll simply need to run a batch file that will download, convert and cut the graphics. Once that's done and you have the placefiles loaded on GRLevel3, they will show up on your display!

In a perfect world, I'd like to use SPC's "sector graphics" since they have much higher resolution . There's a problem though: the locations are always changing (dang weather anyway!) The National Sector view however doesn't change.

First, I created a folder called (big surprise) SPC in the C:\Program Files\GRLevelX\GRLevel3 directory. I run the following batch file (located in the SPC folder) to get the following 16 products from the National Sector view:

URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/mcon.gif mcon.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/ttd.gif ttd.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/thea.gif thea.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/pchg.gif pchg.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/sbcp.gif sbcp.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/mlcp.gif mlcp.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/laps.gif laps.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/dcape.gif dcape.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/lfch.gif lfch.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/lclh.gif lclh.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/shr6.gif shr6.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/srh1.gif srh1.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/ehi1.gif ehi1.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/ehi3.gif ehi3.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/scp.gif scp.gif
URL2File http://www.spc.noaa.gov/exper/mesoanalysis/s4/pwtr.gif pwtr.gif

convert mcon.gif -shave 300x200 -matte mcon.png
convert ttd.gif -shave 300x200 -matte ttd.png
convert thea.gif -shave 300x200 -matte thea.png
convert pchg.gif -shave 300x200 -matte pchg.png
convert sbcp.gif -shave 300x200 -matte sbcp.png
convert mlcp.gif -shave 300x200 -matte mlcp.png
convert laps.gif -shave 300x200 -matte laps.png
convert dcape.gif -shave 300x200 -matte dcape.png
convert lfch.gif -shave 300x200 -matte lfch.png
convert lclh.gif -shave 300x200 -matte lclh.png
convert shr6.gif -shave 300x200 -matte shr6.png
convert srh1.gif -shave 300x200 -matte srh1.png
convert ehi1.gif -shave 300x200 -matte ehi1.png
convert ehi3.gif -shave 300x200 -matte ehi3.png
convert scp.gif -shave 300x200 -matte scp.png
convert pwtr.gif -shave 300x200 -matte pwtr.png

Since GRLevelX placefiles support PNG, JPG and TIF files only, I use ImageMagick to not only change the SPC GIF files to PNG but to also cut out the portion of the map I want:

























From there, I load the following placefile into GRLevel3 to display it:

;Moisture convergence from SPC

Refresh: 60
Title: Mstr Cnvg from SPC

Image: c:\Program Files\GRLevelX\GRLevel3\SPC\mcon.png
32.57435, -102.50050, 0, 1
42.80730, -103.78930, 0, 0
42.80355, -89.05626, 1, 0
32.57435, -102.50050, 0, 1
42.80355, -89.05626, 1, 0
32.52673, -90.64704, 1, 1
End:

This is what it looks like on my computer:


Here's the entire list of placefiles you'll need to make this work on your computer. You can give them any name you want.

As you can tell, these placefiles work for Kansas but include some neighboring states too. If you wish to mess with ImageMagick to change the "shave" numbers (which determines what part of the original graphic to cut out) and then mess with the lat/lon in the placefiles, please go for it! I unfortunately don't have the time to make other "sectors" for other areas of the country. My example will serve as a template for others who want to expand on my work. In addition, if you want to add more of SPC's National Sector products to this, simply look up the raw image(s) on their site.

If you're hoping my work can replace your AllisonHouse/F5Data subscription, you will be sorely disappointed! It's not even in the same league of high quality products they make! However, if you have a tight budget and want to give this a try, be my guest!

As always, if you have any comments, concerns or complaints: please let me know!

Friday, July 18, 2008

New Header

I had an artistic moment this afternoon so I made a new header for the blog. These moments don't come often so I took advantage of it while it was there. Enjoy.

Thursday, July 17, 2008

Updates!! (Finally)

This has been in beta testing for a couple of weeks but I finally had enough time today to get it finished...

For a while now, I've been wanting to clean up the camera files. So, I have taken the previously named "ks1", "ks2" and "ks3" files and converted them to just one placefile and one bat file. While this does make each respective file longer, it also allows the user to have just one placefile loaded for the Kansas cameras instead of 3. I don't know about you but my placefile manager is almost full!!

I also have changed the "gr3cambat.txt" file too.

Any questions, comments or concerns...please let me know!

Rodney

Wednesday, June 18, 2008

Sorry for Lack of updates lately

Needless to say with the severe weather season ongoing, I've had no time for side projects, including updates for the web cameras and such. Hopefully the death ridge will build in soon and things will calm down and dry out. Once that happens, I can resume some other projects.

Thursday, March 27, 2008

Crude Profiler and Upper air data displayed on GRLevel3

A few days ago I was thinking, "I'd like to see profiler data on GRLevel3". I've been working on this little project since then and I finally have it the way I like.

It works very similar to the web camera scripts that I've maintained for the last year and a half. The scripts run locally on your computer using the programs URL2File and ImageMagick. (If you are new to the web cameras, see my initial "how-to" post.)

Using URL2File, I downloaded profiler data (.gif files) available on the NCAR/RAP Real-Time Weather Data page. After I saved an initial picture, I used the ImageMagick scripting to resize it and combined it with a transparent triangle (pointer.png). I then wrote a placefile script for each profiler site, so the operator could toggle it on/off. There's just too much overlap/screen blockage if you try to display them all in one placefile (trust me, I tried it already!) The final result looks like this:




It's by no means perfect but if you want a quick and dirty method to display the data, then you're in luck.

Here's how I set everything up:

On my computer, I have the following directory set up:

C:\Program Files\GRLevelX\GRLevel3\pictures\profiler

The "pictures" folder is where all of the webcam pics go. To organize things, I created a "profiler" folder.
This is where I put the "profilerUCAR.bat", "pointer.png" and "sitedown.jpg", the latter of which is used by the scripts in case the site is down (to keep the .bat file from freezing up). Remember: before you can operate the script, you must change the name from "profilerUCARbat.txt" to "profilerUCAR.bat" (without the quotation marks of course).

Here's how the first block of the script looks:

URL2File http://www.rap.ucar.edu/weather/upper/lmn_wp.gif lmn.jpg ||convert sitedown.png lmn.jpg
convert lmn.jpg -resize 400x400! lmntemp.png
convert pointer.png lmntemp.png +append lmn.png

The rest of the script can be found on the "Profiler/Upper Air Project" on the right part of my blog. The placefile for the Lamont, OK site looks like this:

; Crude Profiler data for GRLevel3
; by Rodney Price 3/26/08

Refresh: 10

Title: Lamont, OK Wind Profiler
Threshold: 250
IconFile: 1, 1000, 400, 500, 200,"C:\Program Files\GRLevelX\GRLevel3\pictures\profiler\lmn.png"
Font: 1, 11, 1, "Arial"

Icon: 36.68, -97.47, 0,1,1, "Lamont, OK Wind Profiler\nHourly data"


Right now, I have worked on just 6 sites for my local area but it will serve as a template so that you can easily add sites for your area if you wish.

In addition, I changed up the code a bit to also display the UCAR upper air data. It operates pretty much the same as the profiler scripts. I created another folder in the "pictures" directory for "upperair" (to keep it separate from the profiler stuff). Put the file "raobsbat.txt" in that folder (and change the name to "raobs.bat"). In addition, a copy of the "pointer.png" and "sitedown.png" file each must be in this folder too so the .bat file will work properly.

The TOP and DDC sites can also serve as a template if you wish to add more sites.

I hope all of this made sense. Please let me know if you have any questions or problems!

Rodney