      SUBROUTINE WATER_TRANSFER1(ROWS,COLS,FLINDI,FLINDJ,RUNOFF)

      ! THIS SUBROUTINE TRANFERS RUNOFF WATER FROM EVERY CELL TO ITS
      ! CORRESPONDING DESTINATION CELL

      ! DESCRIPTION OF VARIABLES:

      ! FLINDI: STORES COLUMN COORDINATE OF THE DESTINATION CELL.
      ! REMAINS UNMODIFIED IN THIS SUBROUTINE

      ! FLINDJ: STORES ROW COORDINATE OF THE DESTINATION CELL.
      ! REMAINS UNMODIFIED IN THIS SUBROUTINE

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

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

      IMPLICIT NONE

      INTEGER :: ROWS,COLS,FLINDI(COLS,ROWS),FLINDJ(COLS,ROWS),I,J,A,B
     &,NTHREADS,OMP_GET_MAX_THREADS,OMP_GET_THREAD_NUM,CHUNK
     &,ISTART,IEND,TID

      DOUBLE PRECISION :: RUNOFF(COLS,ROWS),SS,
     &RUNOFF2(COLS,ROWS)

      ! TRANSFERRING WATER FROM SOURCE TO SINK CELLS

      ISTART=1
      IEND=COLS
      RUNOFF2=0.

      DO 100 I=2,COLS-1
      DO 200 J=2,ROWS-1
      
      IF ((FLINDI(I,J).GT.0).AND.(FLINDJ(I,J).GT.0)) THEN
              A=FLINDI(I,J)
              B=FLINDJ(I,J)
              SS=RUNOFF(I,J)             
              RUNOFF2(A,B)=RUNOFF2(A,B)+RUNOFF(I,J) ! TRANSFER OF RUNOFF
      END IF      
200   CONTINUE
100   CONTINUE

      RUNOFF=RUNOFF2
      RUNOFF2=RUNOFF2-RUNOFF2

      RETURN

      END SUBROUTINE WATER_TRANSFER1
