REM ? GEWCOMP.MCB - Create composite of GOES-East and GOES-West images REM ? REM ? Name: GEWCOMP.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 ssss FILE=GEWCOMP.MCB REM ? | | | | | |_________ ADDE scratch member REM ? | | | | |____________ display the image (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 ? GEWCOMP.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 REM ? o makes a copy of the east half of the "standard" image; remaps REM ? the specified east sector (perhaps selected by time) into the REM ? standard projection REM ? o composites the remapped east and west sectors using the MERGE REM ? option REM ? o displays the composite image if the user asked for it 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 FILE=GEWCOMP.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 G89COMP.MCB to GEWCOMP.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 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$, 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 scratch member or specify default 3 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 ";O$;" SIZE=ALL DEV=NNN" KEYIN "IMGREMAP ";W$;".";P$;" ";O$;" 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 ";S$;" SIZE=592 602 LINELE=0 601 DEV=NNN" KEYIN "IMGREMAP ";E$;".";P$;" ";S$;" SMOOTH=YES NO DEV=NNN" CLOSE 10 REM Composite the two masked images 30 KEYIN "IMGREMAP ";S$;" ";O$;" MERGE=YES 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 asked for it 40 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 100 KEYIN "IMGDEL ";S$;" DEV=NNN" REM Done! 999 PRINT "GEWCOMP: Done":STOP