	program read_yearly_Precipitation_data
	implicit none
	real, parameter :: minlon=73.25 !minimum longitude
	real, parameter :: minlat=19.75 !minimum latitude
	real, parameter :: Scalef=0.1 !Scale factor Change Units to mm
	real :: prep(126,69,366)
	character :: cyear*4
	integer :: year
	real :: lon(126) !store the longitude for the grid points
	real :: lat(69)  !store the latitude for the grid points
	integer :: ndays !nnumber of days for the selected year
	integer :: i,i1,i2
	!
	write(*,*) 'Please imput the year you are interested with:'
	read(*,*) year
	write(cyear,'(i4)') year
	if(mod(year,4)==0) then
	    ndays=366 ! for leap year
	  else
	    ndays=365 !for non-leapyear
	  end if
	! longitude for each grid
	do i=1,126
	  lon(i)=minlon+(i-1)*0.5
	end do
	! latitude for each grid
	do i=1,69
	  lat(i)=minlat+(i-1)*0.5
	end do
	!
	open(2,file='prep'//cyear//'.dat')
	do i=1,ndays
	  read(2,*) ((prep(i1,i2,i),i1=1,126),i2=1,69)
	end do
	close(2)
	prep=prep*Scalef
	write(*,*) prep
	end program read_yearly_Precipitation_data
	
	