!----------------------------------------------------------------------------------!
Subroutine Read_ENSO_Phase 
Integer :: iyr, imon, year, IO, it
Character (Len=50) :: Fname
Integer :: X(Nmon)

!----------------------------------------------------------------------------

   Fname="/home/tanpv/Nafosted/Data/ClimIDX/ENSO_Years.txt"
   Open(1, file=trim(Fname), Status="Old")
   read(1,*)         ! Bo dong dau
   it=0
   Do
      read(1,*,IOStat=IO) year, (X(imon),imon=1,Nmon)
      if (IO /= 0) exit
      Do iyr=Yr1, Yr2
         if (year==iyr) then 
            YY(iyr-Yr1+1) = iyr 
            Do imon=1, Nmon
               it=it+1
               ENSO(it)=X(imon) 
            Enddo
         endif
      Enddo
   Enddo
   Close (1)
End Subroutine Read_ENSO_Phase 
!-----------------------------------------------------------------------

