Search Site | Contact Details | FAQ

ADAS Subroutine bdwr14

      SUBROUTINE  BDWR14( IUNIT  , NDLEV  , NDJLEV , NDPRT  ,
     &                    NDPRTI , NDMET  , NDT    , NVMAX  , NDTRN ,
     &                    USERID , DATE   ,
     &                    TITLED , IZ     , IZ0    , IZ1    , BWNO  ,
     &                    NPL    , BWNOA  , LBSETA , PRTWTA , CPRTA ,
     &                    NTRM   , NPTRM  , NLVL   , NPLVL  ,
     &                    ISTRM  , IGTRM  , ISPTRM , IGPTRM ,
     &                    ISLVL  , FSLVL  , JTREF  ,
     &                    ISPLVL , FSPLVL , JTPREF ,
     &                    SEQSYM , IGZ    , IGZ0   , IGZ1   ,
     &                    NPRF   , NPRFM  , IPRFM  , NPRI   , IPRI   ,
     &                    IPA    , CSTRPA , ISPA   , ILPA   , XJPA  ,
     &                    WPA    , NGLEV  , BWNI   , NLEVM  , ILEVM  ,
     &                    WGA    , NTE    , TEA    , LRION  , RION   ,
     &                    LSJ    , IL     , 
     &                    IA     , CSTRGA , ISA    , ILA    , XJA   ,
     &                    WA     , CPLA   , NPLA   , IPLA   , ZPLA   ,
     &                    NV     , SCEF   , ITRAN  , 
     &                    TCODE  , I1A    , I2A    , AVAL   , SCOM  ,     
     &                    DSNSP  , DSNBD  , DSNXR  , IERROR )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: BDWR14 *********************
