      program extapotau90
C..............................................................July 2023
C
C Select monthly Apo(tau6)max <=90 nT.
      CHARACTER*128 OUTFILE,INFHSS
	CHARACTER*2 AMN,ADY,AUT
C
      infhss='catapo6mn.txt'  ! Apo(tau6) monthly peak
	outfile='catapo6mn90.txt'  ! Apo(tau6) monthly peak <=90 nT
	    OPEN(10,FILE=INFHSS,action='READ')
	    OPEN(11,FILE=OUTFILE)
   28 format(1X,F8.3,1X,I3,3(1X,A2),1X,F5.0,1X,I3)
C
	       	nev=342 ! total Apo monthly peak	1995-2023.06
C
        nout=0
	DO 177 iev=1,nev
C
      read(10,28,end=27) xyear,lda1,AMN,ADY,AUT,aep
	if (aep.lt.90.) GOTO 177  ! check output
	nout=nout+1
	write(*,28) xyear,lda1,AMN,ADY,AUT,aep,nout
	write(11,28) xyear,lda1,AMN,ADY,AUT,aep,nout
  177	CONTINUE
  27  close(10)
      close(11)
	pause ' '
	STOP
	END
