        SUBROUTINE CORR1(IZ,SHR,IN,KDIM,KRC)

        REAL*8         SHH,SCX
        INTEGER        RHE1,RHE2
        REAL*8         SHR(KRC,*)
        INTEGER        IZ(KDIM,KDIM),I,J,KRC,IN

C
C       NORMALIZATION FACTOR SCX
C
        SCX=1.D0/DFLOAT(KDIM*KRC)
                          
        DO 1000 IIII=1,KDIM
        DO 1001 JJJJ=1,KRC

        SHH=0.D0

        DO 100 J=1,KRC
        RHE1=IZ(J,IIII)
        RHE2=IZ(J+JJJJ,IIII)
        RH1=(RHE1-RHE2)**2
        SHH=SHH+RH1*SCX

100     CONTINUE

        SHR(JJJJ,IN)=SHR(JJJJ,IN)+SHH

1001    CONTINUE
1000    CONTINUE

        RETURN
        END
