	PROGRAM MAPLOTFC_TITLE  MAPLOT  Dummy main routine,  Initializes database dimensions.C_CALLS  XGDATA!C_HISTORY R.Gurule  86Apr07  USGSEC_DESCRIPTION The program MAPLOT is a dummy main routine; this moduleAC  initializes the database constants for this version of XGFUNC.C_PAUSEA	PARAMETER (ID1= 15)	!Set to max number of columns to be allowed.@C ID1 = The number of input cols (principal + ick +constraints).<C     + The number of internal use cols ( up to programmer).7C     + The number of output cols (=0 in this version).=	PARAMETER (ID2= 600)	!This must be 240:480:600 for IR:MW:MI.7	PARAMETER (ID3= 20)	!@ Number of time ranges in a list$	INTEGER*2 IA(120, ID1), INDEX( ID2)@	EXTERNAL MAPUSER	!@ may change this, but must do so in 3 places	CHARACTER*16 PNG	DATA PN /'MAPLOT:87OCT12'/ ! Program name will appear in output banner        DATA IPCF,IPR/2,-2/<	INDEX(1)=1	!@ define only those databases for which program9	INDEX(2)=2	!@   is valid.  =0 entries must be the latter"	INDEX(3)=3	!@  locations of INDEX6	MXNVAR = 3	! set to max number of principal variables9	CALL XGDATA (IA,ID1, INDEX,ID2, ID3, MXNVAR, PN,MAPUSER)	STOP	END%	SUBROUTINE MAPUSER (IQ,IA,NLINES,IR)DC_TITLE  MAPUSER  Actual program that performs the plotting of data.C_ARGUMENTSC	INTEGER IQ	    ![I]Control code variable, determines program flow.C	INTEGER*2 IA(NLINES,*) ![I] Contains requested database variables.5	INTEGER NLINES	       ![I] Number of lines per page.,	INTEGER IR	       ![O] Returns status code.C_CALLS  XPLOT'C_HISTORY  86Feb05  R.Gurule  FlagstaffPC_DESCRIPTION  Main workhorse program of PLOT, This routine is called by XGDATA,PC which sends the database variables to this routine.  This routine controls theMC calling sequence and delivery of variables to the main plotting routines ofC XPLOT.C_VARIABLES:	INCLUDE 'RAD$INC:XXGCOM.INC/LIST'    !Uses: LUMPSQ,IDCON.I                                             !Modifies:  NCOLP,NVAR,ICOL.A	INCLUDE 'RAD$INC:XXCOM.INC/LIST'     !Uses: IOUT,ILIST,J1,J2,IP.=                                             !Modifies: NONE.E	INCLUDE 'RAD$INC:XXSCOM.INC/list'    !Uses: MTITLE.  Modifies: NONE.D	INCLUDE 'RAD$INC:XXDCOM.INC/list'    !Uses: KDEF.  Modifies:  NONE.C	INCLUDE 'RAD$INC:XXTAE.INC/LIST'     !Uses: LOUT.  Modifies: NONE.C_END               	INTEGER*2 KPTIME	LOGICAL LINIT 	EQUIVALENCE (KPTIME,IDCON(4,1))	REAL*4 XX(120),YY(120),ZZ(120)	INTEGER*4 IW(9)		LOGICAL LGSEQ        NVAR=3	IR=0	GO TO (100,200,300,400,500),IQC______INITIALIZATION:     100	LINIT = .FALSE.1	WRITE(IOUT,*)' Principal variables: 1=X 2=Y 3=Z'=	ICOL(1) = 10	!Predefine the priciple variables  LAT, and LON	ICOL(2) = 9.	NCOLP = 2	!Number of predefined variables = 2	LGSEQ=.FALSE.	RETURN200	IF (LINIT) GO TO 220	LINIT = .TRUE.	IF (NVAR.LT.2) THEN          IR=6          GOTO 290	ENDIF	XSCALE=KDEF(7,1)	YSCALE=KDEF(7,2)	ZSCALE=KDEF(7,3);	IW(1) = 6	                        !Number of characters inA	IW(2) = 6                               !X, Y, and title labels.
	IW(3) = 69        IW(4) = ILIST				!Previously set in XGDATA at top	IW(5) = LOUT    	IF (NVAR.LT.3) IW(3)=07	CALL XPLOT (1,KDEF(1,1),KDEF(1,2),KDEF(1,3),NW,IW,IER)220	CONTINUE>C-------Sequences lumped together and not first good sequence?%	IF (LUMPSQ.NE.0.AND.LGSEQ) GO TO 290
	LGSEQ=.TRUE.)	NP = 1						! new page flag; 0=same page$	IW(1)=0						! not a new curve type%	IW(3)=40					! length of curve title*	CALL XPLOT (2,IDUM,IDUM,MTITLE,NP,IW,IER)	IF(IER.NE.0) GOTO 80
290	RETURN300	K=0	DO 350 J=J1,J2<	IF (IA(J,KPTIME).LT.0) GO TO 350		!point failed constraints	    K=K+1					!no, save it.	    XX(K) = IA(J,1)/XSCALE	    YY(K) = IA(J,2)/YSCALE*	    IF (NVAR.GT.2) ZZ(K) = IA(J,3)/ZSCALE350	CONTINUE2	IF (K.GT.0) CALL XPLOT (3,XX, YY, ZZ, K, IW, IER)	IF(IER.NE.0) GOTO 80	RETURN400	CONTINUE				$C       Insert end of sequence code."C       Sequences lumped together?	IF (LUMPSQ.NE.0) GOTO 9			,	CALL XPLOT (4,IDUM,IDUM,IDUM,IDUM,IDUM,IER)	IF(IER.NE.0) GOTO 80	RETURN500	CONTINUEMC-------Final processing - skip if sequences already processed independently.,	CALL XPLOT (5,IDUM,IDUM,IDUM,IDUM,IDUM,IER)	IF(IER.NE.0) GOTO 80	RETURNC-------Xplot error section.80	WRITE(IOUT,81) IQ,IER481	FORMAT (' PLOT AT IQ=',I2,' GOT XPLOT ERROR=',I5)	IR=69	RETURN	END