[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NEXRAD composites



Hello All,

I have attached a McBASI script and enhancement file to this message. 
What does the script do:
1) Composite 1 to n states of radar sites. 
2) Combines stations using clear air and precip mode (common
enhancement)
3) Adds topography image as a base map (source area must be AREA8800 -
or change the script)
4) Runs WWDISP command

The topography image has been distributed with McIDAS-XRD version 7.8. 
The file is also available via anonymous ftp:

ftp ssec.wisc.edu
cd pub
cd mug.outgoing
get AREA8800
get CLRPCP.GRX
get CLRPCP.ET
get RADUS.MCB

RADUS.MCB will combine all the sites in the US.  This takes quite a
while to run!  If you see something you'd like added to the script let
me know, I can always try to make modifications.

Rick Kohrs
address@hidden



"Craddock, Mary Ellen" wrote:
> 
> We use Rick Kohr's routine MOSAIC.MCB to do this.  It is easily modified to
> either do a composite over the entire CONUS or over a regional area.
> 
> Mary Ellen
> 
> Mary Ellen Craddock
> Logicon-TASC
> address@hidden
> 
> -----Original Message-----
> From: Russ [mailto:address@hidden]
> Sent: Thursday, June 14, 2001 8:02 PM
> To: address@hidden
> Cc: Mike Patnoe; address@hidden; address@hidden
> Subject: Re: 20010614: NEXRAD composites
> 
> Tom Yoksas wrote:
> 
> > Along the same lines, Geoff Freeman of the Australian Bureau of
> > Meteorology has been working on a routine that can be used to display
> > image data on top of any navigated display (including satellite
> > images).  The image values are written into the graphics frame, so they
> > can be easily toggled on and off.  The initial version of the routine
> > that Jeff Wilson of ABoM showed me allows one to put up multiple radar
> > displays in effect creating a mosaic.  The work on this routine is
> > ongoing and probably not yet ready for prime time.  Jeff told me that
> > he hopes to contribute it to the McIDAS Developers Forum when it is
> > further along in its development cycke.
> >
> > Tom
> 
>      I'll add that there is an old McIDAS application that writes image data
> as a
> graphic. It is called DFC and was used in much the same way as Jeff's
> program
> mentioned above.
> 
>      We also have an application that allows multiple collocated images to
> be
> viewed on a single frame as a RGB composite. COMBINE is a great way view
> multispectral colorized composites. We have used this application to
> generate true
> color images using the MODIS channels 2, 3 and 5.
> 
>      If you visit our web site at
> 
>               http://www.ssec.wisc.edu/~robo/private/radar.html
> 
>     you will see the NEXRAD composites that the McIDAS data center is
> creating.
> 
>     Russ
REM ? RADCOMP -- Creates composite image of RADAR data for specified state
REM ?      RADCOMP state lat lon res
REM ? Parameters:
REM ?      state(s)    | single quoted string of 2-letter state ids of RADAR
REM ?                  | sites to be combined
REM ?      lat         | center latitude of destination image
REM ?      lon         | center longitude of destination image
REM ?      res         | resolution in kilometers of destionation image
REM ?
REM ? Example
REM ?     RADCOMP 'CA OR NV' 39 120 1

     input l$
     input n$
     input e$
     input k$
     input q$

rem
rem
rem
     if val(k$) < 1 print "Topography map only supports resolutions > 3km" : 
stop
 
     let m$ = "Precip"
     let m = 6

rem
rem --- User can define the name of the temporary data set by changing the 
value of t$
rem 
1    let t$ = "RADCOMP/TEMP"

rem
rem --- User can define the directory name for storing temporary data required 
to create composite
rem --- Change the string r$ from temp_directory to your choice.  
rem --- The default value is $HOME/mcidas/data/RAD_TEMP
rem
     let r$ = "temp_directory"

rem
rem --- If user has changed value of r$, don't bother determining the value of 
$HOME 
rem --- and move on to creating dataset name with dsserve
rem
     if r$ <> "temp_directory" goto 5

rem
rem --- Determine value of $HOME - needed for REDIRECT commands
rem
          keyin "OS DEV=T USER_HOME R {echo $HOME}"
          open "USER_HOME",10
          input @10,a$
          h$ = mid$(a$,1,len(a$))
          r$ = h$ + "/mcidas/data/RAD_TEMP"
          close 10

rem
rem --- Create a temporary data set to store temporary images for creating 
composite
rem
5    keyin "DSSERVE ADD RADCOMP/TEMP AREA 9001 9299 {Temporary areas for 
creating RADAR COMP}"

rem
rem --- Create a temporary directory for the temporary images for creating 
composite
rem
     keyin "OS {mkdir $HOME/mcidas/data/RAD_TEMP}"

