      program extdstmin0
C.................................................July 2022
C Extract peak of Dst storms at SSN2=0 1995-2022
C
	CHARACTER*45 INFILE
	CHARACTER*25 OUTFILE
	CHARACTER*2 AMN,ADY
	infile='dststorms.dat'   ! dstmin
	outfile='dststorm0.dat'
C
	OPEN(10,file=infile,action='READ')
      OPEN(12,file=outfile)
C
  170	FORMAT(1X,I4,19X,2I2,2(1X,I2),1X,I4)
  171	FORMAT(1X,F8.3,2(1X,A2),1X,I2,2(1X,I4))
  172	FORMAT(1X,F8.3,2(1X,A2),1X,I2,3(1X,I4))
C
       nout=0
       DO 101 iev=1,525
	read(10,172,end=50) ryear,AMN,ADY,iut,IDST,issn,nn
	iyear=int(ryear)
C
	 if (issn.eq.0) THEN
	nout=nout+1
      write(*,171) ryear,AMN,ADY,iut,IDST,nout
	write(12,171) ryear,AMN,ADY,iut,IDST,nout
	  ENDIF
  101	CONTINUE
  50  close(10)
      close(12)
	pause ' '
	STOP
	END
