c c this is an example program to compute the Boltzman ratio for c neutral hydrogen from the n=2 to the n=1 excitation level and the c n=3 to n=1 level c PROGRAM example implicit none integer i double precision m,ratio include 'example.com' temp = 1.e4 DO 11 i=1,3 m = float(i) g(i) = 2.0*m**2 chi(i) = 13.6*(1.0-1.0/m**2) WRITE(6,600) i,g(i),chi(i) 11 CONTINUE OPEN(unit=1,file='example.dat') WRITE(1,601) DO 15 i=2,3 CALL boltzman(i,ratio) WRITE(1,602) temp,i,ratio 15 CONTINUE CLOSE(unit=1) 600 FORMAT(1x,i3,1x,f8.2,1x,f7.3) 601 FORMAT(4x,'Temp, K',3x,'i',3x,'n(i)/n(1)') 602 FORMAT(1x,f10.1,1x,i3,1x,1pe11.3) STOP END c ........................................................... c this is the subroutine that computes the boltzman equation c on return, R has the desired value SUBROUTINE boltzman(i,r) implicit none integer i double precision r,theta include 'example.com' theta = 5040./temp r = (g(i)/g(1)) * 10**(-theta*chi(i)) RETURN END c ...........................................................