Search Site | Contact Details | FAQ

ADAS Subroutine bapars


       SUBROUTINE BAPARS(NDMET,STRING,NPT,BWNOA,LSETA,
     &                   PRTWTA,CPRTA,IFAIL)
C
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: BAPARS *********************
C
C  PURPOSE:  TO ANALYSE THE TAIL CHARACTER STRING OF THE FIRST LINE OF
C            A SPECIFIC ION FILE INTO BINDING WAVE NUMBERS FOR DIFFERENT
C            PARENTS AND STATISTICAL WEIGHTS FOR THE PARENTS.
C            MODIFICATION OF B8PARS.
C
C  CALLING PROGRAM: ADAS210
C
C  NOTES: DETECT  -  BINDING WAVE NUMBER WHICH PRECEED TERM ASSIGNATION
C                -   TERM CONTAINED IN '(..)'.
C
C
C  SUBROUTINE:
C
C  INPUT : (I*4)  NDMET    =  MAXIMUM NUMBER OF METASTABLES ALLOWED
C  INPUT : (C*(*))STRING   =  STRING TO BE PARSED
C
C  OUTPUT: (I*4)  NPT      =  NUMBER OF BINDING WAVE NUMBERS DETECTED
C  OUTPUT: (L*4)  LSETA()  =  .TRUE.  - PARENT TERM SET FOR THIS W.NO.
C                             .FALSE. - PARENT TERM NOT SET FOR W.NO.
C  OUTPUT: (L*4)  LFND     =  .TRUE.  - L QUANTUM NUMBER PRESENT IN 
C                                       STRING
C                             .FALSE. - NO L QUANTUM NUMBER DETECTED
C  OUTPUT: (R*8)  BWNOA()  =  BINDING WAVE NUMBERS
C  OUTPUT: (R*8)  PRTWTA() =  PARENT STATISTICAL WEIGHTS
C  OUTPUT: (C*9)  CPRTA()  =  PARENT NAME IN BRACKETS
C  OUTPUT: (I*4)  IFAIL    =  0 - SUBROUTINE CONCLUDES CORRECTLY
C                             1 - FAULT DETECTED IN SUBROUTINE
C                             2 - SINGLE IONISATION POTENTIAL DETECTED
C
C          (I*4)  MAXWRD   =  MAXIMUM NUMBER OF WORDS SOUGHT INITIALLY
C                             INITIALLY, FINALLY NUMBER ACTUALLY FOUND
C          (I*4)  NFIRST   =  FIRST WORD TO BE EXTRACTED FROM STRING
C          (I*4)  IFIRST() =  INDEX OF FIRST CHAR. OF WORD () IN STRING
C          (I*4)  ILAST()  =  INDEX OF LAST  CHAR. OF WORD () IN STRING
C          (I*4)  IWORDS   =  NUMBER OF WORDS FOUND IN STRING
C          (I*4)  IABT     =  FAILURE NUMBER FROM R8FCTN
C          (I*4)  NCHAR    =  NUMBER OF CHARACTERS IN SUBSTRING
C          (I*4)  I        =  GENERAL USE
C          (I*4)  J        =  GENERAL USE
C          (I*4)  K        =  GENERAL USE
C          (I*4)  IC       =  GENERAL USE
C          (I*4)  ITYPE    =  RESOLUTION OF PARENT METASTABLES
C                             1 - LS RESOLVED
C                             2 - LSJ RESOLVED
C                             3 - ARBITRARY RESOLUTION
C          (I*4)  ITP      =  FLAG FOR INCOMPATIBLE TYPES
C          (I*4)  ITYP     =  COPY OF CURRENT ITYPE
C          (I*4)  KMRK     =  POSITION MARKER IN THE STRING FOR PARENT
C                             L QUANTUM NUMBER
C          (R*8)  TWTA()   =  (2L+1) VALUE FOR PARENT L QUANTUM NUMBER
C          (C*1)  CTRMA()  =  PARENT L QUANTUM NUMBER LETTER SET
C
C ROUTINES:
C          ROUTINE    SOURCE    BRIEF DESCRIPTION
C          -------------------------------------------------------------
C          I4UNIT     ADAS      FETCH UNIT NUMBER FOR OUTPUT OF MESSAGES
C          R8FCTN     ADAS      CONVERTS FROM CHARACTER TO REAL VARIABLE
C          I4FCTN     ADAS      CONVERTS FROM CHAR. TO INTEGER  VARIABLE
C          XXWORD     ADAS      PARSES A STRING INTO SEPARATE WORDS
C                               FOR ' ()<>{}' DELIMITERS
C
C AUTHOR:  HP SUMMERS
C          K1/1/57
C          JET EXT. 4941
C
C DATE:    22/06/92
C
C UPDATE:   8/07/93 - HPS  ALTERED TO USE XXWORD PARSING ROUTINE
C
C UPDATE:  11/05/95 - HPS  ADD CPRTA TO PARAMETER LIST
C
C UPDATE:  13/11/95 - DHB  EXTENDED ROUTINE TO HANDLE J/ARBITRARY 
C                          RESOLVED PARENT METASTABLE INFORMATION 
C                          IN THE FIRST DATA CARD STRING. INTRODUCED
C                          ITYPE TO FLAG RESOLUTION IF REQUIRED.
C
C UPDATE:  21/12/95 - DHB  INCREASED SIZE OF IFIRST & ILAST TO 12 IN
C                          LINE WITH INCREASE TO NDMET
C
C UNIX-IDL PORT:
C
C VERSION: 1.1                          DATE: 22-1-96
C MODIFIED: TIM HAMMOND (TESSELLA SUPPORT SERVICES PLC)
C               - PUT UNDER SCCS CONTROL
C
C VERSION: 1.2                          DATE: 28-1-96
C MODIFIED: HPS + WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC)
C               - PUT IN DEFAULT FOR NO PARENTS IN FILE.
C
C-----------------------------------------------------------------------
      CHARACTER*9         CPRTA(NDMET)
      CHARACTER*(*)       STRING
      INTEGER             IFAIL,       NDMET,       NPT
      LOGICAL             LSETA(NDMET)
      REAL*8              BWNOA(NDMET),             PRTWTA(NDMET)
© Copyright 1995-2018 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk