ADAS Subroutine spfman12
SUBROUTINE SPFMAN12(Z0,Z,Z1,IIGRP0,IRGRP0,TITLE, & ACIA,BCIA,ACRA,BCRA, & ISHE,IRES,INS1,ILS1,ES1,IZS1,INS2, & ILS2,ES2,IZS2,ER1,ER2,WR1,WR2, & IIFTYP,IIOTYP,IIFOUT,IXMAX,ITMAX,XDAT,EDAT,TDAT, & IOP,ASCL, & XA, YA, APA, XP, YP, TOA, YOA, YOAP, & NITHR, NRTHR , CIA , CRA, & NA , LA , EIONA , IZETAA , ENERA , WGHTA, EMIN) IMPLICIT REAL*8(A-H,O-Z) C----------------------------------------------------------------------- C C ************ FORTRAN 77 PROGRAM: SPFMAN12 ************************* C C C PURPOSE: FIT IONISATION RATE COEFFT. DATA WITH SIMPLE APPROXIMATE C FORMS AND TO CALCULATE RATE AT DIFFERENT TEMPERATURES. C C THE APPROXIMATE FORM ADOPTED IS A SUM OF TERMS ARISING FROM EACH C SHELL OF THE BCHID TYPE + A SUM OF TERMS OF EXCITATION CROSS-SECTION C FORM. THE LATTER SEEK TO REPRESENT SHARP ABOVE THRESHOLD AUTOIONISING C FEATURES. SCALING FACTORS ARE ASSIGNED TO AT MOST TWO SHELL GROUPS C (A GROUP FOR EXAMPLE BEING L-SHELLS OF THE SAME N) AND TWO RESONANCE C GROUPS. THE SCALING FACTORS ARE OBTAINED BY LEAST SQUARE FITTING TO C THE OBSERVED DATA. C C DATA: C THIS PROGRAM IS NOT YET PROPERLY ANNOTATED C C INPUT: C (R*8) Z0 = NUCLEAR CHARGE OF ION C (R*8) Z = INITIAL ION CHARGE C (R*8) Z1 = FINAL ION CHARGE C (I*4) IIGRP0 = NO. OF SHELL GROUPS C (I*4) IRGRP0 = NO. OF RESONANCE GROUPS C (C*40) TITLE = TITLE FOR THIS RUN C (R*8) ACIA = SCALING PARAMETER FOR SHELL GROUP 1 C (R*8) BCIA = SCALING PARAMETER FOR SHELL GROUP 2 C (R*8) ACRA = SCALING PARAMETER FOR RESONANCE GROUP 1 C (R*8) BCRA = SCALING PARAMETER FOR RESONANCE GROUP 2 C (I*4) ISHE() = NO. OF ENTRIES FOR EACH SHELL GROUP (1-6) C (I*4) IRES() = NO. OF ENTRIES FOR EACH RESONANCE GROUP (1-6) C (I*4) INS1() = SHELL GROUP 1 DATA: N C (I*4) ILS1() = SHELL GROUP 1 DATA: L C (R*8) ES1() = SHELL GROUP 1 DATA: EION(RYD) C (I*4) IZS1() = SHELL GROUP 1 DATA: IZETA C (I*4) INS2() = SHELL GROUP 2 DATA: N C (I*4) ILS2() = SHELL GROUP 2 DATA: L C (R*8) ES2() = SHELL GROUP 2 DATA: EION(RYD) C (I*4) IZS2() = SHELL GROUP 2 DATA: IZETA C (R*8) ER1() = RESONANCE GROUP 1 DATA: ENERGY(RYD) C (R*8) ER2() = RESONANCE GROUP 2 DATA: ENERGY(RYD) C (R*8) WR1() = RESONANCE GROUP 1 DATA: WEIGHT C (R*8) WR2() = RESONANCE GROUP 2 DATA: WEIGHT C (I*4) IIFTYP = ENERGY PARAMETER FORM C 1 : INCIDENT ENERGY (RYD) C 2 : INCIDENT ENERGY (EV) C 3 : X THRESHOLD PARAMETER C (I*4) IIOTYP = CROSS-SECTIONAL FORM C 1 : X-SECT. (PI*A0**2) C 2 : X-SECT. (CM**2) C 3 : COLLISION STRENGTH (OMEGA) C 4 : SCALED COLLISION STRENGTH ((Z**2)*OMEGA) C (I*4) IIFOUT = OUTPUT TEMPERATURE FORM C 1 : KELVIN C 2 : EV C 3 : SCALED UNITS (TE(K)/(Z1**2)) C (I*4) IXMAX = NUMBER OF X-SECT./ENERGY PAIRS C (I*4) ITMAX = NUMBER OF TEMPS. C (R*8) XDAT() = X-SECTION DATA C (R*8) EDAT() = ENERGY DATA C (R*8) TDAT() = TEMPERATURE DATA C (I*4) IOP = USE DEFAULT SCALING PARAMS? (1 = YES, 0 = NO) C (R*8) ASCL = GRAPHIC SCALING PARAMETER C C OUTPUT: C (R*8) XA() = SCALED ENERGY C (R*8) YA() = OMEGA C (R*8) APA() = APPROXIMATE OMEGA C (R*4) XP() = SCALED ENERGY RESONANCE POINTS C (R*4) YP() = OMEGA OF RESONANCE POINTS C (R*8) TOA() = TEMP (KELVIN) C (R*8) YOA() = S, MAXWELL AVERAGED IONISATION RATE COEFF.(CM^3 S^-1) C (R*8) YOAP() = SEM, APPROXIMATE RATE COEFF. C (I*4) NITHR = NUMBER OF RESONANCES C (I*4) NRTHR = NUMBER OF EXTRA (?) RESONANCES C (R*8) CIA() = OUTPUT SCALING PARAMS C (R*8) CRA() = OUTPUT SCALING PARAMS C (I*4) NA(,) = SHELL GROUP DATA : N C (I*4) LA(,) = SHELL GROUP DATA : L C (R*8) EIONA(,) = SHELL GROUP DATA : EION(RYD) C (I*4) IZETAA(,)= SHELL GROUP DATA : IZETA C (R*8) ENERA(,) = RESONANCE GROUP DATA : ENERGY(RYD) C (R*8) WGHTA(,) = RESONANCE GROUP DATA : WEIGHT C C AUTHOR: C ************ H.P.SUMMERS, JET 5 FEB 1989 ***************** C *** COR 30 OCT 1989 *** C C----------------------------------------------------------------------- C C UNIX-IDL CONVERSION: C C VERSION: 1.1 DATE: 07-10-96 C MODIFIED: WILLIAM OSBORN C - FIRST CONVERTED. C - MADE INTO A SUBROUTINE. COMMENTED-OUT PANEL INPUT C AND GRAPHICAL ROUTINES. C C VERSION: 1.2 DATE: 15-05-07 C MODIFIED: Allan Whiteford C - Updated comments as part of subroutine documentation C project. C----------------------------------------------------------------------- CHARACTER*40 TITLE INTEGER IIFOUT, IIFTYP, IIGRP0, IIOTYP INTEGER ILS1(6), ILS2(6), INS1(6), INS2(6) INTEGER IOP, IRES(2), IRGRP0, ISHE(2) INTEGER ITMAX, IXMAX, IZETAA(6,2), IZS1(6) INTEGER IZS2(6), LA(6,2), NA(6,2), NITHR INTEGER NRTHR REAL*8 ACIA, ACRA, APA(40), ASCL REAL*8 BCIA, BCRA, CIA(2), CRA(2) REAL*8 EDAT(40), EIONA(6,2), EMIN REAL*8 ENERA(6,2), ER1(6), ER2(6), ES1(6) REAL*8 ES2(6), TDAT(NDTEM), TOA(NDTEM) REAL*8 WGHTA(6,2), WR1(6), WR2(6), XA(40) REAL*8 XDAT(40) REAL XP(12) REAL*8 YA(40), YOA(NDTEM), YOAP(NDTEM) REAL YP(12) REAL*8 Z, Z0, Z1