Search Site | Contact Details | FAQ

ADAS Subroutine xxin80

      SUBROUTINE XXIN80( IUNIT  , DSNAME , LERROR ,
     &                   NDDEN  , NDTIN  , NDZ1V  , NDMET ,
     &                   IDE    , ITE    , IZE    ,
     &                   DENSR  , TR     , ZIPT   ,
     &                   IME    , IMETR  , CSTRGA ,
     &                   NPRNT  , IPRNT  , IPSYS  ,
     &                   LSWIT  , EIA    ,
     &                   AIPT
     &                 )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: XXIN80 *********************
C
C  PURPOSE: TO OPEN AND ACQUIRE DATA FROM MASTER CONDENSED
C           COLLISIONAL-DIELECTRONIC FILES:
C
C           THE FOLLOWING FILES ARE ALLOWED:
C
C             8. TOTAL    LINE POWER COEFFICIENTS
C             9. SPECIFIC LINE POWER COEFFICIENTS
C
C           AND TO OPEN AND ACQUIRE DATA FROM THE FOLLOWING FILE:
C
C            10. METASTABLE POPULATION DATA
C
C             (NOTE: OTHER MASTER  CONDENSED  COLL.-DIEL.  COEFFICIENTS
C                    SHOULD BE READ USING 'XXIN17'.
C                    IF  ONLY STANDARD FILES ARE  TO  BE  READ  BY  THE
C                    PROGRAM USE 'XXINST'.)
C
C  CALLING PROGRAM: GENERAL USE
C
C  DATA:
C           THE  SOURCE  DATA IS CONTAINED AS  MEMBERS  OF  PARTITIONED
C           DATA SETS AS FOLLOWS:
C
C             8. JETUID.PLT<YR>.DATA
C             9. JETUID.PLS<YR>.DATA
C            10. JETUID.MET<YR>.DATA
C
C           WHERE <YR> DENOTES TWO INTEGERS FOR THE YEAR SELECTED.
C           IF <YR> IS BLANK THEN THE CURRENT RECOMMENDED DATA SETS ARE
C           USED
C
C           THE MEMBERS OF THE PARTITIONED DATA SETS ARE EITHER:
C           1)  <SE><#><#>  FOR PARTIAL MASTER CONDENSED FILES, OR
C           2)  <SE>        FOR STANDARD MASTER CONDENSED FILES AND
C                           METASTABLE POPULATION FILE
C
C           WHERE: <SE> IS THE ONE OR TWO LETTER ION SEQUENCE CODE.
C                       NOTE: FOR THE BARE NUCLEUS <SE> = '@'
C                  <#>  IS THE SINGLE CHARACTER '#'
C
C
C                  E.G. PARTIAL  MASTER CONDENSED FILES:'@##' OR 'HE##'
C                       STANDARD AND METASTABLE FILES  : '@'  OR 'HE'
C
C           THE  'PARTIAL'  AND  'STANDARD'  MASTER CONDENSED FILES ARE
C           IDENTICAL IN FORM  EXCEPT:
C           A) EIGHT  ADDITIONAL  LINES ARE INCLUDED  AT THE  BEGINNING
C              OF  THE  'PARTIAL'  MASTER  FILES.   THE FIRST  OF THESE
C              LINES CONTAINS  A ROW OF  '=' SIGNS,  THE NEXT SIX LINES
C              CONTAIN METASTABLE LEVEL  INFORMATION, SUCH AS NUMBER OF
C              LEVELS, PARENT/SPIN INDEXES ETC. THE EIGHTH LINE CONTAINS
C              A ROW OF "-" SIGNS.  THIS DIFFERENCE IS USED TO IDENTIFY
C              WHICH FILE TYPE IS BEING READ.
C           B) THE PARTIAL FILES INCLUDE THE POPULATIONS  FOR  EACH  OF
C              THE METASTABLE LEVELS, WHEREAS THE STANDARD FILES CONTAIN
C              A SINGLE SET OF COMBINED POPULATIONS.
C
C          THE METASTABLE POPULATION FILES HAVE THE SAME FORMAT AS THE
C          PARTIAL MASTER CONDENSED FILES
C
C          THE CHARACTER STRING SEPARATING THE INPUT DATA FOR EACH
C          CHARGE STATE IN THE FILE WILL GIVE:
C
C          THE CHARGE STATE VALUE (Z1=) AND DATE (DATE:).
C                (OLDER DATA SETS MAY HAVE 'Z =' INSTEAD OF 'Z1=' HERE)
C          (CHARGE STATE Z1 = ION CHARGE + 1 = RECOMBINING ION CHARGE)
C
C          UNDER EACH OF THESE LINES THE COEFFTS/POPULATIONS ARE LISTED
C          -IN THE CASE OF THE METASTABLE/PARTIAL FILES VALUES FOR EACH
C          OF THE METASTABLE LEVELS ARE LISTED EACH BEING  PRECEDED  BY
C          A LINE GIVING THE METASTABLE INDEX BETWEEN TWO "/".
C          E.G.  /2/ => METASTABLE LEVEL TWO.
C
C          DATA FOR INDIVIDUAL PARENT/SPIN SYSTEMS ARE LISTED IN THE
C          MEATASTABLE FILES.
C
C
C  SUBROUTINE:
C
C  INPUT : (I*4)  IUNIT   = UNIT TO WHICH INPUT DATA SET ALLOCATED
C  INPUT : (C*(*))DSNAME  = INPUT MASTER CONDENSED FILE DATA SET NAME
C  OUTPUT: (L*4)  LERROR  = .TRUE.  => ERROR DETECTED IN READING FILE
C                         = .FALSE. => NO ERROR DETECTED IN FILE
C
C  INPUT : (I*4)  NDDEN   = MAX. NUMBER OF REDUCED DENSITIES ALLOWED IN
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C  INPUT : (I*4)  NDTIN   = MAX. NO. OF REDUCED TEMPERATURES ALLOWED IN
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C  INPUT : (I*4)  NDZ1V   = MAX. NUMBER OF CHARGE STATES ALLOWED IN
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C  INPUT : (I*4)  NDMET   = MAX.  NUMBER OF METASTABLE STATES ALLOWED IN
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C                           NOT USED FOR STANDARD MASTER CONDENSED FILES
C                           (SET EQUAL TO 1 IN THIS CASE).
C
C  OUTPUT: (I*4)  IDE     = NUMBER OF REDUCED DENSITIES READ FROM INPUT
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C  OUTPUT: (I*4)  ITE     = NO. OF REDUCED TEMPERATURES READ FROM INPUT
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C  OUTPUT: (I*4)  IZE     = NO. OF CHARGE STATES GIVEN IN THE INPUT
C                           MASTER CONDENSED/METASTABLE FILE FOR A GIVEN
C                           SEQUENCE.
C
C  OUTPUT: (R*8)  DENSR() = SET OF 'IDE' INPUT REDUCED DENSITIES (CM-3/
C                           Z1**7) READ FROM CONDENSED MASTER/METASTABLE
C                           FILE.
C  OUTPUT: (R*8)  TR()    = SET OF 'ITE'  INPUT  REDUCED  TEMPERATURES
C                           (K/Z1**2) READ FROM CONDENSED MASTER/
C                           METASTABLE FILE.
C  OUTPUT: (R*8)  ZIPT()  = SET OF 'IZE' INPUT CHARGE STATES READ FROM
C                           CONDENSED MASTER/METASTABLE FILE.
C                           (CHARGE STATE = ION CHARGE + 1 = RECOMBINING
C                            ION CHARGE)
C
C  OUTPUT: (I*4)  IME     = NO. OF METASTABLE LEVELS CONTAINED IN THE
C                           INPUT MASTER CONDENSED/METASTABLE FILE.
C                           EQUALS 1 FOR STANDARD MASTER CONDENSED FILES
C  OUTPUT: (I*4)  IMETR() =THE ORIGINAL COPDAT INDEX FOR EACH METASTABLE
C                           LEVEL. DIMENSION: METASTABLE LEVEL INDEX.
C                           NOT USED FOR STANDARD MASTER CONDENSED FILES
C  OUTPUT: (C*12) CSTRGA()=THE DESIGNATION OF EACH METASTABLE LEVEL.
C                           DIMENSION: METASTABLE LEVEL INDEX.
C                           NOT USED FOR STANDARD MASTER CONDENSED FILES
C
C  OUTPUT: (I*4)  NPRNT   = NUMBER OF PARENTS CONTAINED IN THE INPUT
C                           MASTER CONDENSED/METASTABLE FILE.
C                           NOT USED FOR STANDARD MASTER CONDENSED FILES
C                           (NOTE: THE NUMBER OF PARENTS CANNOT EXCEED
C                                  THE NUMBER OF METASTABLE LEVELS)
C  OUTPUT: (I*4)  IPRNT() = THE PARENT INDEX FOR INPUT PARENT.
C                           DIMENSION: PARENT/(METASTABLE LEVEL) INDEX.
C                           NOT USED FOR STANDARD MASTER CONDENSED FILES
C  OUTPUT: (I*4)  IPSYS() = THE SPIN SYSTEM REFERENCE FOR EACH INPUT
C                           PARENT.
C                           DIMENSION: PARENT/(METASTABLE LEVEL) INDEX.
C                           NOT USED FOR STANDARD MASTER CONDENSED FILES
C
C  OUTPUT: (L*4)  LSWIT   = .TRUE.  => IONISATION POTENTIALS
C                                      INCLUDED IN INPUT MASTER FILE.
C                           .FALSE. => IONISATION POTENTIALS
C                                      NOT INCLUDED IN INPUT MASTER FILE
C  OUTPUT: (R*8)  EIA()   = IONISATION POTENTIALS: ()=ION CHARGE
C                           UNITS: WAVE NUMBERS (CM-1)
C                           (= 0.0 IF NOT SET)
C
C  OUTPUT: (R*8) AIPT(,,,)= OPTION 6: TOTAL    LINE POWER COEFFICIENTS
C                           OPTION 7: SPECIFIC LINE POWER COEFFICIENTS
C                           OPTION 8: METASTABLE STATE POPULATIONS
C                           1ST DIMENSION: ELECTRON DENSITY INDEX
C                                          ('DENSR()')
C                           2ND DIMENSION: ELECTRON TEMPERATURE INDEX
C                                          ('TR()')
C                           3RD DIMENSION: CHARGE STATE INDEX
C                                          ('ZIPT()')
C                           4TH DIMENSION: METASTABLE STATE INDEX
C                           (OPTIONS 6 & 7 STANDARD FILES ALWAYS = 1)
C
C          (C*1)  CBLNK   = PARAMETER = ' '
C          (C*1)  CEQUAL  = PARAMETER = '='
C          (C*1)  CSTAR   = PARAMETER = '*'
C
C          (I*4)  I4UNIT  = FUNCTION (SEE ROUTINE SECTION BELOW)
C          (I*4)  IPOT    = NUMBER OF IONISATION POTENTIAL VALUES
C                           PRESENT IN THE INPUT FILE.
C          (I*4)  IZ1     = CHARGE STATE READ FROM THE LINE PRECEEDING
C                           AN INPUT BLOCK FROM THE FILE.
C                           (= ION CHARGE + 1 = RECOMBINING ION CHARGE)
C          (I*4)  IMET    = METASTABLE STATE OF CURRENT DATA BLOCK BEING
C                           READ.
C          (I*4)  IBGN    = FIRST BYTE OF INTEREST IN CHARACTER 'STRING'
C          (I*4)  IEND    = LAST  BYTE OF INTEREST IN CHARACTER 'STRING'
C          (I*4)  ID      = ARRAY SUBSCRIPT USED FOR DENSITY INDEXES
C          (I*4)  IT      = ARRAY SUBSCRIPT USED FOR TEMPERATURE INDEXS
C          (I*4)  IZ      = ARRAY SUBSCRIPT USED FOR ION-CHARGE INDEXES
C          (I*4)  IM      = ARRAY SUBSCRIPT USED FOR METASTABLE INDEXES
C          (I*4)  I       = GENERAL USE
C
C          (L*4)  LPART   = .TRUE.  => REQUESTED INPUT FILE: PARTIAL
C                                             OR METASTABLE POPULATION.
C                         = .FALSE. => REQUESTED INPUT FILE: STANDARD
C
C          (C*1)  C1      = GENERAL USE 1-BYTE CHARACTER STRING.
C                           (STORES METASTABLE STATE ORDER INDEX).
C          (C*5)  CPOT    = 'IPOT'
C
C          (C*80) STRING()= STRINGS  INTO WHICH LINES OF INPUT FILE ARE
C                           READ TO ENABLE ITS FORMAT TO BE ESTABLISHED
C                           AND CONTENTS READ.
C
C
C NOTE:
C          STREAM HANDLING:
C             STREAM 'IUNIT' IS USED FOR READING CONDENSED MASTER FILES
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          ------------------------------------------------------------
C          I4UNIT     ADAS      FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES
C          XXREIA     ADAS      READ IN UNKNOWN NUMBER OF 'EIA' VALUES
C                               IF PRESENT.
C
C
C AUTHOR:  PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC)
C          K1/0/81
C          JET EXT. 4569
C
C DATE:    05/03/91 (DIFFERENT FROM ADAS90 VERSION - REMOVED DSN OPEN)
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:  11/08/93 - HP SUMMERS - RENAMED TO XXIN80 FROM XXIN68
C
C UNIX-IDL PORT:
C
C VERSION: 1.1                          DATE: 06-09-95
C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC)
C               - FIRST RELEASE (NO CHANGES)
C
C VERSION  : 1.2                          
C DATE     : 10-04-2007
C MODIFIED : Allan Whiteford
C               - Modified documentation as part of automated
C		  subroutine documentation preparation.
C-----------------------------------------------------------------------
C-----------------------------------------------------------------------
      CHARACTER*12        CSTRGA(NDMET)
      CHARACTER*(*)       DSNAME
      INTEGER             IDE,         IME,         IMETR(NDMET)
      INTEGER             IPRNT(NDMET),             IPSYS(NDMET)
      INTEGER             ITE,         IUNIT,       IZE,         NDDEN
      INTEGER             NDMET,       NDTIN,       NDZ1V,       NPRNT
      LOGICAL             LERROR,      LSWIT
      REAL*8              AIPT(NDDEN,NDTIN,NDZ1V,NDMET)
      REAL*8              DENSR(NDDEN),             EIA(250)
      REAL*8              TR(NDTIN),   ZIPT(NDZ1V)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk