ADAS Subroutine bnqctb
SUBROUTINE BNQCTB(Z0,Z1,NMIN,NMAX,IMAX,NREP,NBEAM,BMENA,BMFRA, & CXMEMB,IBLOCK,QTHREP,ALPHA) C IMPLICIT REAL*8(A-H,O-Z) C C----------------------------------------------------------------------- C C ****************** FORTRAN77 SUBROUTINE: BNQCTB ******************** C C --------------------------------------------------------------------- C PURPOSE: CALCULATE THEORETICAL CHARGE EXCHANGE RATE COEFFICIENTS C FROM NEUTRAL HYDROGEN. C C RATE DATA IS RETURNED TO REPRESENTATIVE N-SHELLS FOR USE BY BUNDLE-N C CODES. C C INPUT FROM ARCHIVED DATASET IS ON UNIT 11. C C THE NAME OF THE SELECTED DATASET IS CONTAINED IN: 'CXMEMB' C C AND IS OPENED IN THE SUBROUTINE. C C THIS VERSION USES '1989 RESTRUCTURED DATA' MEMBERS WITH THE C CHANGED L-FITTING PARAMETERS C THE NEW PARAMETERS ARE TRANSFERED IN COMMON /LFIT89/ C C THE SUBROUTINE IS A DEVELOPMENT OF QCHEX, NEWCX2, NCHEX2 ETC. C ORIGINALLY WRITTEN BY J. SPENCE. THIS VERSION ECONOMISES ON C SUBROUTINES. C C INPUT C Z0=TARGET ION NUCLEAR CHARGE C Z1=RECOMBINING TARGET ION CHARGE C NMIN=LOWEST REPRESENTATIVE N-LEVEL OF TARGET C NMAX=HIGHEST REPRESENTATIVE N-LEVEL OF TARGET C IMAX=NUMBER OF REPRESENTATIVE LEVELS C NREP(I)=REPRESENTATIVE N-LEVELS C NBEAM=NUMBER OF ENERGY COMPONENTS IN NEUTRAL HYDROGEN BEAM C BMENA(J)=BEAM ENERGY COMPONENTS (EV/AMU) C BMFRA(J)=BEAM FRACTIONS IN ENERGY COMPONENTS C CXMEMB=DATA SET NAME OF CHARGE EXCHANGE DATA SET. C IBLOCK=1 SELECT UDW METHOD OR 1ST DATA BLOCK C =2 SELECT CCAO METHOD OR 2ND DATA BLOCK C =3 SELECT CTMC METHOD OR 3RD DATA BLOCK C =4 SELECT CCMO METHOD OR 4TH DATA BLOCK C C OUTPUT C QTHREP(I)=MEAN RATE COEFFICIENTS FOR REPRESENTATIVE C N-LEVELS (AVERAGED OVER BEAM FRACTIONS) (CM3 SEC-1) C ALPHA=SIZE OF 1/N**ALPHA TAIL FOR CH.EXCH X-SECT. C C ********** H.P.SUMMERS, JET 13 DEC 1989 *************** C ---------------------------------------------------------------------- C C----------------------------------------------------------------------- C C UPDATE: 19/01/94 - JONATHAN NASH - TESSELLA SUPPORT SERVICES PLC C C THE FOLLOWING MODIFICATIONS HAVE BEEN MADE TO THE SUBROUTINE: C C 1) THE COMPLETE CHARGE EXCHANGE DATA SET NAME IS NOW PASSED C INTO THE ROUTINE RATHER THAN JUST THE MEMBER NAME. C C 2) THE ROUTINE HAS BEEN UPGRADED TO READ NEW ADF01 FORMAT. C C NOTES: NO ATTEMPT HAS BEEN MADE TO RESTRUCTURE THE ROUTINE. RATHER C THE MINIMUM AMOUNT OF WORK TO INTEGRATE THE ROUTINE INTO C ADAS310 HAS BEEN COMPLETED. C C UNIX-IDL PORT: C C VERSION: 1.1 DATE: 16-1-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - FIRST VERSION C C VERSION: 1.2 DATE: 17-1-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - ADDED "STATUS='UNKNOWN'" TO OPEN STATEMENT C C VERSION: 1.3 DATE: 22-1-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - REPLACED CALLS TO NAG ROUTINE E02BBF WITH ADAS ROUTINE C DXNBBF C C VERSION: 1.4 DATE: 23-1-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - REPLACED CALLS TO NAG ROUTINE E01BAF WITH ADAS ROUTINE C DXNBAF C C VERSION: 1.5 DATE: 23-1-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - RELABELLED LOOP COUNTERS FOR LOOPS 176 AND 177 C C VERSION: 1.6 DATE: 24-1-96 C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC) C - RENAMED NBENG TO NBENG2 TO AVOID CONFUSION WITH C OTHER NBENG IN OTHER ROUTINES C REMOVED SUPERFLUOUS VARIABLES C C VERSION: 1.7 DATE: 14-10-96 C MODIFIED: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC) C - CORRECTED SECOND CALL TO DXNBAF - IT WAS USING XSA AND C YSA RATHER THAN XSA AND ZSA C C VERSION: 1.8 DATE: 09-04-98 C MODIFIED: HARVEY ANDERSON ( UNIVERSITY OF STRATHCLYDE ) C - CHANGED VARIBLE MXE FROM 24 TO 40. C - INCREASED SIZE OF ARRAYS ASSOCIATED WITH THE C ROUTINES DXNBAF AND DXNBBF. C - REPLACED NUMERICAL VALUE WITH THE PARAMETER C MXE IN THE IF STATEMENT WHICH TESTS TO ENSURE C THAT THE NUMBER OF BEAM ENERGIES READ FROM C INPUT FILE IS NOT GREATER THE ARRAY DIMMENSIONS C OF THE RELEVANT ARRAYS. C C VERSION: 1.9 DATE: 23-06-98 C MODIFIED: RICHARD MARTIN C -CORRECTED SCCS ERROR. C C VERSION: 1.10 DATE: 07-07-2004 C MODIFIED: ALLAN WHITEFORD C -CHANGED CALLS FROM DXNB{A,B}F TO XXNB{A,B}F C C VERSION: 1.11 DATE: 16-05-07 C MODIFIED: Allan Whiteford C - Updated comments as part of subroutine documentation C procedure. C C VERSION : 1.12 C DATE : 22-05-2007 C MODIFIED : Martin O'Mullane C - Remove unused m-subshell data possibility and C use xxdata_01 to access adf01 data. C C----------------------------------------------------------------------- C C (I*4) MXE = MAXIMUM NO. OF ENERGIES. C (I*4) MXN = MAXIMUM NO. OF N SHELLS. C (I*4) IZR = ION CHARGE OF RECEIVER. C (I*4) IZD = ION CHARGE OF DONOR. C (I*4) INDD = DONOR STATE INDEX. C (I*4) NBENG2 = NUMBER OF ENERGIES READ. C (I*4) NMINF = LOWEST N-SHELL FOR WHICH DATA READ. C (I*4) NMAXF = HIGHEST N-SHELL FOR WHICH DATA READ. C C (L*4) LPARMS = FLAGS IF L-SPLITTING PARAMETERS PRESENT. C .TRUE. => L-SPLITTING PARAMETERS PRESENT. C .FALSE => L-SPLITTING PARAMETERS ABSENT. C (L*4) LSETL = FLAGS IF L-RESOLVED DATA PRESENT. C .TRUE. => L-RESOLVED DATA PRESENT. C .FALSE => L-RESOLVED DATA ABSENT. C (L*4) LSETM = FLAGS IF M-RESOLVED DATA PRESENT. C .TRUE. => M-RESOLVED DATA PRESENT. C .FALSE => M-RESOLVED DATA ABSENT. C C (C*80) TITLE = NOT SET - TITLE FOR DATA SOURCE. C (C*2) SYMBR = RECEIVER ION ELEMENT SYMBOL. C (C*2) SYMBD = DONOR ION ELMENT SYMBOL. C C (I*4) LFORMA() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: MXE C C (R*8) BENGY() = COLLISION ENERGIES. C UNITS: EV/AMU (READ AS KEV/AMU) C DIMENSION: MXE C (R*8) ALPHAA() = EXTRAPOLATION PARAMETER ALPHA. C DIMENSION: MXE C (R*8) XLCUTA() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: MXE C (R*8) PL2A() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: MXE C (R*8) PL3A() = PARAMETERS FOR CALCULATING L-RES X-SEC. C DIMENSION: MXE C (R*8) XTOT() = TOTAL CHARGE EXCHANGE CROSS-SECTION. C UNITS: CM2 C DIMENSION: MXE C C (R*8) XSIGN(,) = N-RESOLVED CHARGE EXCHANGE CROSS-SECTIONS. C UNITS: CM2 C 1ST DIMENSION: MXE C 2ND DIMENSION: MXN C (R*8) XSIGL(,) = L-RESOLVED CHARGE EXCHANGE CROSS-SECTIONS. C UNITS: CM2 C 1ST DIMENSION: MXE C 2ND DIMENSION: (MXN*(MXN+1))/2 C (R*8) XSIGM(,) = M-RESOLVED CHARGE EXCHANGE CROSS-SECTIONS. C UNITS: CM2 C 1ST DIMENSION: MXE C 2ND DIMENSION: (MXN*(MXN+1)*(MXN+2))/6 C C----------------------------------------------------------------------- C C----------------------------------------------------------------------- CHARACTER*80 CXMEMB INTEGER IBLOCK, IMAX, NBEAM, NMAX INTEGER NMIN, NREP(31) REAL*8 ALPHA, BMENA(6), BMFRA(6) REAL*8 QTHREP(31), Z0, Z1