C
C  PURPOSE: TO INTERPOLATE IONISATION RATE DATA FROM ADF23 FILE
C           AND WRITE SUPPLEMENTED ADF04 FILE.
C
C  CALLING PROGRAM: ADAS213
C
C  SUBROUTINE:
C
C  INPUT : (I*4) IUNIT       = UNIT TO WHICH INPUT FILE IS ALLOCATED
C
C  INPUT : (I*4) NDLEV       = MAX. NO. OF TERMS THAT CAN BE READ
C  INPUT : (I*4) NDJLEV      = MAX. NO. OF LEVELS THAT CAN BE READ
C  INPUT : (I*4) NDPRT       = MAX. NO. OF PARENT STATES
C  INPUT : (I*4) NDPRTI      = MAX. NO. OF INTERMEDIATE PARENT STATES
C  INPUT : (I*4) NDMET       = MAX. NUMBER OF METASTABLES ALLOWED
C  INPUT : (I*4) NDT         = MAX. NUMBER OF ELECTRON TEMPS IN ADF23 FILE
C  INPUT : (I*4) NVMAX       = MAX. NUMBER OF ELECTRON TEMPS IN ADF04 FILE 
C  INPUT : (I*4) NDTRN       = MAX. NUMBER OF TRANSITIONS THAT CAN BE READ
C  INPUT : (C*10)USERID      = USER IDENTIFIER OF CODE EXECUTOR.
C  INPUT : (C*8) DATE        = DATE (AS DD/MM/YY).
C  INPUT : (C*3) TITLED      = ELEMENT SYMBOL.
C  INPUT : (I*4) IZ          =  RECOMBINED ION CHARGE READ
C  INPUT : (I*4) IZ0         =         NUCLEAR CHARGE READ
C  INPUT : (I*4) IZ1         = RECOMBINING ION CHARGE READ
C                              (NOTE: IZ1 SHOULD EQUAL IZ+1)
C  INPUT : (R*8) BWNO        = IONISATION POTENTIAL (CM-1) OF LOWEST PARENT
C  INPUT : (I*4) NPL         = NUMBER OF PARENTS ON FIRST LINE AND USED
C                              IN LEVEL ASSIGNMENTS
C  INPUT : (R*8) BWNOA()     = IONISATION POTENTIAL (CM-1) OF PARENTS
C  INPUT : (L*4) LBSETA()    = .TRUE.  - PARENT WEIGHT SET FOR BWNOA()
C                              .FALSE. - PARENT WEIGHT NOT SET FOR BWNOA()
C  INPUT : (R*8) PRTWTA()    = PARENT WEIGHT FOR BWNOA()
C  INPUT : (C*9) CPRTA()     = PARENT NAME IN BRACKETS
C
C  INPUT : (I*4) NTRM        = NUMBER OF TERMS IN X-REF FILE.
C  INPUT : (I*4) NPTRM       = NUMBER OF PARENT TERMS IN X-REF FILE.
C  INPUT : (I*4) NLVL        = NUMBER OF LEVELS IN X-REF FILE.
C  INPUT : (I*4) NPLVL       = NUMBER OF PARENT LEVELS IN X-REF FILE.
C
C  INPUT : (I*4) ISTRM()     = SPEC. ION FILE TERM INDEX FROM X-REF
C                              1ST.DIM.: TERM COUNTER IN X-REF FILE 
C  INPUT : (I*4) IGTRM()     = IONIS. FILE TERM INDEX FROM X-REF
C                              1ST.DIM.: TERM COUNTER IN X-REF FILE 
C  INPUT : (I*4) ISPTRM()    = SPEC. ION FILE PRNT. TERM INDEX FROM X-REF
C                              1ST.DIM.: PRNT. TERM COUNTER IN X-REF FILE 
C  INPUT : (I*4) IGPTRM()    = IONIS. FILE PRNT. TERM INDEX FROM X-REF
C                              1ST.DIM.: PRNT. TERM COUNTER IN X-REF FILE 
C  INPUT : (I*4) ISLVL()     = SPEC. ION FILE LEVEL INDEX FROM X-REF
C                              1ST.DIM.: LEVEL COUNTER IN X-REF FILE 
C  INPUT : (R*8) FSLVL()     = FRACTIONATION OF TERM RATES AMONG LEVELS
C                              1ST.DIM.: LEVEL COUNTER IN X-REF FILE
C  INPUT : (I*4) JTREF()     = SP. ION FILE TERM ASSOCIATED WITH LEVEL
C                              FROM X-REF FILE.
C                              1ST.DIM.: LEVEL COUNTER IN X-REF FILE 
C  INPUT : (I*4) ISPLVL()    = SPEC. ION FILE PRNT. LEVEL INDEX FROM X-REF
C                              1ST.DIM.: PRNT. LEVEL COUNTER IN X-REF FILE 
C  INPUT : (R*8) FSPLVL()    = FRACTIONATION OF PRNT. TERM RATES AMONG 
C                              PRNT. LEVELS
C                              1ST.DIM.: LEVEL COUNTER IN X-REF FILE
C  INPUT : (I*4) JTPREF()    = SP. ION FILE PRNT. TERM ASSOCIATED WITH 
C                              PRNT. LEVEL FROM X-REF FILE.
C                              1ST.DIM.: LEVEL COUNTER IN X-REF FILE
C  INPUT : (C*2)  SEQSYM     = RECOMBINED ION SEQ
C  INPUT : (I*4)  IGZ        = RECOMBINED ION CHARGE FROM ADF23 FILE
C  INPUT : (I*4)  IGZ0       = NUCLEAR CHARGE FROM ADF23 FILE
C  INPUT : (I*4)  IGZ1       = RECOMBINING ION CHARGE FROM ADF23 FILE
C  INPUT : (I*4)  NPRF       = NUMBER OF FINAL PARENTS
C  INPUT : (I*4)  NPRFM      = NUMBER OF FINAL PARENTS WHICH ARE METASTABLES
C  INPUT : (I*4)  IPRFM()    = CROSS-REFERENCING OF FINAL METASTABLE
C                              PARENTS TO FINAL PARENT LIST.
C  INPUT : (I*4)  NPRI       = NUMBER OF FINAL PARENTS WHICH ARE INTERMEDIATE
C                              PARENTS FOR REPR. N-SHELL DOUBLY EXCITED STATES
C  INPUT : (I*4)  IPRI()     = CROSS-REFERENCING OF INTERMEDIATE
C                              PARENTS TO FINAL PARENT LIST.
C  INPUT : (I*4)  IPA()      = INDEX OF FINAL PARENT ENERGY LEVELS
C  INPUT : (C*18) CSTRPA()   = NOMENCL./CONFIG. FOR PARENT LEVEL 'IPA()'
C  INPUT : (I*4)  ISPA()     = MULTIPLICITY FOR PARENT LEVEL 'IPA()'
C                              NOTE: (ISPA-1)/2 = QUANTUM NUMBER (SP)
C  INPUT : (I*4)  ILPA()     = QUANTUM NUMBER (LP) FOR PARENT LEVEL 'IPA()'
C  INPUT : (R*8)  XJPA()     = QUANTUM NUMBER (JP) FOR PARENT LEVEL 'IPA()'
C                              NOTE: (2*XJPA)+1 = STATISTICAL WEIGHT
C  INPUT : (R*8)  WPA()      = ENERGY RELATIVE TO PARENT LEVEL 1 (CM-1)
C                              FOR PARENT LEVEL 'IPA()'
C  INPUT : (I*4)  NGLEV      = NUMBER OF ENERGY LEVELS (TERMS) OF THE
C                              IONISING ION FROM ADF23 FILE
C  INPUT : (R*8)  BWNI       = IONISATION POTENTIAL (CM-1) OF LOWEST LEVEL
C                              OF IONISING ION
C  INPUT : (I*4)  NLEVM      = NUMBER OF IONISING ION LEVELS WHICH ARE
C                              METASTABLES
C  INPUT : (I*4)  ILEVM()    = CROSS-REFERENCING OF IONISNG ION METASTABLES
C                              TO IONISING ION LEVEL LIST.
C  INPUT : (R*8)  WGA()      = ENERGY RELATIVE TO RECOMBINED LEVEL 1 (CM-1)
C                              FOR RECOMBINED LEVEL 'IA()' FROM ADF23 FILE
C  INPUT : (I*4)  NTE        = NUMBER OF ELECTRON TEMPS. FROM ADF23 FILE
C  INPUT : (R*8)  TEA()      = ELECTRON TEMPERATURES (K) FROM ADF23 FILE
C  INPUT : (L*4)  LRION(,)   = .TRUE.  => DATA PRESENT FOR FINAL STATE
C                              .FALSE. => DATA NOT PRESENT FOR FINAL STATE
C                              1ST.DIM: IONISING ION METASTABLE INDEX
C                              2ND.DIM: FINAL PARENT INDEX
C  INPUT : (R*8)  RION(,,)   = STATE SELECTIVE DIRECT IONISATION COEFFICIENTS
C                              1ST.DIM: IONISING ION METASTABLE INDEX
C                              2ND.DIM: FINAL PARENT INDEX
C                              3RD.DIM: ELECTRON TEMPERATURE INDEX 
C  INPUT : (L*4)  LSJ        = .TRUE. => J-RESOL. INFO. IN X-REF FILE
C                              .FALSE.=> NO J-RESOL. IN X-REF FILE
C  INPUT : (I*4)  IL         = INPUT DATA FILE: NUMBER OF ENERGY LEVELS
C
C  INPUT : (I*4)  IA()       = ENERGY LEVEL INDEX NUMBER
C  INPUT : (C*18) CSTRGA()   = NOMENCLATURE/CONFIGURATION FOR LEVEL 'IA()'
C  INPUT : (I*4)  ISA()      = MULTIPLICITY FOR LEVEL 'IA()'
C                              NOTE: (ISA-1)/2 = QUANTUM NUMBER (S)
C  INPUT : (I*4)  ILA()      = QUANTUM NUMBER (L) FOR LEVEL 'IA()'
C  INPUT : (R*8)  XJA()      = QUANTUM NUMBER (J-VALUE) FOR LEVEL 'IA()'
C                              NOTE: (2*XJA)+1 = STATISTICAL WEIGHT
C  INPUT : (R*8)  WA()       = ENERGY RELATIVE TO LEVEL 1 (CM-1) FOR LEVEL
C                              'IA()'
C  INPUT : (C*1)  CPLA()     = CHAR. SPECIFYING 1ST PARENT FOR LEVEL 'IA()'
C                              INTEGER - PARENT IN BWNOA() LIST
C                              'BLANK' - PARENT BWNOA(1)
C                                'X'   - DO NOT ASSIGN A PARENT
C                              1ST DIM.: LEVEL INDEX 
C  INPUT : (I*4)  NPLA()     = NO. OF PARENT/ZETA CONTRIBUTIONS TO IONIS.
C                              OF LEVEL
C                              1ST DIM.: PARENT INDEX
C  INPUT : (I*4)  IPLA(,)    = PARENT INDEX FOR CONTRIBUTIONS TO IONIS.
C                              OF LEVEL
C                              1ST DIM.: PARENT INDEX
C                              2ND DIM.: LEVEL INDEX
C  INPUT : (R*8)  ZPLA(,     = EFF. ZETA PARAM. FOR CONTRIBUTIONS TO IONIS.
C                              OF LEVEL
C                              1ST DIM.: PARENT INDEX
C  INPUT : (C*92) CIONP      = STRING CONTAINING LEVEL TERMINATOR AND
C                              IONISATION POTENTIALS
C
C  INPUT : (I*4)  NV         = INPUT DATA FILE: NUMBER OF GAMMA/TEMPERATURE
C                              PAIRS FOR A GIVEN TRANSITION.
C  INPUT : (R*8)  SCEF()     = INPUT DATA FILE: ELECTRON TEMPERATURES (K)
C                              (INITIALLY JUST THE MANTISSA. SEE 'ITPOW()')
C                              (NOTE: TE=TP=TH IS ASSUMED)
C
C  INPUT : (I*4)  ITRAN      = INPUT DATA FILE: NUMBER OF TRANSITIONS
C  INPUT : (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  INPUT : (I*4)  I1A()      = TRANSITION:
C                               LOWER ENERGY LEVEL INDEX (CASE ' ' & 'P')
C                               SIGNED PARENT      INDEX (CASE 'H' & 'R')
C  INPUT : (I*4)  I2A()      = TRANSITION:
C                               UPPER ENERGY LEVEL INDEX (CASE ' ' & 'P')
C                               CAPTURING    LEVEL INDEX (CASE 'H' & 'R')
C  INPUT : (R*8)  AVAL()     = TRANSITION:
C                               A-VALUE (SEC-1)          (CASE ' ')
C                               NEUTRAL BEAM ENERGY      (CASE 'H')
C                               NOT USED                 (CASE 'P' & 'R')
C  INPUT : (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  INPUT : (C*80) DSNSP      = INPUT ADF04 FILE NAME 
C  INPUT : (C*80) DSNBD      = ADF23 IONISATION DATA FILE NAME
C  INPUT : (C*80) DSNXR      = ADF18 CROSS-REFERENCE FILE NAME 
C  OUTPUT: (I*4)  IERROR     = 0 => X-REF FILE OK
C                              1 => FAULT IN XREF FILE DATASETS
C                              2 => FAULT IN XREF FILE TERM COUNT
C                              3 => FAULT IN XREF FILE LEVEL COUNT
C
C
C  ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          -------------------------------------------------------------
C          XXSPLN     ADAS      SPLINE CURVE FITTING/INTERPOLATION.
C
C  AUTHOR:  H. P. SUMMERS, UNIVERSITY OF STRATHCLYDE
C          JA8.08
C          TEL. 0141-553-4196
C
C  DATE:    03/04/98
C
C  UPDATE: 
C
C  VERSION: 1.1						DATE: 23-06-98
C  MODIFIED: HUGH SUMMERS
C		FIRST VERSION.        
C
C-----------------------------------------------------------------------
C-----------------------------------------------------------------------
      CHARACTER           CPLA(NDLEV)
      CHARACTER*9         CPRTA(NDMET)
      CHARACTER*18        CSTRGA(NDLEV),            CSTRPA(NDPRT)
      CHARACTER*8         DATE
      CHARACTER*80        DSNBD,       DSNSP,       DSNXR
      CHARACTER*2         SEQSYM
      CHARACTER           TCODE(NDTRN)
      CHARACTER*3         TITLED
      CHARACTER*10        USERID
      INTEGER             I1A(NDTRN),  I2A(NDTRN),  IA(NDLEV),   IERROR
      INTEGER             IGPTRM(NDPRT),            IGTRM(NDLEV)
      INTEGER             IGZ,         IGZ0,        IGZ1,        IL
      INTEGER             ILA(NDLEV),  ILEVM(NDLEV)
      INTEGER             ILPA(NDPRT), IPA(NDPRT),  IPLA(NDMET,NDLEV)
      INTEGER             IPRFM(NDPRT),             IPRI(NDPRTI)
      INTEGER             ISA(NDLEV),  ISLVL(NDJLEV)
      INTEGER             ISPA(NDPRT), ISPLVL(NDPRT)
      INTEGER             ISPTRM(NDPRT),            ISTRM(NDLEV)
      INTEGER             ITRAN,       IUNIT,       IZ,          IZ0
      INTEGER             IZ1,         JTPREF(NDPRT)
      INTEGER             JTREF(NDJLEV),            NDJLEV,      NDLEV
      INTEGER             NDMET,       NDPRT,       NDPRTI,      NDT
      INTEGER             NDTRN,       NGLEV,       NLEVM,       NLVL
      INTEGER             NPL,         NPLA(NDLEV), NPLVL,       NPRF
      INTEGER             NPRFM,       NPRI,        NPTRM,       NTE
      INTEGER             NTRM,        NV,          NVMAX
      LOGICAL             LBSETA(NDMET),            LRION(NDMET,NDPRT)
      LOGICAL             LSJ
      REAL*8              AVAL(NDTRN), BWNI,        BWNO
      REAL*8              BWNOA(NDMET),             FSLVL(NDJLEV)
      REAL*8              FSPLVL(NDPRT),            PRTWTA(NDMET)
      REAL*8              RION(NDMET,NDPRT,NDT),    SCEF(NVMAX)
      REAL*8              SCOM(NVMAX,NDTRN),        TEA(NDT)
      REAL*8              WA(NDLEV),   WGA(NDLEV),  WPA(NDPRT)
      REAL*8              XJA(NDLEV),  XJPA(NDPRT), ZPLA(NDMET,NDLEV)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk