c editOH 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 :> ). c This has to be changed for every family! 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 ----------------------------------------------------------------- parameter (n=23, m=12) real*8 w(n,m), a(n,m), g(n), g2(n), ghigh, gf, loggf integer i, j, deltaj character*4 des character*7 family, family2 open (unit = 100, file='/priv/magus4/bessell/OH/wave33.dat', & status='old',access='sequential') open (unit = 200, file='/priv/magus4/bessell/OH/a33.dat', & status='old',access='sequential') open (unit = 300, file='editOH.out33', & status='unknown') 1002 format (22(f4.1,3x,11(f7.2,4x),f7.2,/),f4.1,3x,11(f7.2,4x),f7.2) 2002 format (22(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(7a) 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,12) c write(6,*) g(2), w(2,1), w(2,2), w(2,3), w(2,12) 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 deltaj=9999 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" c write(6,*) w(i,j), deltaj, des ghigh=g(i)+deltaj write(300,3000) w(i,j), gf, loggf, g(i), ghigh, family, & des, "108" 3000 format(f7.2,2x,e11.5E2,2x,f10.6,2x,f4.1,2x,8x,2x,f4.1,2x, & a7,2x,a4,2x,a3) enddo enddo end