REM ? GEWCOMP1.MCB - Create composite of GOES-East and GOES-West images REM ? REM ? Name: GEWCOMP1.MCB REM ? REM ? Purpose: 1) Create composite of GOES-East and GOES-West images in REM ? a north-western quadraspheric projection REM ? REM ? Invocation: REM ? RUN wwww eeee oooo hh d mmmm ssss hh FILE=GEWCOMP1.MCB REM ? | | | | | | |_____ ADDE dataset scratch file REM ? | | | | | |_________ ADDE dataset mask file REM ? | | | | |____________ display composite (Y/N)? REM ? | | | |______________ nominal hour for composite REM ? | | |___________________ ADDE dataset output member REM ? | |_______________________ ADDE dataset GOES-East member REM ? |____________________________ ADDE dataset GOES-West member REM ? REM ? Method: REM ? GEWCOMP1.MCB basically: REM ? o gets and validates user inputs REM ? o makes a copy of the "standard" image; remaps the specified REM ? west sector (perhaps selected by time) into the standard REM ? projection; and then updates the remapped images directory REM ? o makes a copy of the "standard" image; remaps the specified REM ? east sector (perhaps selected by time) into the standard REM ? projection; and then updates the remapped images directory REM ? o if the user did not specify a mask file, one is created REM ? o masks out unwanted image portions out of remapped west and REM ? east sectors REM ? o composites the remapped east and west sectors REM ? o displays the composite if the user asked to REM ? REM ? NOTES: REM ? 1) IMORTANT: You can not default positional parameters with REM ? an 'X'. If you do, that positional parameter is interpreted REM ? as a space by RUN. This has the undesired effect of having REM ? one less positional parameter on the command line. Use NONE REM ? for a place holder for character positionals (ie: 'p1') if REM ? you want to save only the image/TOPO composites). REM ? REM ? Example: REM ? REM ? RUN RTIMAGES/GW-IR RTIMAGES/GE-IR MYDATA/IMAGES.1234 22 Y N N FILE=GEWCOMP1.MCB REM ? REM History: 960311 - Created from Advanced McIDAS Workshop discussion REM 980601 - ADDEized while removing updates of SYSKEY.TAB and REM ROUTE.SYS REM 980903 - Changed name from G89COMP1.MCB to GEWCOMP1.MCB REM Changed G8- to GE- and G9- to GW- internally REM Changed TOPO/TOPOQUAD to TOPO/QUAD REM ? ---------- REM Definition of variables used in the following: REM REM Variable Use REM Input: W$ ADDE GOES-West member REM E$ ADDE GOES-East member REM O$ ADDE GOES-West-East member REM H$ nominal hour for both images REM L$ display the resultant composite image (Y/N)? REM M$ ADDE mask member REM S$ ADDE scratch member REM Internal: B$ BAND of original image REM D$ DAY of original image REM T$ TIME of original image REM P$ ADDE position REM L counter REM REM First, get input ADDE dataset members and nominal image time 1 INPUT W$, E$, O$, H$, L$, M$, S$ REM Check to make sure that west sector was specified IF W$ = "" PRINT "You must specify an input GOES-West sector":STOP REM Check to make sure that east sector was specified IF E$ = "" PRINT "You must specify an input GOES-East sector":STOP REM Check to make sure that output sector was specified IF O$ = "" PRINT "You must specify an output composite sector":STOP REM Get time or specify default of most recent for both IF H$ = "" GOTO 2 IF MID$(H$,1,1) = "N" LET H$ = "": GOTO 2 H$ = "TIME=" + H$ + ":00 " + H$ + ":59" REM See if user wants to load the resulting composite image 2 IF L$ = "" LET L$ = "N":GOTO 3 IF MID$(L$,1,1) <> "Y" LET L$ = "N":GOTO 3 L$ = "Y" REM Get mask member or specify default 3 IF M$ = "" LET M$ = "MYDATA/IMAGES.9991":GOTO 4 IF MID$(M$,1,1) = "N" LET M$ = "MYDATA/IMAGES.9991":GOTO 4 GOTO 5 4 KEYIN "IMGDEL ";M$;" DEV=NNN" REM Get scratch member or specify default 5 IF S$ = "" LET S$ = "MYDATA/IMAGES.9990":GOTO 10 IF MID$(S$,1,1) = "N" LET S$ = "MYDATA/IMAGES.9990" REM Check to see that the West sector exists; if not exit with a warning 10 KEYIN "IMGLIST ";W$;" ";H$;" DEV=FNN IMGLIST.OUT" OPEN "IMGLIST.OUT",10,80 INPUT @10,A$:INPUT @10,A$ IF MID$(A$,1,4) = EOF$ PRINT "GOES-West member not found":STOP INPUT @10,A$:INPUT @10,A$:INPUT @10,A$ P$=MID$(A$,1,4) L = 4 11 IF MID$(P$,1,1) <> " " GOTO 12 P$ = MID$(P$,2,L) L = L - 1 GOTO 11 12 KEYIN "IMGCOPY TOPO/QUAD MYDATA/IMAGES.9992 SIZE=ALL DEV=NNN" KEYIN "IMGREMAP ";W$;".";P$;" MYDATA/IMAGES.9992 SMOOTH=YES NO DEV=NNN" CLOSE 10 REM Check to see that the East sector was exists; if not exit with a warning 20 KEYIN "IMGLIST ";E$;" ";H$;" DEV=FNN IMGLIST.OUT" OPEN "IMGLIST.OUT",10,80 INPUT @10,A$:INPUT @10,A$ IF MID$(A$,1,4) = EOF$ PRINT "GOES-East member not found":STOP INPUT @10,A$:INPUT @10,A$:INPUT @10,A$ P$=MID$(A$,1,4) L = 4 21 IF MID$(P$,1,1) <> " " GOTO 22 P$ = MID$(P$,2,L) L = L - 1 GOTO 21 22 D$=MID$(A$,28,5) T$=MID$(A$,35,8) B$=MID$(A$,55,1) KEYIN "IMGCOPY TOPO/QUAD MYDATA/IMAGES.9993 SIZE=ALL DEV=NNN" KEYIN "IMGREMAP ";E$;".";P$;" MYDATA/IMAGES.9993 SMOOTH=YES NO DEV=NNN" CLOSE 10 REM Check to see if a mask image exists; if not create it. 40 KEYIN "IMGLIST ";M$;" DEV=FNN IMGLIST.OUT" OPEN "IMGLIST.OUT",10,80 INPUT @10,A$:INPUT @10,A$:CLOSE 10 IF MID$(A$,1,4)=EOF$ GOTO 45 GOTO 50 45 KEYIN "IMGFILT TOPO/QUAD ";S$;" FILTER=REPLACE 0 91 2455 89 2505 SIZE=ALL DEV=NNN" KEYIN "IMGFILT ";S$;" ";M$;" FILTER=REPLACE 255 91 2455 2506 4901 SIZE=ALL DEV=NNN" REM Mask out the unwanted portions of the remapped GOES-9 and GOES-8 images 50 KEYIN "IMGFILT MYDATA/IMAGES.9992 ";M$;" MYDATA/IMAGES.9996 FILTER=DIS 0 255 0 254 0 SIZE=ALL DEV=NNN" KEYIN "IMGFILT MYDATA/IMAGES.9993 ";M$;" MYDATA/IMAGES.9997 FILTER=DIS 0 255 1 255 0 SIZE=ALL DEV=NNN" REM Composite the two masked images 60 KEYIN "IMGOPER MYDATA/IMAGES.9996 MYDATA/IMAGES.9997 ";O$;" ZERO=DATA SIZE=ALL DEV=NNN" KEYIN "IMGCHA ";O$;" SS=70 BAND=";B$;" DAY=";D$;" TIME=";T$;" MEMO='GOES East-West Composite' DEV=NNN" REM Load the image if the user as to 70 IF L$ = "N" GOTO 900 KEYIN "IMGDISP ";O$;" MAG=-2 EU=IMAGE SF=YES REFRESH='EG;MAP H;BAR SU=IRTEMP'" REM Delete scratch data member 900 KEYIN "IMGDEL ";S$;" DEV=NNN" REM Done! 999 PRINT "GEWCOMP1: Done":STOP