Search Site | Contact Details | FAQ

ADAS Subroutine h9int

      subroutine h9int( itran  , stcode  , i1a    , i2a   , aval  ,
     &                  iadftyp, DTYPE  , ADF37  , iz1   , MAXT  ,
     &                  beth   , il     , nv     , ia    , wa    ,
     &                  xja    , omga   , scx    , ilbeth, DPARAM,
     &                  zpla   , bwnoa  , ipla   , TINE  , IFOUT,
     &                  upsilon , dnsilon   )
C----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: H9INT *********************
C
C  PURPOSE: GENERATES MAXWELLIAN AND NON-MAXWELLIAN UPSILONS AND
C           DOWNSILONS FROM GIVEN COLLISIONAL DATA. THIS PROGRAM
C           IS A SUBROUTINE VERSION OF ADAS809.
C
C  CALLING PROGRAM: CALLED FROM IDL VIA A C INTERFACE
C
C  SUBROUTINE:
C
C          (I*4)  NDLEV   = PARAMETER = MAX. NUMBER OF LEVELS ALLOWED
C          (I*4)  NDTRN   = PARAMETER = MAX. NO. OF TRANSITIONS ALLOWED
C          (I*4)  NEDIM   = PARAMETER = MAX. OF INPUT DATA FILE ENERGIES
C          (I*4)  NDTEM   = PARAMETER = MAXIMUM OF DATA CONVERSION TEMPS
C          (I*4)  NDTIN   = PARAMETER = MAX.NUMBER OF ISPF ENTERED TEMPS
C          (I*4)  NFDIM   = PARAMETER = MAX.NO. OF ENERGIES IN NUM. DIST.
C
C          (I*4)  I4UNIT  = FUNCTION (SEE ROUTINE SECTION BELOW)
C          (I*4)  IZ1     = RECOMBINING ION CHARGE READ FROM INPUT FILE
C                           (NOTE: IZ1 SHOULD EQUAL IZ+1)
C          (I*4)  IL      = INPUT DATA FILE: NUMBER OF ENERGY INDEX
C                                            LEVELS.
C          (I*4)  ITRAN   = INPUT DATA FILE: TOTAL NUMBER OF TRANSITIONS.
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)  NV      = INPUT DATA FILE: NUMBER OF GAMMA/TEMPERATURE
C                                     PAIRS FOR THE SELECTED TRANSITION.
C          (I*4)  MAXT    = NUMBER OF TEMPERATURE VALUES.
C          (I*4)  IFOUT   = 1 => 'TINE(ARRAY)' UNITS: KELVIN
C                         = 2 => 'TINE(ARRAY)' UNITS: EV
C                         = 3 => 'TINE(ARRAY)' UNITS:REDUCED TEMPERATURE
C          (I*4)  IUPPER  = SELECTED TRANSITION: UPPER LEVEL ARRAY INDEX
C          (I*4)  ILOWER  = SELECTED TRANSITION: LOWER LEVEL ARRAY INDEX
C          (I*4)  LUPPER  = SELECTED TRANSITION: UPPER INDEX LEVEL
C          (I*4)  LLOWER  = SELECTED TRANSITION: LOWER INDEX LEVEL
C
C          (R*8)  R8TCON  = FUNCTION (SEE ROUTINE SECTION BELOW)
C          (R*8)  EUPPER  = SELECTED TRANSITION: UPPER ENERGY LEVEL
C                           RELATIVE TO INDEX LEVEL 1. (CM-1)
C          (R*8)  ELOWER  = SELECTED TRANSITION: LOWER ENERGY LEVEL
C                           RELATIVE TO INDEX LEVEL 1. (CM-1)
C          (R*8)  WUPPER  = SELECTED TRANSITION: UPPER LEVEL STAT. WT.
C          (R*8)  WLOWER  = SELECTED TRANSITION: LOWER LEVEL STAR. WT.
C                           (NOTE: STAT. WT. = STATISTICAL WEIGHT)
C          (R*8)  BWNO    = IONISATION POTENTIAL (CM-1)
C          (R*8)  AA      = SELECTED TRANSITION A-VALUE (SEC-1)
C
C          (I*4)  IA()    = ENERGY LEVEL INDEX NUMBER
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)  XJA()   = QUANTUM NUMBER (J-VALUE) FOR LEVEL 'IA()'
C                           NOTE: (2*XJA)+1 = STATISTICAL WEIGHT
C          (R*8)  WA()    = ENERGY RELATIVE TO LEVEL 1 (CM-1) FOR LEVEL
C                           'IA()'
C          (I*4)  IPLA(,) = PARENT INDEX FOR CONTRIBUTION TO IONIS.
C                           OF LEVEL
C                           1ST DIMENSION: PARENT INDEX
C                           2ND DIMENSION: LEVEL INDEX
C          (R*8)  ZPLA(,) = EFF. ZETA PARAM. FOR CONTRIBUTION TO IONIS.
C                           OF LEVEL
C                           1ST DIMENSION: PARENT INDEX
C                           2ND DIMENSION: LEVEL INDEX
C          (R*8)  AVALE() = 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
C          (R*8)  SCX()   = INPUT DATA FILE: X-PARAMETER SET
C          (R*8)  SCEF()  = PROGRAM: INPUT FILE CONVERSION TEMPS, OR 2/3
C                           AVERAGE ENERGY OF NUMERICAL DISTRIBUTION IF 
C                           ADF37 COMPARISON FILE IS SELECTED (KELVIN)
C          (R*8)  SCEF2() = MOST COMMON ENERGY OF DISTRIBUTION FUNC. IF 
C                           ADF37 COMPARISON FILE IS SELECTED (KELVIN)
C          (R*8)  GAMMA() = INPUT DATA FILE: SELECTED TRANSITION -
C                                            GAMMA VALUE AT 'SCEF()'
C          (R*8)  RATE()  = INPUT DATA FILE: SELECTED TRANSITION -
C                           EXCITATION RATE COEFF. (CM**3/S) AT 'SCEF()'
C          (R*8)  DRATE() = INPUT DATA FILE: SELECTED TRANSITION -
C                           DEEXCITATION RATE COEF.(CM**3/S) AT 'SCEF()'
C
C          (R*8)  TINE()  = ISPF ENTERED ELECTRON TEMPERATURE VALUES.
C                           (NOTE: UNITS ARE GIVEN BY 'IFOUT')
C          (R*8)  TOA()   = ISPF ENTERED TEMPERATURES (KELVIN)
C
C          (R*8)  TOSA()  = SPLINE: SELECTED TEMPERATURES (KELVIN)
C          (R*8)  GAMOSA()= SPLINE INTEROPLATED GAMMA VALUE AT 'TOSA()'
C          (R*8)  ROSA()  = EXCITATION RATE COEFF.(CM**3/S) AT 'TOSA()'
C          (R*8)  DROSA() = DEEXCITATION RATE COEF.(CM**3/S) AT 'TOSA()'
C
C          (R*8)  TOMA()  = MINIMAX: SELECTED TEMPERATURES (KELVIN)
C          (R*8)  GAMOMA()= MINIMAX GENERATED GAMMA VALUE AT 'TOMA()'
C          (R*8)  ROMA()  = EXCITATION RATE COEFF.(CM**3/S) AT 'TOMA()'
C          (R*8)  DROMA() = DEEXCITATION RATE COEF.(CM**3/S) AT 'TOMA()'
C
C          (R*8)  TSCEF(,) = INPUT DATA FILE: ELECTRON TEMPS OR 2/3
C                            AVERAGE ENERGY IF ADF37 COMPARISON FILE IS 
C                            SELECTED
C                            1ST DIMENSION: TEMPERATURES (SEE 'SCEF()')
C                            2ND DIMENSION: 1 => KELVIN  (IFOUT=1)
C                                           2 => EV      (IFOUT=2)
C                                           3 => REDUCED (IFOUT=3)
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
C          (L*4)  LTRNG() = .TRUE.  => TEMPERATURE 'TOA()' IN RANGE
C                           .FALSE. => TEMPERATURE 'TOA()' OUT OF RANGE
C                           (RANGE = INPUT TEMPERATURE RANGE)
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*18) CSTRGB()= AS CSTRGA() BUT ONLY TAKING THE LAST
C                           'ICSTMX' NON-BLANK BYTES.
C          (C*22) STRGA() = NOMENCLATURE FOR LEVEL 'IA()' INCLUDES:
C                           'CSTRGA()' AND QUANTUM NUMBERS.
C	   (I*4)  IFIRST  = FIRST NON-BLANK CHARCTER IN FILENAME
C
C	   (I*4)  ILAST   = LAST  NON-BLANK CHARCTER IN FILENAME
C
C          (L*4)  OPEN07  = .TRUE.  => UNIT 7 IS OPEN
C                           .FALSE.  => UNIT 7 IS CLOSED
C          (L*4)  LREP    = .TRUE.  => PAPER.TXT TO BE REPLACED
C                           .FALSE.  => PAPER.TXT NOT TO BE REPLACED
C
C
C NOTE:    INPUT TEMPERATURES 'TINE()' ARE CONVERTED TO KELVIN 'TOA()'.
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          -------------------------------------------------------------
C
C  AUTHOR:  PAUL BRYANS
C
C  DATE:    02 MARCH 2005
C
C  MODIFICATION HISTORY:
C
C  DATE:   02/03/05			VERSION: 1.1
C  MODIFIED: PAUL BRYANS
C		- EXAMPLE CODE
C     
C  DATE:   17/03/05			VERSION: 1.2
C  MODIFIED: ALLAN WHITEFORD
C		- MODIFIED TO INTERFACE WITH C/IDL.
C  DATE:   04/04/05
C  MODIFIED: ALLAN WHITEFORD
C		- CHANGED LSS04A FROM A SCALAR TO AN ARRAY OF
C                 SIZE (NDLEV,NDMET)
C
C-----------------------------------------------------------------------
      CHARACTER*80        ADF37
      INTEGER             DTYPE,       I1A(NDTRN),  I2A(NDTRN)
      INTEGER             IA(NDLEV),   IADFTYP,     IFOUT,       IL
      INTEGER             ILBETH,      IPLA(NDMET,NDLEV),        ITRAN
      INTEGER             IZ1,         MAXT,        NV
      INTEGER             STCODE(NDTRN)
      REAL*8              AVAL(NDTRN), BETH(NDTRN), BWNOA(NDMET)
      REAL*8              DNSILON(NDTEM,NDTRN),     DPARAM
      REAL*8              OMGA(NEDIM,NDTRN),        SCX(NEDIM)
      REAL*8              TINE(NDTIN), UPSILON(NDTEM,NDTRN)
      REAL*8              WA(NDLEV),   XJA(NDLEV),  ZPLA(NDMET,NDLEV)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk