
      PROGRAM TESTIT
        PARAMETER (M=100,N=100,LRWK=2000,LIWK=1000)
        DIMENSION TT(M,N),RWRK(LRWK),IWRK(LIWK)
        CALL OPNGKS
        DO 102 I=1,M
          DO 101 J=1,N
            TT(I,J)=REAL(I+J-2)/REAL(M+N-2)
  101     CONTINUE
  102   CONTINUE
        nct=20                      ! number of contours
        cmn=0.0                     ! field minimum contour
        cmx=1.0                     ! field maximum contour
        cnt=(cmx-cmn)/float(nct-1)  ! contour interval
        xm=float(m)
C
        CALL SET (0.,1.,0.,1.,-XM,+XM,-XM,+XM,1)
C
C       call cpsetr ('VPL - VIEWPORT LEFT'  ,0.0)  !  commmented out
C       call cpsetr ('VPR - VIEWPORT RIGHT' ,1.0)  !  commmented out
C       call cpsetr ('VPB - VIEWPORT BOTTOM',0.0)  !  commmented out
C       call cpsetr ('VPT - VIEWPORT TOP'   ,1.0)  !  commmented out
C
        call cpsetr ('T2D - TENSION ON 2D SPLINES',0.)
        call cpseti ('LLP - LINE LABEL POSITIONING',3)
C
        call cpseti ('CLS - CONTOUR LEVEL SELECTION',nct)
        call cpsetr ('CMN - min',cmn)
        call cpsetr ('CMX - max',cmx)
        call cpsetr ('CIS - interval',cnt)
C
        call cpseti ('MAP - mapping',2)
        call cpsetr ('XC1 - minimum r'    ,  0.)
        call cpsetr ('XCM - maximum r'    , xm)
        call cpsetr ('YC1 - minimum angle',  0.)
        call cpsetr ('YCN - maximum angle',360.)
C
        call cpsetr ('ORV - outofrange val',1.e12)
        call cpseti ('SET - turn off set',0)
C
        call cprect (tt,m,m,n,rwrk,lrwk,iwrk,LIWK)  !  lrwk => LIWK
        call cpcldr (tt,rwrk,iwrk)
C
        call frame
C
        CALL CLSGKS
C
        STOP
C
      END

