      subroutine subsolphase(ASTR,FI)
C........................................................Oct 2019
C
C SolPhase for Pch-peaks and DelPch > 0. monthly 
C
	dimension RMIN(8),RMAX(8)
	character*2 AYR
	character*4 AYEAR
	DATA RMIN/1944.2,1954.3,1964.9,1976.5,1986.8,1996.9,2008.9,2019.9/
	DATA RMAX/1937.4,1947.5,1957.9,1968.9,1979.9,1989.6,2000.3,2014.5/
C
C Cycle on years : 2011/03-2018/12
C
      iyyyy=2010
	do 150 KK=1,8 ! 2011-2019
      iyyyy=iyyyy+1
		zyear=float(iyyyy)
		if(int(zyear/4.)*4.eq.iyyyy) THEN 
	dnr=366.
	                          ELSE
	dnr=365.
	ENDIF
	del=1./dnr
	call blet4(iyyyy,AYEAR)
	AYR=AYEAR(3:4)
	read(ayr,*) ryr
	iyr=int(ryr)
    1 CONTINUE 
C Select Sol Phase boundaries
	do j=1,8
	if ((ASTR.le.RMIN(j)).and.(ASTR.ge.RMAX(j))) then
	AMIN=RMIN(j)
	AMAX=RMAX(j)
	goto 149
	endif
	enddo
	do j=1,7
	if ((ASTR.ge.RMIN(j)).and.(ASTR.le.RMAX(j+1))) then
	amin=RMIN(j)
	amax=rmax(j+1)
	exit
	endif
	enddo
C end select
  149     FI=(ASTR-AMIN)/abs(AMAX-AMIN)
      goto 151
C
 150	CONTINUE					   ! end cycle on year
C	pause ' '
  151    RETURN
	end