      SUBROUTINE CONVRT(DATA,NDIM,N,DXMIN,DXMAX,DYMIN,DYMAX,
     *          XMIN,XMAX,YMIN,YMAX)
C     THIS SUBROUTINE CONVERTS DATA FROM INPUT UNITS TO UNITS SCALED TO
C     FIT WITHIN THE INDICES OF THE Z-ARRAY
C
C
      DIMENSION DATA(NDIM,3)
      CEI=(XMAX-XMIN)/(DXMAX-DXMIN)
      CEJ=(YMAX-YMIN)/(DYMAX-DYMIN)
      DO 1 I=1,N
      DATA(I,1)=CEI*(DATA(I,1)-DXMIN)+XMIN
      DATA(I,2)=CEJ*(DATA(I,2)-DYMIN)+YMIN
    1 CONTINUE
      RETURN
      END
