Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

averaging of output

Status
Not open for further replies.

lehloks

Programmer
Jul 12, 2013
40
ZA

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
 
I can't see the relationship between what you have posted and the problem you are describing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top