Search Site | Contact Details | FAQ

ADAS Subroutine xxdata_07

       SUBROUTINE XXDATA_07( IUNIT  , DSNAME ,
     &                       NSTORE , NTDIM  ,
     &                       ESYM   , IZ0    ,
     &                       NBSEL  , ISELA  ,
     &                       IZ     , IZ1    ,
     &                       CICODE , CFCODE , CIION , CFION ,
     &                       BWNO   ,
     &                       ITA    ,
     &                       TETA   , SZD
     &                     )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: XXDATA_07 ******************
C
C  PURPOSE:  TO  FETCH  DATA  FROM  INPUT ELECTRON IMPACT IONIZATION
C            RATE COEFFT FILES (ADF07)
C
C            (MEMBER STORED IN IONELEC.DATA - MEMBER PREFIX 'SZD#').
C
C  CALLING PROGRAM: ADAS502/SSZD
C
C  DATA:
C
C           UP TO 'NSTORE' SETS (DATA-BLOCKS) OF DATA MAY BE  READ FROM
C           THE FILE - EACH BLOCK FORMING A COMPLETE SET OF  IONIZATION
C           RATE COEFFICIENT VALUES FOR GIVEN TEMPERATURES.
C           EACH DATA-BLOCK  IS  ANALYSED INDEPENDENTLY OF ANY  OTHER
C           DATA-BLOCK.
C
C           THE UNITS USED IN THE DATA FILE ARE TAKEN AS FOLLOWS:
C
C           TEMPERATURES        : EV
C           RATE COEFFT         : CM**3 SEC-1
C
C  SUBROUTINE:
C
C  INPUT : (I*4)  IUNIT    = UNIT TO WHICH INPUT FILE IS ALLOCATED.
C
C  INPUT : (I*4)  NSTORE   = MAXIMUM NUMBER  OF  INPUT DATA-BLOCKS  THAT
C                            CAN BE STORED.
C  INPUT : (I*4)  NTDIM    = MAX NUMBER OF ELECTRON TEMPERATURES ALLOWED
C
C  OUTPUT: (C*2)  ESYM     = READ - IONISING ION - ELEMENT SYMBOL
C  OUTPUT: (I*4)  IZ0      = READ - IONISING ION - NUCLEAR CHARGE
C
C  OUTPUT: (I*4)  NBSEL    = NUMBER OF DATA-BLOCKS ACCEPTED & READ IN.
C  OUTPUT: (I*4)  ISELA()  = READ - DATA-SET DATA-BLOCK ENTRY INDICES
C                            DIMENSION: DATA-BLOCK INDEX
C
C  OUTPUT: (I*4)  IZ()     = READ - IONISING ION - INITIAL CHARGE
C                            DIMENSION: DATA-BLOCK INDEX
C  OUTPUT: (I*4)  IZ1()    = READ - IONISING ION - FINAL   CHARGE
C                            DIMENSION: DATA-BLOCK INDEX
C
C  OUTPUT: (C*2)  CICODE() = READ - INITIAL STATE METASTABLE INDEX
C                            DIMENSION: DATA-BLOCK INDEX
C  OUTPUT: (C*2)  CFCODE() = READ - FINAL   STATE METASTABLE INDEX
C                            DIMENSION: DATA-BLOCK INDEX
C  OUTPUT: (C*5)  CIION()  = READ - INITIAL ION (as <ESYM>+(IZ()> )
C                            DIMENSION: DATA-BLOCK INDEX
C  OUTPUT: (C*5)  CFION()  = READ - FINAL   ION (as <ESYM>+<IZ1()>)
C                            DIMENSION: DATA-BLOCK INDEX
C
C  OUTPUT: (R*8)  BWNO()   = READ- EFFECTIVE IONIZATION POTENTIAL (CM-1)
C                            DIMENSION: DATA-BLOCK INDEX
C
C  OUTPUT: (I*4)  ITA()    = READ - NUMBER OF ELECTRON TEMPERATURES
C                            DIMENSION: DATA-BLOCK INDEX
C
C  OUTPUT: (R*8)  TETA(,)  = READ - ELECTRON TEMPERATURES (UNITS: eV)
C                            1st DIMENSION: ELECTRON TEMPERATURE INDEX
C                            2nd DIMENSION: DATA-BLOCK INDEX
C
C  OUTPUT: (R*8)  SZD(,)    =READ - FULL SET OF ZERO DENSITY IONIZATION
C                                   RATE COEFFICIENT VALUES (cm**3/sec)
C                            1st DIMENSION: ELECTRON TEMPERATURE INDEX
C                            2nd DIMENSION: DATA-BLOCK INDEX
C
C          (I*4)  I4EIZ0   = FUNCTION - (SEE ROUTINES SECTION BELOW)
C          (I*4)  I4FCTN   = FUNCTION - (SEE ROUTINES SECTION BELOW)
C          (I*4)  I4UNIT   = FUNCTION - (SEE ROUTINE SECTION BELOW)
C          (I*4)  IBLK     = ARRAY INDEX: DATA-BLOCK INDEX
C          (I*4)  ITT      = ARRAY INDEX: ELECTRON TEMPERATURE INDEX
C          (I*4)  NTNUM    = NUMBER OF ELECTRON TEMPERATURES FOR CURRENT
C                            DATA-BLOCK
C          (I*4)  IABT     = RETURN CODE FROM 'I4FCTN'
C          (I*4)  IPOS1    = GENERAL USE STRING INDEX VARIABLE
C          (I*4)  IPOS2    = GENERAL USE STRING INDEX VARIABLE
C
C          (R*8)  R8FCTN   = FUNCTION - (SEE ROUTINES SECTION BELOW)
C
C          (L*4)  LBEND    = IDENTIFIES WHETHER THE LAST OF THE  INPUT
C                            DATA SUB-BLOCKS HAS BEEN LOCATED.
C                            (.TRUE. => END OF SUB-BLOCKS REACHED)
C
C          (C*1)  CSLASH   = '/' - DELIMITER FOR 'XXHKEY'
C          (C*2)  C2       = GENERAL USE TWO BYTE CHARACTER STRING
C          (C*4)  CKEY1    = 'I.P.'  - INPUT BLOCK HEADER KEY
C          (C*5)  CKEY2    = 'ICODE' - INPUT BLOCK HEADER KEY
C          (C*5)  CKEY3    = 'FCODE' - INPUT BLOCK HEADER KEY
C          (C*4)  CKEY4    = 'ISEL'  - INPUT BLOCK HEADER KEY
C          (C*10) C10      = GENERAL USE TEN BYTE CHARACTER STRING
C          (C*80) C80      = GENERAL USE 80 BYTE  CHARACTER  STRING  FOR
C                            THE INPUT OF DATA-SET RECORDS.
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          XXHKEY     ADAS      OBTAIN KEY/RESPONSE STRINGS FROM TEXT
C          I4EIZ0     ADAS      INTEGER*4 FUNCTION    -
C                               RETURNS Z0 FOR GIVEN ELEMENT SYMBOL
C          I4FCTN     ADAS      INTEGER*4 FUNCTION    -
C                               CONVERT CHARACTER STRING TO INTEGER
C          I4UNIT     ADAS      INTEGER*4 FUNCTION    -
C                               FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES
C          R8FCTN     ADAS      REAL*8 FUNCTION       -
C                               CONVERT CHARACTER STRING TO REAL*8
C          XXCASE     ADAS      SWITCHES CASE
C
C AUTHOR:  PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC)
C          K1/0/37
C          JET EXT. 2520
C
C DATE:    07/06/91
C
C UPDATE:  23/04/93 - PE BRIDEN - ADAS91: ADDED I4UNIT FUNCTION TO WRITE
C                                         STATEMENTS FOR SCREEN MESSAGES
C
C UPDATE:  24/05/93 - PE BRIDEN - ADAS91: CHANGED I4UNIT(0)-> I4UNIT(-1)
C
C UPDATE:  10/11/94 - L. JALOTA - MODIFIED TO RUN UNDER UNIX.
C
C-----------------------------------------------------------------------
C
C NOTES: Copied from e2data.for. This is v1.1 of xxdata_07.
C 
C VERSION  : 1.1                          
C DATE     : 26-03-2008
C MODIFIED : Allan Whiteford
C              - First version
C
C VERSION  : 1.2                         
C DATE     : 21-05-2008
C MODIFIED : Martin O'Mullane
C              - Permit lower case datasets for 2008 onwards data.
C              - Extract iz0 from element symbol in first block.
C
C-----------------------------------------------------------------------
      CHARACTER*2         CFCODE(NSTORE)
      CHARACTER*5         CFION(NSTORE)
      CHARACTER*2         CICODE(NSTORE)
      CHARACTER*5         CIION(NSTORE)
      CHARACTER*80        DSNAME
      CHARACTER*2         ESYM
      INTEGER             ISELA(NSTORE),            ITA(NSTORE), IUNIT
      INTEGER             IZ(NSTORE),  IZ0,         IZ1(NSTORE), NBSEL
      INTEGER             NSTORE,      NTDIM
      REAL*8              BWNO(NSTORE),             SZD(NTDIM,NSTORE)
      REAL*8              TETA(NTDIM,NSTORE)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk