c editCHBX 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 c VARIABLES: c ---------- c w(i,k)=wavelength c A(i,k)=einstein coefficient c Jlo(n), Jloo(n)=lower J value from 'wave' and 'a' files respectively c (they should be the same) c Jhigh=Jlo(n)+deltaj of transition 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 B-X c family n c 00 22 c 11 13 c c c ---------------------------------------------------------------------- parameter (n=13, m=12) real*8 w(n,m), A(n,m), Jlo(n), Jloo(n), Jhigh, gf, loggf integer i, k, deltaj character*4 des character*7 family, family2 open (unit = 100, file='/priv/magus4/bessell/OH/chbxwave11.dat', & status='old',access='sequential') open (unit = 200, file='/priv/magus4/bessell/OH/chbxa11.dat', & status='old',access='sequential') open (unit = 300, file='editCHBX.out11', & status='unknown') 1002 format (12(f4.1,3x,11(f7.2,4x),f7.2,/),f4.1,3x,11(f7.2,4x),f7.2) 2002 format (12(f4.1,1x,11(e9.3,2x),e9.3,/),f4.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) (Jlo(i), (w(i,k), k=1,m), i=1,n ) c write(6,*) Jlo(1), w(1,1), w(1,2), w(1,3), w(1,12) c write(6,*) Jlo(2), w(2,1), w(2,2), w(2,3), w(2,12) c write(6,*) Jlo(3), w(3,1), w(3,2), w(3,3), w(3,12) c write(6,*) Jlo(40), w(40,12) c*****Read the einstein coefficient data (s-1) read(200,1000) read(200,1001) family2 read(200,2002) (Jloo(i), (A(i,k), k=1,m), i=1,n ) write(6,*) 'a bunch of zeros should appear - if not, & somethings wrong !' write(6,*) (Jloo(i)-Jlo(i), i=1,n) write(6,*) 'family check:', family, family2 c write(6,*) Jloo(1), A(1,1), A(1,2), A(1,3), A(1,12) c write(6,*) Jloo(2), A(2,1), A(2,2), A(2,3), A(2,12) c write(6,*) Jloo(3), A(3,1), A(3,2), A(3,3), A(3,12) c write(6,*) Jloo(40), A(40,12) c*****Write the required output do i=1,n do k=1,m if ((k.eq.1).or.(k.eq.2).or.(k.eq.7).or.(k.eq.11)) then deltaj=-1 else if ((k.eq.5).or.(k.eq.6).or.(k.eq.8).or.(k.eq.12)) then deltaj=1 else if((k.eq.3).or.(k.eq.4).or.(k.eq.9).or.(k.eq.10))then deltaj=0 else deltaj=9999 endif endif endif c write(6,*) w(i,k), deltaj c c gup = 2Jup+1 c gf=1.4992e-16*w(i,k)*w(i,k)*(2*(Jlo(i)+deltaj)+1)*A(i,k) c if (gf.ne.0) then loggf=log10(gf) else loggf=9.999999 endif c write(6,*) loggf, gf if(k.eq.1) des="PP11" if(k.eq.2) des="PP22" if(k.eq.3) des="QQ11" if(k.eq.4) des="QQ22" if(k.eq.5) des="RR22" if(k.eq.6) des="RR22" if(k.eq.7) des="OP12" if(k.eq.8) des="QR12" if(k.eq.9) des="PQ12" if(k.eq.10) des="RQ21" if(k.eq.11) des="QP21" if(k.eq.12) des="SR21" c write(6,*) w(i,k), deltaj, des Jhigh=Jlo(i)+deltaj write(300,3000) w(i,k),loggf, Jlo(i), Jhigh, " 106.00", & family, des 3000 format(2x,f9.4,f7.3,f5.1,12x,f5.1,12x,a9,a7,2x,a4) enddo enddo end