ADAS Subroutine xcoef
SUBROUTINE XCOEF ( FILELS , IFAIL , LFXIST , & NION , MAXT , & INDA , NIND , NSPEC , & LPSEL , LZSEL , LISEL , LHSEL , LRSEL , & TEVA , TPVA , THVA , & DENSA , DENSPA , RATHA , RATIA , & ZEFF , & COEF , SPEC & ) C----------------------------------------------------------------------- C ****************** FORTRAN77 SUBROUTINE: IONBAL ********************* C C VERSION: 1.1 C C CALLING PROGRAM: ADAS412 C C PURPOSE: TO CALCULATE COMPLETE SETS OF SPECTRUM LINE EMISSIVITIES C FOR THE IONS OF AN ELEMENT C C PROCESSES CAN INCLUDE ELECTRON AND PROTON IMPACT, SPON- C TANEOUS EMISSION, FREE ELECTRON RECOMBINATION AND CHARGE C EXCHANGE RECOMBINATION DEPENDING ON THE INPUT DATA SET. C C ACCEPTS MULTIPLE INPUT FILES. DESIGNED FOR USE IN G(T) C CALCULATIONS ETC. C C C DATA: THE SOURCE DATA ARE SPECIFIC ION EXCITATION FILES STORED AS C PARTITIONED DATA SET MEMBERS AS FOLLOWS:- C C 'JETSHP.<SE>LIKE.DATA(<MEMBER>)' C C ACCORDING TO ADAS DATA FORMAT ADF04. C C C INPUT :(C*60) FILELS()= INPUT COPASE FILE NAMES C (L*4) LFXIST()= .TRUE. => COPASE FILE FOR THIS ION C .FALSE. => NO COPASE FILE FOR THIS ION C (I*4) NION = NUMBER OF IONS TO BE COMPUTED C (I*4) MAXT = NUMBER OF TEMPERATURE/DENSITY PAIRS C (L*4) LPSEL = .TRUE. => PROTON DATA TO BE INCLUDED C = .FALSE. => PROTON DATA TO BE EXCLUDED C (L*4) LZSEL = .TRUE. => SCALE PROTON DATA WITH ZEFF C = .FALSE. => DO NOT SCALE PROTON DATA C (L*4) LISEL = .TRUE. => IONISATION TO BE INCLUDED C = .FALSE. => IONISATION TO BE EXCLUDED C (L*4) LHSEL = .TRUE. => CHARGE TRANSFER TO BE INCLUDED C = .FALSE. => CHARGE TRANSFER TO BE EXCLUDED C (L*4) LRSEL = .TRUE. => RECOMBINATION TO BE INCLUDED C = .FALSE. => RECOMBINATION TO BE EXCLUDED C (R*8) TEVA() = ELECTRON TEMPERATURES (EV) C (R*8) TPVA() = PROTON TEMPERATURES (EV) C (R*8) THVA() = NEUTRAL HYDROGEN TEMPERATURES (EV) C (R*8) DENSA() = ELECTRON DENSITIES (CM-3) C (R*8) DENSPA()= PROTON DENSITIES (CM-3) C (R*8) RATHA() = RATIO (NEUTRAL H DENSITY/ELECTRON DENSITY) C (R*8) RATIA() = RATIO (N(Z+1)/N(Z) STAGE ABUNDANCES) C C OUTPUT :(I*4) IFAIL = 0 SUBROUTINE SUCCESSFUL C 1 SUBROUTINE FAILURE OR WARNING C (I*4) INDA(,) = IDENTIFIER FOR SPECTRUM LINE (10000*IL+IU) C 1ST DIMENSION - INDEX OF LINES FOR AN ION C 2ND DIMENSION - ION COUNT INDEX C (I*4) NIND() = NUMBER OF LINES FOR AN ION C 1ST DIMENSION - ION COUNT INDEX C (I*4) NSPEC() = NUMBER OF LEVELS FOR AN ION C 1ST DIMENSION - ION COUNT INDEX C (R*8) ZEFF = PLASMA Z EFFECTIVE ( IF 'LZSEL' = .TRUE.) C (IF 'LZSEL' = .FALSE. => 'ZEFF=1.0') C (R*8) COEF(,,)= EMISSIVITY FOR SPECTRUM LINE (10000*J+I) C 1ST DIMENSION - INDEX OF LINES FOR AN ION C 2ND DIMENSION - TEMPERATURE INDEX C 3RD DIMENSION - ION COUNT INDEX C (C*51) SPEC(,) = INFORMATION STRING FOR LEVEL C 1ST DIMENSION - INDEX OF LEVELS FOR AN ION C 2ND DIMENSION - ION COUNT INDEX C C C PROGRAM: C (I*4) NDLEV = PARAMETER = MAX. NUMBER OF LEVELS ALLOWED C (I*4) NDTRN = PARAMETER = MAX. NO. OF TRANSITIONS ALLOWED C (I*4) NDTEM = PARAMETER = MAX. NO. OF TEMPERATURES ALLOWED C (I*4) NZDIM = PARAMETER = MAX. NO. OF IONS ALLOWED C (I*4) NDMET = PARAMETER = MAX. NO. OF METASTABLES ALLOWED C C (I*4) IUNT10 = PARAMETER = INPUT UNIT FOR COPASE DATA SET C PASSING FILE. C (I*4) L1 = PARAMETER = 1 C C (R*8) D1 = PARAMETER = 1.0D0 C C (I*4) ICNTE = NUMBER OF ELECTRON IMPACT TRANSITIONS INPUT C (I*4) ICNTP = NUMBER OF PROTON IMPACT TRANSITIONS INPUT C (I*4) ICNTR = NUMBER OF FREE ELECTRON RECOMBINATIONS INPUT C (I*4) ICNTH = NO. OF CHARGE EXCHANGE RECOMBINATIONS INPUT C (I*4) IL = INPUT DATA FILE: NUMBER OF ENERGY LEVELS C (I*4) ITRAN = INPUT DATA FILE: NUMBER OF TRANSITIONS C (I*4) IZ0 = NUCLEAR CHARGE C (I*4) IZ = RECOMBINED ION CHARGE C (I*4) IZ1 = RECOMBINING ION CHARGE C (NOTE: IZ1 SHOULD EQUAL IZ+1) C (I*4) MAXLEV = HIGHEST INDEX LEVEL IN READ TRANSITIONS C (I*4) MAXT = NO. OF INPUT TEMP/DENS PAIRS ( 1 -> 'NDTEM') C (I*4) NMET = NUMBER OF METASTABLES (1 <= NMET <= 'NDMET') C (I*4) NORD = NUMBER OF ORDINARY LEVELS ('IL' - 'NMET') C (I*4) NV = INPUT DATA FILE: NUMBER OF GAMMA/TEMPERATURE C PAIRS FOR A GIVEN TRANSITION. C (I*4) I = GENERAL INDEX C (I*4) IT = TEMPERATURE ARRAY INDEX C (I*4) IS = ENERGY LEVEL ARRAY INDEX C C (R*8) TEA() = INPUT ELECTRON TEMPERATURES (K) C (R*8) TPA() = INPUT PROTON TEMPERATURES (K) C (R*8) THA() = INPUT NEUTRAL HYDROGEN TEMPERATURES (K) C (R*8) R8FBCH = FUNCTION (SEE ROUTINE SECTION BELOW) C (R*8) BWNO = IONISATION POTENTIAL (CM-1) C (R*8) ZEFFSQ = 'ZEFF' * 'ZEFF' C (R*8) DMINT = +1 or -1 DEPENDING ON WHETHER THE NUMBER OF C ROW INTERCHANGES WAS EVEN OR ODD, C RESPECTIVELY, WHEN INVERTING A MATRIX USING C 'XXMINV'. C C (L*4) LSOLVE = .TRUE. => SOLVE LINEAR EQUATION USING C 'XXMINV'. C .FALSE. =>DO NOT SOLVE LINEAR EQUATION USING C 'XXMINV' - INVERT MATRIX ONLY. C (L*4) OPEN10 = .TRUE. => FILE ALLOCATED TO UNIT 10. C = .FALSE. => NO FILE ALLOCATED TO UNIT 10. C (C*3) TITLED = ELEMENT SYMBOL. C (C*8) DATE = CURRENT DATE AS 'DD/MM/YY' C (C*60) DSNINC = INPUT COPASE DATA SET NAME (MVS DSN) C (C*51) CLINE = LEVEL SPECIFICATION LINE C C (I*4) IA() = ENERGY LEVEL INDEX NUMBER C (I*4) ILA() = QUANTUM NUMBER (L) FOR LEVEL 'IA()' C (I*4) ISA() = MULTIPLICITY FOR LEVEL 'IA()' C NOTE: (ISA-1)/2 = QUANTUM NUMBER (S) C (I*4) IMETR() = INDEX OF METASTABLE IN COMPLETE LEVEL LIST C (ARRAY SIZE = 'NDMET' ) C (I*4) IORDR() = INDEX OF ORDINARY EXCITED LEVELS IN COMPLETE C LEVEL LIST. C (I*4) I1A() = TRANSITION: C LOWER ENERGY LEVEL INDEX (CASE ' ' & 'P') C NOT USED (CASE 'H' & 'R') C (I*4) I2A() = TRANSITION: C UPPER ENERGY LEVEL INDEX (CASE ' ' & 'P') C CAPTURING LEVEL INDEX (CASE 'H' & 'R') C (I*4) IETRN() = ELECTRON IMPACT TRANSITION: C INDEX VALUES IN MAIN TRANSITION ARRAYS WHICH C REPRESENT ELECTRON IMPACT TRANSITIONS. C (I*4) IPTRN() = PROTON IMPACT TRANSITION: C INDEX VALUES IN MAIN TRANSITION ARRAYS WHICH C REPRESENT PROTON IMPACT TRANSITIONS. C (I*4) IRTRN() = FREE ELECTRON RECOMBINATION: C INDEX VALUES IN MAIN TRANSITION ARRAYS WHICH C REPRESENT FREE ELECTRON RECOMBINATIONS. C (I*4) IHTRN() = CHARGE EXCHANGE RECOMBINATION: C INDEX VALUES IN MAIN TRANSITION ARRAYS WHICH C REPRESENT CHARGE EXCHANGE RECOMBINATIONS. C (I*4) IE1A() = ELECTRON IMPACT TRANSITION: C LOWER ENERGY LEVEL INDEX C (I*4) IE2A() = ELECTRON IMPACT TRANSITION: C UPPER ENERGY LEVEL INDEX C (I*4) IP1A() = PROTON IMPACT TRANSITION: C LOWER ENERGY LEVEL INDEX C (I*4) IP2A() = PROTON IMPACT TRANSITION: C UPPER ENERGY LEVEL INDEX C C (R*8) PAR(,) = C (R*8) ER() = ENERGY RELATIVE TO LEVEL 1 (RYDBERGS) C DIMENSION: LEVEL INDEX C (R*8) XIA() = ENERGY RELATIVE TO ION. POT. (RYDBERGS) C DIMENSION: LEVEL INDEX C (R*8) AA() = ELECTRON IMPACT TRANSITION: A-VALUE (SEC-1) C (R*8) AVAL() = TRANSITION: C A-VALUE (SEC-1) (CASE ' ') C NEUTRAL BEAM ENERGY (CASE 'H') C NOT USED (CASE 'P' & 'R') C (R*8) SCOM(,) = TRANSITION: C GAMMA VALUES (CASE ' ' & 'P') C RATE COEFFT. (CM3 SEC-1) (CASE 'H' & 'R') C 1ST DIMENSION - TEMPERATURE 'SCEF()' C 2ND DIMENSION - TRANSITION NUMBER C (R*8) SCEF() = INPUT DATA FILE: ELECTRON TEMPERATURES (K) C (R*8) WA() = ENERGY RELATIVE TO LEVEL 1 (CM-1) C DIMENSION: LEVEL INDEX C (R*8) XJA() = QUANTUM NUMBER (J-VALUE) FOR LEVEL 'IA()' C NOTE: (2*XJA)+1 = STATISTICAL WEIGHT C (R*8) RHS() = USED ONLY IF 'LSOLVE=.TRUE.' WHEN CALLING C THE SUBROUTINE 'XXMINV'. CONTAINS THE SET C OF 'N' LINEAR EQUATIONS TO BE SOLVED. C INPUT TO 'XXMINV': RIGHT HAND SIDE VECTOR C OUTPUT FROM 'XXMINV': SOLUTION VECTOR C (ACTS ONLY AS A DUMMY IN THIS PROGRAM) C (R*8) CIE() = IONISATION RATE COEFFICIENT VECTOR FOR C FIXED TEMPERATURE. C DIMENSION: ENERGY LEVEL INDEX C (R*8) VHRED() = CHARGE EXCHANGE RECOMBINATION: C VECTOR OF RECOMBINATION RATE CONTRIBUTIONS C FOR EACH METASTABLE LEVEL. C (UNITS: SEC-1) C VALUES FOR GIVEN TEMPERATURE AND DENSITY. C DIMENSION: METASTABLE LEVEL INDEX C (R*8) VRRED() = FREE ELECTRON RECOMBINATION: C VECTOR OF RECOMBINATION RATE CONTRIBUTIONS C FOR EACH METASTABLE LEVEL. C (UNITS: SEC-1) C VALUES FOR GIVEN TEMPERATURE AND DENSITY. C DIMENSION: METASTABLE LEVEL INDEX C C (R*8) EXCRE(,) = ELECTRON IMPACT TRANSITION: C EXCITATION RATE COEFFS (cm**3/s) C PRE 'BXRATE': UNIT GAMMA VALUES C POST 'BXRATE': TRUE VALUES C 1st DIMENSION: TEMPERATURE INDEX ('TOUT') C 2nd DIMENSION: TRANSITION INDEX C (R*8) DEXCRE(,)= ELECTRON IMPACT TRANSITION: C DE-EXCITATION RATE COEFFS (cm**3/s) C PRE 'BXRATE': UNIT GAMMA VALUES C POST 'BXRATE': TRUE VALUES C 1st DIMENSION: TEMPERATURE INDEX ('TOUT') C 2nd DIMENSION: TRANSITION INDEX C (R*8) EXCRP(,) = PROTON IMPACT TRANSITION: C EXCITATION RATE COEFFS (cm**3/s) C PRE 'BXRATE': UNIT GAMMA VALUES C POST 'BXRATE': TRUE VALUES C 1st DIMENSION: TEMPERATURE INDEX ('TOUT') C 2nd DIMENSION: TRANSITION INDEX C (R*8) DEXCRP(,)= PROTON IMPACT TRANSITION: C DE-EXCITATION RATE COEFFS (cm**3/s) C PRE 'BXRATE': UNIT GAMMA VALUES C POST 'BXRATE': TRUE VALUES C 1st DIMENSION: TEMPERATURE INDEX ('TOUT') C 2nd DIMENSION: TRANSITION INDEX C (R*8) VECH(,) = CHARGE-EXCHANGE RECOMBINATION: C SPLINED RECOMBINATION RATE COEFFT. VALUES. C 1st DIMENSION: TEMPERATURE INDEX ('TOUT') C 2nd DIMENSION: CAPTURING LEVEL INDEX. C (R*8) VECR(,) = FREE ELECTRON RECOMBINATION: C SPLINED RECOMBINATION RATE COEFFT. VALUES. C 1st DIMENSION: TEMPERATURE INDEX ('TOUT') C 2nd DIMENSION: CAPTURING LEVEL INDEX. C (R*8) CRA(,) = A-VALUE (sec-1) MATRIX COVERING ALL C TRANSITIONS. C 1st DIMENSION: ENERGY LEVEL INDEX C 2nd DIMENSION: ENERGY LEVEL INDEX C (NOTE: DIAGONAL ELEMENTS REPRESENT THE C NEGATIVE SUM OF THEIR RESPECTIVE C COLUMNS.) C (R*8) CRCE(,) = ELECTRON IMPACT TRANSITION: C EXCIT'N/DE-EXCIT'N RATE COEFFT MATRIX C COVERING ALL TRANSITIONS (cm**3/s). C VALUES FOR GIVEN TEMPERATURE & TRANSITION C TYPE. C 1st DIMENSION: ENERGY LEVEL INDEX C 2nd DIMENSION: ENERGY LEVEL INDEX C (NOTE: DIAGONAL ELEMENTS REPRESENT THE C NEGATIVE SUM OF THEIR RESPECTIVE C COLUMNS.) C (R*8) CRCP(,) = PROTON IMPACT TRANSITION: C EXCIT'N/DE-EXCIT'N RATE COEFFT MATRIX C COVERING ALL TRANSITIONS (cm**3/s). C VALUES FOR GIVEN TEMPERATURE & TRANSITION C TYPE. C 1st DIMENSION: ENERGY LEVEL INDEX C 2nd DIMENSION: ENERGY LEVEL INDEX C (NOTE: DIAGONAL ELEMENTS REPRESENT THE C NEGATIVE SUM OF THEIR RESPECTIVE C COLUMNS.) C (R*8) CC(,) = RATE MATRIX COVERING ALL TRANSITIONS C (UNITS: SEC-1) C VALUES FOR GIVEN TEMPERATURE AND DENSITY. C 1st DIMENSION: ENERGY LEVEL INDEX C 2nd DIMENSION: ENERGY LEVEL INDEX C (R*8) CMAT(,) = (INVERTED) RATE MATRIX COVERING ALL C NON-METASTABLE/ORDINARY EXCITED LEVELS. C (UNITS: SEC) C VALUES FOR GIVEN TEMPERATURE AND DENSITY. C PRE 'XXMINV' : NOT-INVERTED C POST 'XXMINV' : INVERTED C 1st DIMENSION: ORDINARY EXCITED LEVEL INDEX C 2nd DIMENSION: ORDINARY EXCITED LEVEL INDEX C (R*8) CRED(,) = MATRIX OF TRANSITION RATES BETWEEN C METASTABLE LEVELS. C (UNITS: SEC-1) C VALUES FOR GIVEN TEMPERATURE AND DENSITY. C 1st DIMENSION: METASTABLE LEVEL INDEX C 2nd DIMENSION: METASTABLE LEVEL INDEX C (R*8) CRMAT(,) = INVERTED METASTABLE LEVEL RATE MATRIX C COVERING ALL TRANSITIONS BETWEEN METASTABLE C LEVELS EXCEPT THOSE INVOLVING LEVEL 1. C VALUES FOR GIVEN TEMPERATURE AND DENSITY. C BEFORE INPUT TO XXMINV: NOT INVERTED C AFTER OUTPUT FROM XXMINV: AS-ABOVE C 1st DIMENSION: METASTABLE LEVEL INDEX - 1 C 2nd DIMENSION: METASTABLE LEVEL INDEX - 1 C C C (R*8) POPAR(,) = LEVEL POPULATIONS C 1st DIMENSION: LEVEL INDEX C 2nd DIMENSION: TEMPERATURE INDEX C (R*8) STVR(,) = ORDINARY EXCITED LEVEL: C FREE-ELECTRON RECOMBINATION COEFFICIENTS C (UNITS* CM**3/SEC-1) C 1st DIMENSION: ORDINARY LEVEL INDEX C 2nd DIMENSION: TEMPERATURE INDEX C (R*8) STVH(,) = ORDINARY EXCITED LEVEL: C CHARGE-EXCHANGE RECOMBINATION COEFFICIENTS C (UNITS* CM**3/SEC-1) C 1st DIMENSION: ORDINARY LEVEL INDEX C 2nd DIMENSION: TEMPERATURE INDEX C (R*8) STACK(,,) = ORDINARY EXCITED LEVEL POPULAT'N DEPENDENCE C ON METASTABLE LEVEL. C 1st DIMENSION: ORDINARY LEVEL INDEX C 2nd DIMENSION: METASTABLE INDEX C 3rd DIMENSION: TEMPERATURE INDEX C (R*8) STVRM(,) = METASTABLE LEVEL: C FREE-ELECTRON RECOMBINATION COEFFICIENTS C (UNITS* CM**3/SEC-1) C 1st DIMENSION: METASTABLE INDEX C 2nd DIMENSION: TEMPERATURE INDEX C (R*8) STVHM(,) = METASTABLE LEVEL: C CHARGE-EXCHANGE RECOMBINATION COEFFICIENTS C (UNITS* CM**3/SEC-1) C 1st DIMENSION: METASTABLE INDEX C 2nd DIMENSION: TEMPERATURE INDEX C (R*8) STCKM(,) = METASTABLE POPULATIONS STACK C 1st DIMENSION: METASTABLE INDEX C 2nd DIMENSION: TEMPERATURE INDEX C C (C*1) TCODE() = TRANSITION: DATA TYPE POINTER: C ' ' => Electron Impact Transition C 'P' => Proton Impact Transition C 'H' => Charge Exchange Recombination C 'R' => Free Electron Recombination C (C*18) CSTRGA()= NOMENCLATURE/CONFIGURATION FOR LEVEL 'IA()' C (C*22) STRGA() = LEVEL DESIGNATIONS C C (L*4) LTRNG(,)= .TRUE. => TEMPERATURE VALUE WITHIN RANGE C READ FROM INPUT COPASE DATA SET. C = .FALSE. =>TEMPERATURE VALUE NOT WITHIN RANGE C READ FROM INPUT COPASE DATA SET. C 1st DIMENSION: TEMPERATURE INDEX. C 2nd DIMENSION: TEMPERATURE TYPE - C 1) => ELECTRON C 2) => PROTON C 3) => NEUTRAL HYDROGEN C C NOTE: C C INPUT/OUTPUT STREAM ALLOCATIONS: C -------------------------------- C C STREAM 10: INPUT - SPECIFIC ION RATE DATA INPUT FILE FROM C ('IUNT10') DATABASE (SEE DATA SECTION ABOVE). C C C AUTHOR: HP SUMMERS C K1/1/57 C JET EXT. 4941 C C DATE: 27/06/91 C C UPDATE: 12/04/94 - H. P. SUMMERS - RATIONALISING OF DIMENSIONS WITH C LATEST ADAS9120 ROUTINES. NOTED C STACK IS REAL*4 C C# C DATE: mar20-95 - A. C. Lanzafame - conversion to Unix C mar21-95 - A. C. Lanzafame - call to XXDATE avoided: redundant C mar24-95 - - FILELS from C*44 to C*60 C - DSNINC from C*44 to C*60 C apr27-95 - A. C. Lanzafame - STACK changed to R*8 C C ROUTINES: C ROUTINE SOURCE BRIEF DESCRIPTION C ------------------------------------------------------------ C DCSTKC ADAS STACK UP TRANSITION RATE BETWEEN METS. C DCSTKA ADAS STACK UP ORDINARY POP. DEPENDENCE ON MET C DCPOPM ADAS CALCULATE BASIC MET. LEVEL POPULATIONS. C DCPOPO ADAS CALCULATE ORDINARY LEVEL POPULATIONS. C DCLNORM ADAS NORMALISES LINE EMISSIVITY. C BXDATA ADAS GATHERS RELEVANT DATA FROM INPUT FILE C BXTTYP ADAS SORT TRANSITIONS INTO TRAN/RECOMB TYPES C BXIORD ADAS SETS UP ORDINARY LEVEL INDEX. C BXRATE ADAS CALCULATES EXC. & DE-EXC. RATE COEFFTS. C BXRCOM ADAS ESTABLISHES RECOMBINATION RATE COEFFTS. C BXMCRA ADAS CONSTRUCTS A-VALUE MATRIX. C BXMCRC ADAS CONSTRUCTS EXC./DE-EXC. RATE COEF MATRIX C BXMCCA ADAS CONSTRUCTS WHOLE RATE MATRIX. C BXMCMA ADAS CONSTRUCTS ORDINARY LEVEL RATE MATRIX. C BXSTKB ADAS STACK UP RECOMB. CONTRIBUTION FOR ORD. C BXSTKD ADAS STACK UP RECOMB RATE FOR EACH MET. LEVEL C BXMPOP ADAS CALCULATE METASTABLE LEVEL POPULATIONS. C BXSTVM ADAS CALCULATE MET. LEVEL RECOMB. COEFFTS. C XXERYD ADAS CONVERTS ENERGIES FROM W.NO. TO RYDBERGS C XXRATE ADAS CALCULATES EXC. & DE-EXC. RATE COEFFTS. C XXMINV ADAS INVERTS MATRIX AND SOLVES EQUATIONS. C FOR UNIT GAMMA VALUE C R8FBCH ADAS REAL*8 FUNCTION:EVALUATES SHELL CONTRIB. C TO IONISATION RATE COEFFICIENT IN THE C BURGESS-CHIDICHIMO APPROX. C C VERSION 1.1 DATE: 28-10-97 C RICHARD MARTIN C PUT UNDER SCCS CONTROL (ADAS412). C C VERSION: 1.2 DATE: 02-05-2003 C MODIFIED: Martin O'Mullane C - Use xxdata_04 to read adf04 file. This requires C new arrays some of which are not used in the C population calculation. C - bxttyp parameter list extended. C C VERSION : 1.3 C DATE : 04-08-2008 C MODIFIED: Martin O'Mullane C - Increase number of transitions to 3000. C C VERSION : 1.4 C DATE : 29-08-2008 C MODIFIED: Martin O'Mullane C - Reduce nzdim from 20 to 1. C C----------------------------------------------------------------------- CHARACTER*60 FILELS(NZDIM) CHARACTER*51 SPEC(NDLEV,NZDIM) INTEGER IFAIL, INDA(NDTRN,NZDIM), MAXT INTEGER NIND(NZDIM), NION, NSPEC(NZDIM) LOGICAL LFXIST(NZDIM), LHSEL, LISEL LOGICAL LPSEL, LRSEL, LZSEL REAL*8 COEF(NDTRN,NDTEM,NZDIM), DENSA(NDTEM) REAL*8 DENSPA(NDTEM), RATHA(NDTEM) REAL*8 RATIA(NDTEM), TEVA(NDTEM) REAL*8 THVA(NDTEM), TPVA(NDTEM), ZEFF