      program calzero381
C..........................................................Dec 2021
C calculate WUns = 0 from indices for 381 storms
C
      character*64 infile,infile1,infile2,infile3
	+,outfile
	     character*1 gns,gns3(3)
	integer  idat(381,72),ix(72)
	DATA gns3/'m','n','s'/
		COMMON /BL1/dati,RMED
	infile1='hsswu3dx.txt' !1
	infile2='hsswl3dx.txt' !2
	infile3='hsswe3dx.txt' !3
	outfile='calzero381.res'
	OPEN(10,file=outfile,access='APPEND')
C
        igns=1
  17        select case(igns)
	case (1)
   1	infile=infile1
	goto 24
	case (2)
   2	infile=infile2
	goto 24
	case (3)
   3	infile=infile3
	goto 24
	case (4)
    5	 GOTO 222 ! stop
	end select
C
C
   24	DO 42 inp=1,3
      gns=gns3(inp)
	infile(8:8)=gns
C
   25	OPEN(11,file=infile,action='READ')
	DO ll=1,381	   !+++++++++
	read(11,*,end=44) ix
	do k=1,72
	idat(ll,k)=ix(k)
	enddo
	ENDDO		  !+++++++++
   44	close(unit=11)
   30	format(72(1X,F5.0))
   31	format(4(1X,I4))
   32	format(1X,A1,I1,A16)
	icnt1=0
	icnt2=0
	icnt3=0
      DO nn=1,381
	do k=1,24
	if (idat(nn,k).eq.0) then
	icnt1=icnt1+1
	endif
	enddo
	do k=25,48
	if (idat(nn,k).eq.0) then
	icnt2=icnt2+1
	endif
	enddo
		do k=49,72
 	if (idat(nn,k).eq.0) then
	icnt3=icnt3+1
	endif
	enddo
	ENDDO
	icntot=icnt1+icnt2+icnt3
	 per1=icnt1/91.44
	per2=icnt2/91.44
	per3=icnt3/91.44
	per=icntot/274.32
	write(*,32) gns,inp,infile
	write(10,32) gns,inp,infile
C	write(*,31)	icnt1,icnt2,icnt3,icntot
C	write(10,31) icnt1,icnt2,icnt3,icntot
	write(*,33) per1,per2,per3,per	
	write(10,33)  per1,per2,per3,per
   42	CONTINUE
   33	format(4(1X,F6.2))
      igns=igns+1
	if (igns.lt.4) goto 17
   43 CONTINUE
  222	close(unit=10)
       pause ' '
	STOP
	END