I have this code, which I read into it some input and ouput, now I want to average indivivually tbo1,tbo2,tbo3 and tbo4.My problem I dont seem to be getting it right,I thing Im getting it wrong in the write statment,I aslo want to write the output to be in colums and with heading tbo1, tbo2,tbo3, tbo4 with their output underneat.I thought of declaring the parameter input to be say 1000, then from there I can divide the sum of tbo1 to tbo4 by this parameter, correct me if im wrong?
Code:
if ((atmname(i) == oxygen) .and. (cnlist(i) == 3)) then
select case ( id(blist(bindex(i))) + id(blist(bindex(i)+1)) + &
id(blist(bindex(i)+2)) )
case (6)
write(logfile,*)'[Si,Si,Si] three-bridged oxygen'
ntbo1 = ntbo1 + 1
case (7)
write(logfile,*)'[Si,Si,Al] three-bridged oxygen'
ntbo2 = ntbo2 + 1
case (8)
write(logfile,*)'[Si,Al,Al] three-bridged oxygen'
ntbo3 = ntbo3 + 1
case (9)
write(logfile,*)'[Al,Al,Al] three-bridged oxygen'
ntbo4 = ntbo4 + 1
end select
endif