      program dstmincnt
C...............................................Jan. 2019
C
C Count intense Dst<=-100 nt for 1994-2018
C
	character*50 infile,outfile
      character*2 AMN,ADY,AUT
C
	infile='dstmin.txt'		   !
	outfile='dstmin2.txt'	 ! 
	OPEN(10,file=infile,action='READ')
	OPEN(11,file=outfile,access='APPEND')
   30 format(21X,I2,3(1X,I2),1X,F4.1)
   31 format(3X,I2,5X,I2,2(1X,I2),1X,F4.1)
   32 format(1X,F8.3,3(1X,A2),1X,F5.0,1X,I4)
C
      nn=0
	n100=0
		n200=0
		n300=0
      DO 49 i=1,1634
C	read(10,*) txt
	read(10,32,end=50) xyear,amn,ady,aut,dst,ks
	iyear=int(xyear)
	if (iyear.lt.1994) goto 49
	if ((dst.le.-100.).and.(dst.gt.-200.)) n100=n100+1
	if ((dst.le.-200.).and.(dst.gt.-300.)) n200=n200+1
	if ((dst.le.-300.).and.(dst.gt.-400.)) n300=n300+1
	nn=nn+1
	write(*,32) xyear,amn,ady,aut,dst,nn
Crem	write(11,32) xyear,amn,ady,aut,dst,nn
   49	continue
   50 close(unit=10)
      write(*,33) n100,n200,n300
	write(11,33) n100,n200,n300
C		  
C
C    
   45  close(unit=11)
   33 format(1X,'Dst < -100 :',I4,1X,'Dst < -200 :',I4,1X,
     +'Dst < -300 :',I4)
      pause ' '
	STOP
	END