c editCHAX c ====== c program for rearranging the data output by the f-value generating c program. c ----------------------------------------------------------------- c The names of the input programs and parameter n (number of lines c of data) may need to be changed for the specific input file used. c If parameter n is changed, the first number in formats 1002, 2002 c should also be changed to n-1 (sorry :> poss not needed). c c VARIABLES: c ---------- c w(i,j)=wavelength c a(i,j)=einstein coefficient c g(n), g2(n)=lower g value from 'wave' and 'a' files respectively c (they should be the same) c ghigh=g(n)+jvalue of line (deltaj) c gf=gf value (calculated in this program), loggf=log10(gf) c des=level designation (eg P1) c family, family2=which family the line comes from (eg 0=0) c (they should be the same) c ----------------------------------------------------------------- c CH A-X m=24 c family n format c 00 58 c 11 52 c 22 46 c 33 40 c c _____________________________________________________________ parameter (n=58, m=24) real*8 w(n,m), a(n,m), g(n), g2(n), ghigh, gf, loggf integer i, j, deltaj character*5 des character*10 family, family2 open (unit = 100, file='/priv/magus4/bessell/OH/chaxwave00.dat', & status='old',access='sequential') open (unit = 200, file='/priv/magus4/bessell/OH/chaxa00.dat', & status='old',access='sequential') open (unit = 300, file='editCHAX.out00', & status='unknown') 1002 format(57(f4.1,3x,23(f7.2,4x),f7.2,/),f4.1,3x,23(f7.2,4x),f7.2) 2002 format(57(f4.1,1x,23(e9.3,2x),e9.3,/),e4.1,1x,23(e9.3,2x),e9.3) c 1002 format(30(f4.1,3x,11(f7.2,4x),f7.2,/),f4.1,3x,11(f7.2,4x),f7.2) c 2002 format(30(f4.1,1x,11(e9.3,2x),e9.3,/),e4.1,1x,11(e9.3,2x),e9.3) c*****Read the wavelength data (wavelengths in Angstroms) read(100,1000) 1000 format(///) read(100,1001) family 1001 format(10a) read(100,1002) (g(i), (w(i,j), j=1,m), i=1,n ) c write(6,*) g(1), w(1,1), w(1,2), w(1,3), w(1,4) c write(6,*) w(1,5), w(1,6), w(1,7), w(1,8), w(1,9) c write(6,*) w(1,10), w(1,11), w(1,12), w(1,13), w(1,14) c write(6,*) w(1,15), w(1,16), w(1,17), w(1,18), w(1,19) c write(6,*) w(1,20), w(1,21), w(1,22), w(1,23), w(1,24) c write(6,*) g(2), w(2,1), w(2,2), w(2,3), w(2,12), w(2,24) c write(6,*) g(3), w(3,1), w(3,2), w(3,3), w(3,12) c write(6,*) g(40), w(40,12) c*****Read the einstein coefficient data (s-1) read(200,1000) read(200,1001) family2 read(200,2002) (g2(i), (a(i,j), j=1,m), i=1,n ) write(6,*) 'a bunch of zeros should appear - if not, & sthngs wrong !' write(6,*) (g2(i)-g(i), i=1,n) write(6,*) 'family check:', family, family2 c write(6,*) g2(1), a(1,1), a(1,2), a(1,3), a(1,12) c write(6,*) g2(2), a(2,1), a(2,2), a(2,3), a(2,12) c write(6,*) g2(3), a(3,1), a(3,2), a(3,3), a(3,12) c write(6,*) g2(40), a(40,12) c*****Write the required output do i=1,n do j=1,m if ((j.eq.1).or.(j.eq.2).or.(j.eq.7).or.(j.eq.11)) then deltaj=-1 else if ((j.eq.5).or.(j.eq.6).or.(j.eq.8).or.(j.eq.12)) then deltaj=1 else if((j.eq.3).or.(j.eq.4).or.(j.eq.9).or.(j.eq.10))then deltaj=0 else if ((j.eq.13).or.(j.eq.14).or.(j.eq.19).or.(j.eq.23)) then deltaj=-1 else if ((j.eq.17).or.(j.eq.18).or.(j.eq.20).or.(j.eq.24)) then deltaj=1 else if((j.eq.15).or.(j.eq.16).or.(j.eq.21).or.(j.eq.22))then deltaj=0 else deltaj=9999 endif endif endif endif endif endif c write(6,*) w(i,j), deltaj gf=1.499e-16*w(i,j)*w(i,j)*(g(i)+deltaj)*a(i,j) if (gf.ne.0) then loggf=log10(gf) else loggf=9.999999 endif c write(6,*) loggf, gf if(j.eq.1) des="P1" if(j.eq.2) des="P2" if(j.eq.3) des="Q1" if(j.eq.4) des="Q2" if(j.eq.5) des="R2" if(j.eq.6) des="R2" if(j.eq.7) des="QP12" if(j.eq.8) des="QR12" if(j.eq.9) des="PQ12" if(j.eq.10) des="RQ21" if(j.eq.11) des="QP21" if(j.eq.12) des="SR21" if(j.eq.13) des="P1d" if(j.eq.14) des="P2d" if(j.eq.15) des="Q1d" if(j.eq.16) des="Q2d" if(j.eq.17) des="R2d" if(j.eq.18) des="R2d" if(j.eq.19) des="QP12d" if(j.eq.20) des="QR12d" if(j.eq.21) des="PQ12d" if(j.eq.22) des="RQ21d" if(j.eq.23) des="QP21d" if(j.eq.24) des="SR21d" c write(6,*) w(i,j), deltaj, des ghigh=g(i)+deltaj c write(300,3000) w(i,j), gf, loggf, g(i), ghigh, family, c & des, "108" write(300,3000) w(i,j), gf, loggf, g(i), ghigh, family, & des, "106" 3000 format(f7.2,2x,e11.5E2,2x,f10.6,2x,f4.1,2x,8x,2x,f4.1,2x, & a7,2x,a5,1x,a3) enddo enddo end