ADAS Subroutine b3reac
SUBROUTINE B3REAC( NDTRN , NDTEM , IZDIMD, & IZMAX , Z1A , & ITRAN , & NVA , SCEFA , & I1A , I2A , N1A , N2A , W1A , W2A, & IEC1A , IAC1A , IAC2A , FAC2A , IGC1A , FGC2A, & CTSTRA, WDEA , AVALA , SCOMA , & IZS , IZ0 , ISTRN , LIBPT , & MAXT , TEA , & WDE , AVAL , SCOM & ) C C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: B3REAC ********************* C C PURPOSE: TO INTERPOLATE DATA FOR A SINGLE TRANSITION FROM A C GENERAL Z EXCITATION FILE TO A SELECTED SEQUENCE MEMBER C C CALLING PROGRAM: ADAS203 C C DATA: C C THE UNITS USED IN THE DATA FILE ARE TAKEN AS FOLLOWS: C C IONISATION POTENTIAL: WAVE NUMBER (CM-1) C INDEX LEVEL ENERGIES: WAVE NUMBER (CM-1) C TEMPERATURES : KELVIN C A-VALUES : SEC-1 C GAMMA-VALUES : C C C SUBROUTINE: C C INPUT : (I*4) NDTRN = MAX. NUMBER OF TRANSITIONS THAT CAN BE READ C INPUT : (I*4) NDTEM = MAX NUMBER OF INPUT FILE TEMPS. C INPUT : (I*4) IZDIMD = MAX. NUMBER OF SEQUENCE MEMBERS ALLOWED C C INPUT : (I*4) IZMAX = NO. OF SEQUENCE MEMBERS IN GENERAL Z FILE C INPUT : (R*8) Z1A() = ION CHARGE +1 FOR SEQUENCE MEBERS IN C GENERAL Z FILE C 1ST DIMENSION - SEQUENCE MEMBER INDEX C C INPUT : (I*4) ITRAN = INPUT DATA FILE: NUMBER OF ELECTRON IMPACT C C C INPUT : (I*4) NVA() = INPUT DATA FILE: NUMBER OF GAMMA/TEMPERATURE C PAIRS FOR A GIVEN TRANSITION. C 1ST DIMENSION - SEQUENCE MEMBER INDEX C INPUT : (R*8) SCEFA(,)= INPUT DATA FILE: Z-SCALED ELEC. TEMPS.(K) C 1ST DIMENSION - TEMPERATURE 'SCEF()' C 2ND DIMENSION - TRANSITION NUMBER C TRANSITIONS. C C C INPUT : (I*4) I1A() = ELECTRON IMPACT TRANSITION: C LOWER ENERGY LEVEL INDEX C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) I2A() = ELECTRON IMPACT TRANSITION: C UPPER ENERGY LEVEL INDEX C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) N1A() = ELECTRON IMPACT TRANSITION: C LOWER LEVEL PRINCIPAL QUANTUM NUMBER C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) N2A() = ELECTRON IMPACT TRANSITION: C UPPER LEVEL PRINCIPAL QUANTUM NUMBER C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) W1A() = ELECTRON IMPACT TRANSITION: C LOWER LEVEL STATISTICAL WEIGHT C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) W2A() = ELECTRON IMPACT TRANSITION: C UPPER LEVEL STATISTICAL WEIGHT C 1ST DIMENSION - TRANSITION NUMBER C C INPUT : (I*4) IEC1A() = TRANSITION ENERGY INTERPOLATION VARIABLE C (1=>Z1 ; 2=>1/Z1) C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) IAC1A() = TRANSITION PROB. INTERPOLATION VARIABLE C (1=>Z1 ; 2=> 1/Z1) C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) IAC2A() = TRANSITION TYPE C (1=>DIPOLE, 2=>NON-DIPOLE, 3=>SPIN CHANGE, C 4=>OTHER) C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) FAC2A() = TRANSITION PROB. Z1 SCALING POWER C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) IGC1A() = UPSILON INTERPOLATION VARIABLE C (1=>Z1 ; 2=> 1/Z1) C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (I*4) FGC2A() = UPSILON Z1 SCALING POWER C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (C*18) CTSTRA()= TRANSITION DESCRIPTOR C 1ST DIMENSION - TRANSITION NUMBER C INPUT : (R*8) WDEA() = TRANSITION ENERGY (CM-1) C 1ST DIMENSION - TRANSITION NUMBER C C INPUT : (R*8) AVALA() = ELECTRON IMPACT TRANSITION: C A-VALUES (SEC-1) C 1ST DIMENSION - TRANSITION NUMBER C 2ND DIMENSION - SEQUENCE MEMBER INDEX C INPUT : (R*8) SCOMA(,,)=ELECTRON IMPACT TRANSITION: C GAMMA VALUES C 1ST DIMENSION - TEMPERATURE 'SCEF()' C 2ND DIMENSION - TRANSITION NUMBER C 3RD DIMENSION - SEQUENCE MEMBER INDEX C C INPUT : (I*8) MAXT = NUMBER OF OUTPUT TEMPERATURES C INPUT : (R*8) TEA() = OUTPUT TEMPERATURES (K) C C OUTPUT: (R*8) WDE() = ENERGY OF TRANSITIONS (CM-1) C 1ST DIMENSION - TRANSITION NUMBER C OUTPUT: (R*8) AVAL() = A-VALUE OF TRANSITIONS (SEC-1) C 1ST DIMENSION - TRANSITION NUMBER C OUTPUT: (R*8) SCOM(,) = SELECTED TRANSITION GAMMA VALUES: C GAMMA VALUES C 1ST DIMENSION - OUTPUT TEMPERATURE C 2ND DIMENSION - TRANSITION NUMBER C C C (I*4) I = GENERAL USE. C (I*4) J = GENERAL USE. C (I*4) J1 = INPUT DATA FILE - SELECTED TRANSITION: C LOWER ENERGY LEVEL INDEX (CASE ' ' & 'P') C (I*4) J2 = INPUT DATA FILE - SELECTED TRANSITION: C UPPER ENERGY LEVEL INDEX (CASE ' ' & 'P') C CAPTURING LEVEL INDEX (CASE 'H' & 'R') C C (R*8) AVALM = INPUT DATA FILE - SELECTED TRANSITION: C MANTISSA OF: ('IAPOW' => EXPONENT) C A-VALUE (SEC-1) (CASE ' ') C NEUTRAL BEAM ENERGY (CASE 'H') C NOT USED (CASE 'P' & 'R') C C (R*8) EIJMOD = MODULUS OF EIJ C C (C*80) CLINE = CURRENT ENERGY LEVEL INDEX PARAMETER LINE C C (L*4) LDATA = IDENTIFIES WHETHER THE END OF AN INPUT C SECTION IN THE DATA SET HAS BEEN LOCATED. C (.TRUE. => END OF SECTION REACHED) C C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------ C B2SORT ADAS PERFORMS BUBBLE SORT OF 2 REAL ARRAYS C C AUTHOR: H. P. SUMMERS, JET C K1/1/57 C JET EXT. 4941 C C DATE: 17/08/94 C C UNIX-IDL PORT: C C VERSION: 1.1 DATE: 06-03-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - PUT UNDER S.C.C.S. CONTROL C C VERSION: 1.2 DATE: 06-03-96 C MODIFIED: TIM HAMMOND C - REPLACED CALLS TO NSORT ROUTINE WITH CALLS TO B2SORT. C NSORT IS USED TO SORT A REAL ARRAY AND ASSOCIATED C INTEGER ARRAY WHEREAS WHAT WAS BEING PASSED TO IT WAS C A REAL ARRAY AND ANOTHER, ASSOCIATED REAL ARRAY. B2SORT C TAKES 2 REAL ARRAYS AS INPUT AND PERFORMS A BUBBLE SORT C ON THEM. C C VERSION: 1.3 DATE: 01-04-96 C MODIFIED: TIM HAMMOND C - REMOVED SUPERFLUOUS VARIABLES C C VERSION: 1.4 DATE: 01-04-96 C MODIFIED: TIM HAMMOND C - CORRECTED MINOR SYNTAX ERROR C C VERSION: 1.5 DATE: 23-05-96 C MODIFIED: WILLIAM OSBORN + HUGH SUMMERS C - REPLACED EIJ BY MOD(EIJ) IN DETERMINING LINE STRENGTHS C AND UPSILON FIT C C VERSION: 1.6 DATE: 11-04-07 C MODIFIED: ALLAN WHITEFORD C - RENAMED SOLVE SUBROUTINE TO B3SOLV. C C C VERSION: 1.6 DATE: 23-04-07 C MODIFIED: ALLAN WHITEFORD C - RENAMED FORM SUBROUTINE TO B3FORM. C - RENAMED FORM2 SUBROUTINE TO B3FORM2. C C----------------------------------------------------------------------- CHARACTER*18 CTSTRA(NDTRN) INTEGER I1A(NDTRN), I2A(NDTRN), IAC1A(NDTRN) INTEGER IAC2A(NDTRN), IEC1A(NDTRN) INTEGER IGC1A(NDTRN), ISTRN, ITRAN INTEGER IZ0, IZDIMD, IZMAX, IZS INTEGER MAXT, N1A(NDTRN), N2A(NDTRN), NDTEM INTEGER NDTRN, NVA(NDTRN) LOGICAL LIBPT REAL*8 AVAL(NDTRN), AVALA(NDTRN,IZDIMD) REAL*8 FAC2A(NDTRN), FGC2A(NDTRN) REAL*8 SCEFA(NDTEM,NDTRN), SCOM(NDTEM,NDTRN) REAL*8 SCOMA(NDTEM,NDTRN,IZDIMD) REAL*8 TEA(NDTEM), W1A(NDTRN), W2A(NDTRN) REAL*8 WDE(NDTRN), WDEA(NDTRN,IZDIMD) REAL*8 Z1A(IZDIMD)