REM ? GLOBLOOP.MCB - Create topographic images to comprise a spinning globe REM ? REM ? Name: GLOBLOOP.MCB REM ? REM ? Purpose: Create topographic images to comprise a spinning globe. REM ? This script will loop the images and optionally run a REM ? command on each frame. REM ? REM ? REM ? Invocation: REM ? REM ? RUN frms spos FILE=GLOBLOOP.MCB "command REM ? | | | |__ command to run on each frame REM ? | | |______________ Name of script REM ? | |___________________________ Starting position in the REM ? | MYDATA/IMAGES dataset REM ? | (default= 3000) REM ? |_________________________________ Number of images to create REM ? (default = 12) REM ? REM ? - or - REM ? REM ? GLOBLOOP frms spos "command REM ? REM ? Notes: REM ? o This routine makes use of the dataset TOPO/GLOB which is REM ? realized in the image AREA9000. REM ? o You must specify the number of frames if you want to specify a REM ? starting output area other than the default. REM ? o This script uses the TOPO datasets TOPO/WHEMI (Meteosat REM ? hemispheric projection) and TOPO/GLOB (whole world). REM ? You must have access to these images. REM ? o The script assumes a dataset MYDATA/IMAGES is available. This REM ? is a local dataset of all AREA file numbers and can be set REM ? by running: REM ? REM ? DSSERVE ADD MYDATA/IMAGES AREA 1 9999 "All local AREA files REM ? REM History: 19960308: Created during Spring 1996 Advanced McIDAS Workshop REM 19961110: Added ability to run a command on each frame REM 19971001: Modified to use ADDE commands/datsets REM REM Get the input parameters 10 INPUT I, A, P$ 15 G = 1 20 IF P$ <> "" C$ = MID$(P$,2,LEN(P$)-1) REM VARIABLES DEFINITION REM I = Number of frames REM A = Output dataset position number REM N = longitude increments REM L = Central longitude of image REM G = dummy variable to check number of input parameters REM A$ = Output AREA file name REM P$ = Quote string on input REM C$ = Command to run on each frame (P$ minus the ") REM Set up defaults if necessary 100 IF A=0 LET A = 3000 REM Calculate number of frames. Check to make sure we have enough. 101 IF I = 0 LET I = 12 IF I > PEEK(13) LET I = PEEK(13) 102 N=360/I 103 J=0 104 A=A-1 105 L=-1800000-(N*10000) REM For each frame, copy AREA9012 to the image number. Change the standard REM longitude value in the navigation block (LWU POKE), then remap 9000 into REM this new REM AREA. Display the image and (if desired) run the command REM that was requested. 200 J=J+1 IF J>I GOTO 800 A=A+1 L=L+N*10000 IF J=1 KEYIN "IMGCOPY TOPO/WHEMI MYDATA/IMAGES.";A;" LATLON=0 100 MAG=-3 SIZE=418 418":GOTO 204 KEYIN "IMGCOPY MYDATA/IMAGES.";A-1;" MYDATA/IMAGES.";A;" SIZE=SAME" 204 A$=STR$(A) 205 IF LEN(A$)<4 A$="0"+A$: GOTO 205 A$="AREA"+A$ KEYIN "LWU POKE ";A$;" ";L;" 70" KEYIN "IMGREMAP TOPO/GLOB MYDATA/IMAGES.";A;" SMOOTH=YES" KEYIN "IMGDISP MYDATA/IMAGES.";A;" ";J;" LINELE=209 209 PLACE=CENTER MAG=1 EU=TOPO SF=YES" IF C$ <> "" KEYIN C$ GOTO 200 REM Set up the loop bounds, set the dwell rate to 2, and turn looping on 800 KEYIN "LB 1 ";I KEYIN "DR 4" KEYIN "TERM L ON" REM Done! 999 STOP