      SUBROUTINE RUNOFF_DIST1(RUNOFF,MARKY,PP,QQ,K1,K2,K3,K4,ROWS,COLS)

      ! THIS SUBROUTINE REDISTRIBUTES THE LAKE SURFACE RUNOFF OVER ALL
      ! THE LAKE PIXELS, EQUALLY

      ! DESCRIPTION OF VARIABLES:

      ! PP,QQ: STORES THE COORDINATES OF LAKE NUCLEUS. REMAINS
      ! UNMODIFIED IN THIS SUBROUTINE

      ! K1,K2,K3,K4: STORES THE EXTENT OF THE LAKE. REMAINS UNMODIFIED
      ! IN THIS SUBROUTINE

      ! ROWS,COLS: ROWS AND COLUMNS OF THE STUDY AREA. REMAINS
      ! UNMODIFIED IN THIS SUBROUTINE

      ! MARKY: STORES A LKE. SHOWS 1 FOR LAKE CELLS AND 0 FOR NON-LAKE
      ! CELLS. REMAINS UNMODIFIED IN THIS SUBROUTINE

      ! RUNOFF: CONTAINS RUNOFF MELTWATER (IN METERS) FOR EVERY GRID
      ! CELL. GETS MODIFIED IN THIS SUBROUTINE

      IMPLICIT NONE

      INTEGER :: PP,QQ,K1,K2,K3,K4,ROWS,COLS,MARKY(COLS,ROWS),I,J

      DOUBLE PRECISION :: RUNOFF(COLS,ROWS),SUMR

      SUMR=0

      ! ESTIMATING TOTAL RUNOFF PRESENT ON THE LAKE

      SUMR=SUM(RUNOFF,MASK=MARKY.EQ.1)

      ! REDISTRIBUTING THE RUNOFF EQUALLY AMONG THE LAKE PIXELS

      DO 110 I=PP-K1,PP+K2
      DO 210 J=QQ-K3,QQ+K4

      IF (MARKY(I,J).EQ.1) THEN
              RUNOFF(I,J)=SUMR/SUM(MARKY,MASK=MARKY.EQ.1)
      END IF

210   CONTINUE
110   CONTINUE

      RETURN

      END SUBROUTINE RUNOFF_DIST1