rem
rem --- Set up a file redirection for temporary images
rem
     keyin "REDIRECT ADD AREA90* {"; r$ ;"}"
     keyin "REDIRECT ADD AREA91* {"; r$ ;"}"
     keyin "REDIRECT ADD AREA92* {"; r$ ;"}"
     keyin "IMGDEL RADCOMP/TEMP.1 189"

rem
rem --- Loop through list of states
rem
     let c = 1
     let p = 10
     x = 1
     l = len(l$)
15   if x > l goto 100
     s$ = mid$(l$,x,2)
     
rem
rem --- Determine the stations for the state requested
rem
     keyin "STNLIST ST="; s$ ;" TYPE=N DEV=T RAD_SITE.DOC R"

rem
rem --- Loop through all the stations
rem
     open "RAD_SITE.DOC",10
     input @10,a$
10   input @10,a$
     print a$
     if mid$(a$,1,4)=EOF$ close 10 : x = x + 3 : goto 15
     if mid$(a$,1,4)="Numb" close 10 : x = x + 3 : goto 15
     p$ = mid$(a$,7,3)

rem 
rem --- Get a listing for the ID and check mode to see if we process the data
rem
     keyin "IMGLIST NEXRAD/BREF1 FORM=EXP ID="; p$ ;" DEV=T RAD_PROD.DOC R"
     open "RAD_PROD.DOC",20
     input @20,b$
     input @20,b$
     input @20,b$
     input @20,b$
     input @20,b$
     input @20,b$
     input @20,b$
     print m$
     print mid$(b$,69,m)
     if mid$(b$,69,m) <> m$ close 20 : goto 10

rem
rem --- Copy the data and process
rem
     keyin "IMGCOPY NEXRAD/BREF1 "; t$ ;".1 SIZE=SAME STYPE=VISR ID="; p$
     keyin "IMGREMAP "; t$ ;".1 "; t$ ;"."; p ;" PRO=MERC LATLON="; n$,e$ ;" 
RES="; k$
     let z=status
     if z=0 if c=1 keyin "IMGCOPY "; t$ ;"."; p ;" "; t$ ;".199 SIZE=ALL" : let 
c=10 : close 20 : let p = p + 1 : goto 10
     if z=0 if c<>1 keyin "IMGOPER "; t$ ;"."; p ;" "; t$ ;".199 "; t$ ;".200 
ZERO=DATA FORM=CMAX SIZE=ALL"
     if z=0 if c<>1 keyin "IMGCOPY "; t$ ;".200 "; t$ ;".199 SIZE=ALL"
     let p = p + 1
     close 20
     goto 10

100  keyin "IMGOPER "; t$ ;".200 "; t$ ;"."; p ;" "; t$ ;".199 ZERO=DATA 
FORM=CMAX SIZE=ALL"
   
rem
rem --- Scale the precip/clear area to -28 to 75 dbz then scale to britness 
values 0 128
rem
     if q$ = "NO" goto 101
     if m$ = "Precip" let m$ = "Clear" : let m = 5 : keyin "IMGOPER "; t$ 
;".199 "; t$ ;".190 SCALE=16 240 82 255 SIZE=ALL"  : goto 1
101  keyin "IMGOPER "; t$ ;".199 "; t$ ;".191 SCALE=16 240 0 139 SIZE=ALL"
     keyin "IMGOPER "; t$ ;".190 "; t$ ;".191 "; t$ ;".192 SCALE=0 255 0 128 
SIZE=ALL FORM=CMAX ZERO=DATA"

rem 
rem --- Set up navigation for topo map
rem
     keyin "IMGCOPY "; t$ ;".190 "; t$ ;".193  SIZE=ALL"
     keyin "IMGREMAP A/A.8800 "; t$ ;".193"
     keyin "IMGOPER "; t$ ;".193 "; t$ ;".194 SCALE=0 255 0 255 LLMT=149"
     keyin "IMGOPER "; t$ ;".194 "; t$ ;".192 "; t$ ;".195 SCALE=0 255 0 255 
SIZE=ALL FORM=CMIN ZERO=DATA"

rem 
rem --- Display the final image, add map and weather boxes

     keyin "IMGDISP "; t$ ;".195 EU=CLRPCPT"
     keyin "PRDUTIL ADD "; t$ ;".195 2 ECHO -28 75 0 128 DBZ 0 0"
     keyin "LWU POKE AREA9195 0 20"
     keyin "GU REST CLRPCP"
     keyin "ERASE G"
     keyin "MAP"
     keyin "WWDISP FILL=TRAN 2 COLOR=2 4 3 5 TYPE=SEVWARN SEVWATCH TORWARN 
TORWATCH PLOT=BOX"
     keyin "GU MAKE 2 FIREBRICK"
     keyin "GU MAKE 3 RED"
     keyin "GU MAKE 4 FIREBRICK"
     keyin "GU MAKE 5 ORANGE"

     stop

Attachment: Clrpcp.et
Description: Binary data