       PROGRAM QBO_RW
       IMPLICIT NONE
       CHARACTER*1 AA
       INTEGER IANDEB,IANFIN,IAN
       INTEGER IH,IM,IMONTH
       PARAMETER (IANDEB=1953,IANFIN=2000,IMONTH=12)
       REAL YEAR,QBO(0:IMONTH+1)
       INTEGER INDEX

       OPEN(10,file='../input/qbo_53_01.txt',form='formatted')
       OPEN(11,file='../out_qbo/qbo_53_00.dat',form='formatted')

       do ih=1,4
       read(10,*)AA
       print *,AA
       enddo


       index=0
       do ian=IANDEB,IANFIN
       read(10,*)YEAR,(QBO(IM),IM=1,IMONTH)
       do IM=1,IMONTH
          index=index+1
          write(11,110)YEAR+FLOAT(IM-1)/FLOAT(IMONTH),QBO(IM)
       enddo
       enddo

 110   format(f9.4,1x,f10.4)
       stop
       end


