This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Patrick, I have clipped out below just the part of your question that relates to GEMPAK. The other parts will be answered by the respnsible persons. >From: "Patrick L. Francis" <address@hidden> >Organization: UCAR/Unidata >Keywords: 200412031744.iB3HitlI002009 <snip> >-------------------------------------- >Problem #2 ... Old Chiz script. >-------------------------------------- >In digging around the email archives, I found a wonderful old chiz script >that runs flawlessly, with one exception, and some problems. The easy >question is since gpwatch no longer exists.. .what do we use for watches? I use gpmap, using the WATCH parameter which uses the files decoded by dcwtch. An example is: WATCH = last|5;2;3|N|Y (the 5;2;3 are the colors yellow, red, and green for thunderstorm, tornado and status lines). Note from phelp there are defaults (but I just like red for tornado watches). Note that gpmap also has warning capabilities now, but gpwarn will still work as you have done. I like your legend. The way I would create multiple lines of title/text is to run GPMAP with clear=no and change the title line (there is also a more complicated gpanot): ## part of old script ## gpwarn << EOF1 \$respond = yes MAP = 0 GAREA = uslcc PROJ = lcc SATFIL = RADFIL = LATLON = 0 PANEL = 0 TITLE = 2/-2/T-storm & Tornado Warnings (red), Winter Advisory (blue) TEXT = 1/22/1/hw CLEAR = YES DEVICE = gf|watch_boxes.gif SVRL = last WWFIL = nonpcpwarn;winterwarn;floodwarn;tstormwarn;tornadowarn WWS = current WWATT = 120/1440 OUTPUT = t r e EOF1 gpmap << EOF \$respond = yes \$mapfil = hipowo.cia MAP = 6/1/1 GAREA = uslcc PROJ = lcc SATFIL = RADFIL = LATLON = 0 PANEL = 0 TITLE = 3/-4/Current Watch Boxes TEXT = 1/22/1/hw CLEAR = no DEVICE = gf|watch_boxes.gif WATCH = last|5;2;3|N|Y SVRL = r MAP = 0 TITLE = 5/-1/Plot Valid Time $YMD WATCH = r MAP = 0 TITLE = 2/-3/Flood Warnings (green), Non-Precip(magenta) r e EOF Note that by setting MAP=0 and clearing WATCH on subsequent runs, you save the drawing time of those lines. In the case of your product, a nice graphical depiction of a legend is always nice. If I were to redo the script, I'd probably use gpmap's WARN parameter instead of using gpwarn. Now with the WCN and WOU products, you might be able to add a little more to the graphic as well. >the other problem is the creation of an appropriate legend.. meaning.. >the results of the script are currently running and located here: >http://weather.bgsu.edu/warnings.shtml >now i attempted to create a legend by making gifs of the various colors >and putting at the top of the image because i can't seem to make >gpwarn create a legend by color by warning type. .. > >here is the adapted chiz: ># script location /home/ldm/util/inuse/warn2.csh >#!/bin/csh -f ># Sample script to plot current tornado and severe thunderstorm >## This script plots the data in a GIF image. It can be easily ># changed to create a metafile, XWindow, or postscript file. ># ># S.Chiswell/Unidata Original ># P.Bruehl/NWS 7/97 SOO release ># > ># Set the DISPLAY variable to the Xserver that will be used to ># create the GIF image. >setenv DISPLAY :1.0 >source /home/gempak/nawips/Gemenviron >cd /home/ldm/data/gempak/web ># ># Define the directory that contains the watch box GEMPAK files ># decoded by DCWATCH. >set STORM=/home/ldm/data/gempak/storm/watches > ># ># Define the directory that contains the text thunderstorm, ># tornado, and windter weather warning files. >set TORN_WARN=/home/ldm/data/gempak/nwx/watch_warn/torn_warn/ >set TSTRM_WARN=/home/ldm/data/gempak/nwx/watch_warn/tstrm_warn/ >set WNTR_WARN=/home/ldm/data/gempak/nwx/watch_warn/winter/ >set NO_PRECIP=/home/ldm/data/gempak/nwx/watch_warn/noprcp/ >set SEVERE=/home/ldm/data/gempak/nwx/watch_warn/severe/ >set SPECIAL=/home/ldm/data/gempak/nwx/watch_warn/special/ >set FLASHWATCH=/home/ldm/data/gempak/nwx/fflood/watch/ >set FLASHWARN=/home/ldm/data/gempak/nwx/fflood/warn/ >set HAZARDOUT=/home/ldm/data/gempak/nwx/pubprod/hzrd_otlk/ > ># Get the current date >set YMD=`date -u '+%y%m%d/%H%M'` >set DATE=`date -u '+%y%m%d'` > ># Don't run gpwarn if NOWARN, Don't run gpwatch if NOWATCH >set NOWATCH=0 >set NOWARN=0 > ># ># Check if any new watches have been decoded today ># ASSUMES watches are stored in files named watches*.gem, where ># "*" can be any string (such as watches970716.gem). ># >set LATEST=`find $STORM/* -mtime -1 -print` >if($#LATEST == 0) then > set NOWATCH=1 >else > echo $LATEST latest file $YMD >endif > ># ># Check if any new tornado, thunderstorm, or winter weather warnings ># have been issued today. ># ASSUMES warnings are stored in files named *.torn, *.tstrm, *.winter ># where"*" can be any string (such as 970716.torn). ># >set TORNADO=`find $TORN_WARN/*.torn -mtime -1 -print` >set TSTRM=`find $TSTRM_WARN/*.tstrm -mtime -1 -print` >set WINTER=`find $WNTR_WARN/*.winter -mtime -1 -print` >set NONPRECIP=`find $NO_PRECIP/*.noprcp -mtime -1 -print` >set SEV=`find $SEVERE/*.severe -mtime -1 -print` >set SPEC=`find $SPECIAL/*.special -mtime -1 -print` >set FWATCH=`find $FLASHWATCH/*.wtch -mtime -1 -print` >set FWARN=`find $FLASHWARN/*.warn -mtime -1 -print` >set HAZARD=`find $HAZARDOUT/*.hzolk -mtime -1 -print` > ># ># Concatentate all existing warning files into one big temporary file. >set WARN=/tmp/warn.$$ >if(($#TORNADO != 0)||($#TSTRM != 0)||($#WINTER != 0)||($#NONPRECIP != >0)||($#SEV != 0)||($#SPEC != 0)||($#FWATCH != 0)||($#FWARN != 0)||($#HAZARD >!= 0)) then > cat $WINTER $TSTRM $TORNADO $NONPRECIP $SEV $SPEC $FWATCH $FWARN >$HAZARD >! $WARN >endif > ># ># Check for current data. If none, exit >if((! -e /tmp/warn.$$)||(-z /tmp/warn.$$)) then > set NOWARN=1 > if(-e /tmp/warn.$$) then > rm -f /tmp/warn.$$ > endif >endif >if(($NOWATCH == 1)&&($NOWARN == 1)) then > exit >endif > ># ># Remove previous graphic >if(-e watch_boxes.gif) then > rm watch_boxes.gif >endif > ># ># If watch data exists, plot it ># >if($NOWATCH == 0) then >gpwatch << EOF > MAP = 0 > GAREA = uslcc > PROJ = lcc > SATFIL = > RADFIL = > LATLON = 0 > PANEL = 0 > CLEAR = yes > DEVICE = gf|watch_boxes.gif|975;780 > WWFIL = $LATEST > WWS = cur > WWATT = y > run > > exit >EOF >endif > ># ># If warning data exists, plot it ># >gpwarn << EOF1 > GAREA = uslcc > PROJ = lcc > SATFIL = > RADFIL = > LATLON = 0 > PANEL = 0 > TITLE = 19/-3/All Current Advisories... Valid $YMD z weather.bgsu.edu > TEXT = 1.2/1/1 > CLEAR = no > DEVICE = gf|watch_boxes.gif|975;780 > WWFIL = $WARN > WWS = current > WWATT = 120/1400 > IMCBAR = 32/V/LC//.88;.05/1 > run > > exit >EOF1 > ># ># Label the graphic >gpmap << EOF2 > \$mapfil = hipowo.cia > MAP = 8/1/1 > run > > exit >EOF2 > >gpend > ># ># Clean up >rm -r -f *.txt > >set webdir = /home/ldm/data/gempak/web/ > > >#cp $WARN /home/ldm/data/gempak/web/warnings.txt >rm $WARN >cd /home/ldm/data/gempak/web >#perl -pi -e's/\r//g; s/\n\n+/\n\n/g' *.txt > >ncftpput -u XXXXXXX -p XXXXXX weather.bgsu.edu >/var/www/html/data/warningmap *.gif >#ncftpput -u XXXXXX -p XXXXXX weather.bgsu.edu >/var/www/html/data/warningmap *.txt > >rm -r -f *.nts > >gpend <snip #3> The basic question for LDM pqact parsing is you can file products using the PIL identifier (such as /pTORBOU) to create directories of products, and issuing offices. The more complicated aspect is clipping out affected zone/counties from the UGC or VTEC line. The fips program I included in GEMPAK will check the UGC line for an input zone or county and output the bulletin it it includes that, but is doesn't parse the bulletin for the "$$" pieces. Robb Kambic had a perl decoder to chop out zones I believe that would be a good starting point if needed to modify for other types of products. The VTEC identifier in bulletins should also help when fully implemented by the NWS. Steve Chiswell Unidata User Support > > -- NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.