Search Site | Contact Details | FAQ

ADAS Subroutine bfwr11

C
       SUBROUTINE BFWR11( IUNT11 , DSNINP , 
     &                    NDMET  , NDLEV  , NDTRN , NVMAX ,
     &                    DATE   , 
     &                    TITLED , IZ     , IZ0   , IZ1   , BWNO  ,
     &                    NPL    , BWNOA  , LBSETA, PRTWTA, CPRTA ,
     &                    IL     ,
     &                    IA     , CSTRGA , ISA   , ILA   , XJA   , WA ,
     &                    CPLA   , NPLA   , IPLA  , ZPLA  ,
     &                    CIONP  ,
     &                    NVN    , SCEFN  ,
     &                    ITRAN  , MAXLEV ,
     &                    TCODE  , I1A    , I2A   , AVAL  , SCOMN
     &                  )
C----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: BFWR11 *********************
C
C  PURPOSE:  PRODUCES AN ADF04 TYPE FILE, WHERE THE CONTENTS IS
C            CONSIDERED AS THE OUTPUT DATA SET FROM ADAS215.
C
C  CALLING PROGRAM: ADAS215
C
C
C
C  SUBROUTINE:
C
C  INPUT : (I*4)  IUNT11  = UNIT TO WHICH INPUT FILE IS ALLOCATED
C  INPUT : (C*80) DSNINP  = NAME OF INPUT ADF04 FILE
C  INPUT : (I*4)  NDMET   = MAXIMUM NUMBER OF PARENTS 
C  INPUT : (I*4)  NDLEV   = MAXIMUM NUMBER OF LEVELS 
C  INPUT : (I*4)  NDTRN   = MAX. NUMBER OF TRANSITIONS 
C  INPUT : (I*4)  NVMAX   = MAX. NUMBER OF TEMPERATURES 
C  INPUT : (C*8)  DATE    = DATE (AS DD/MM/YY).
C  INPUT : (C*10) USERID  = USER IDENTIFIER OF CODE EXECUTOR.
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)
C  INPUT : (I*4)  NPL     = NO. OF PARENTS ON FIRST LINE OF ADF04 FILE
C  INPUT : (R*8)  BWNOA() = IONISATION POTENTIAL (CM-1) OF PARENTS
C                           1ST.DIM.: PARENT INDEX
C  INPUT : (R*8)  PRTWTA()= PARENT WEIGHT FOR BWNOA()
C                           1ST.DIM.: PARENT INDEX
C  INPUT : (C*9)  CPRTA()  = PARENT NAME IN BRACKETS
C                            1ST DIM.: PARENT INDEX 
C  INPUT : (L*4)  LBSETA() = .TRUE.  - PARENT WEIGHT SET FOR BWNOA()
C                            .FALSE. - PARENT WEIGHT NOT SET FOR BWNOA()
C
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)  NVN     = INPUT DATA FILE: NUMBER OF GAMMA/TEMPERATURE
C                           PAIRS FOR A GIVEN TRANSITION.
C  INPUT : (R*8)  SCEFN() = 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 : (I*4)  MAXLEV  = HIGHEST INDEX LEVEL IN READ TRANSITIONS
C
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)  SCOMN(,)= 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
C  ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          -------------------------------------------------------------
C          I4UNIT     ADAS      FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES
C          XXNAME     ADAS      FINDS REAL NAME OF USER
C          XXWSTR     ADAS      WRITES STRING TO A UNIT WITH TRAILING
C                               BLANKS REMOVED
C
C
C  AUTHOR : H. P. SUMMERS, UNIVERSITY OF STRATHCLYDE
C           JA8.08
C           TEL.  0141-553-4196
C
C  DATE:    04/06/96
C
C  UPDATE: 
C
C VERSION: 	1.1					DATE: 09/08/98
C MODIFIED:	RICHARD MARTIN
C		- PUT UNDER SCCS CONTROL.				
C
C VERSION: 	1.2					DATE: 15/04/99
C MODIFIED:	Martin O'Mullane
C		- Add real name of user via XXNAME.
C		- Remove trailing blanks from adf04 file.
C
C----------------------------------------------------------------------
      CHARACTER*92        CIONP
      CHARACTER           CPLA(NDLEV)
      CHARACTER*9         CPRTA(NDMET)
      CHARACTER*18        CSTRGA(NDLEV)
      CHARACTER*8         DATE
      CHARACTER*80        DSNINP
      CHARACTER           TCODE(NDTRN)
      CHARACTER*3         TITLED
      INTEGER             I1A(NDTRN),  I2A(NDTRN),  IA(NDLEV),   IL
      INTEGER             ILA(NDLEV),  IPLA(NDMET,NDLEV)
      INTEGER             ISA(NDLEV),  ITRAN,       IUNT11,      IZ
      INTEGER             IZ0,         IZ1,         MAXLEV,      NDLEV
      INTEGER             NDMET,       NDTRN,       NPL
      INTEGER             NPLA(NDLEV), NVMAX,       NVN
      LOGICAL             LBSETA(NDMET)
      REAL*8              AVAL(NDTRN), BWNO,        BWNOA(NDMET)
      REAL*8              PRTWTA(NDMET),            SCEFN(NVMAX)
      REAL*8              SCOMN(NVMAX,NDTRN),       WA(NDLEV)
      REAL*8              XJA(NDLEV),  ZPLA(NDMET,NDLEV)
© Copyright 1995-2018 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk