c	program windy
c	named in honour of jan and feb 1977 spent in the windy city
	include '/u1/gcf/e350/crystal/cb/irspec'
c
	include '/u1/gcf/e350/crystal/cb/abssiz'
c
	include '/u1/gcf/e350/crystal/cb/wenbin'
c
	include '/u1/gcf/e350/crystal/cb/hotsun'
c
	include '/u1/gcf/e350/crystal/cb/datbin'
c
	include '/u1/gcf/e350/crystal/cb/beam'
c
	include '/u1/gcf/e350/crystal/cb/norm'
	include '/u1/gcf/e350/crystal/cb/parms'
c
c
	external confit
c
	call init
	nent=ntrdis
	do 9 i=1,ntrdis
	if (mt(i)) nent=nent+1
9	continue
	call redset(3,nent)
        close(3)
        open(2,file='CACTUS',access='sequential',form='formatted')
        rewind(2)
	timmax=14.
	endres=0
1	call ice
	moint=1
	if (cross) goto 6
	if (.not.dofit) goto 5
	call setpar
	if (endres.eq.3) stop
	maxit=25
	dellim=.1
	do 3 i=1,notrig
3	call wgtint(0.,de(i),moint,val1(1,i),wgt1(1,i))
	nointr=8
	noinfx=1
	irspec=jrspec
	call manxct(confit)
	if (.not.quick) goto 2
	call prtpar(.true.)
5	call oohist
10	if(endres.eq.3) stop
c	make up zeta plot file if desired
	call flake
	goto 1
6	call drizle
	call oohist
	call flake
	goto 1
2	call prtpar(.false.)
	if (endres.eq.3) stop
	maxit=15
	moint=3
	do 4 i=1,notrig
4	call wgtint(0.,de(i),moint,val1(1,i),wgt1(1,i))
	nointr=16
	noinfx=2
	nobeam=3
	if (.not.fitbem) call bemset
	dellim=.1
	timmax=40.
	if (nfs) timmax=100.
	call manxct(confit)
	call prtpar(.true.)
	call oohist
c	set up zeta plot file if desired
	if (endres.eq.3) stop
	call flake
	goto 1
c
	end
