Search Site | Contact Details | FAQ

ADAS Subroutine xxpars

       subroutine xxpars( ndmet  , strng1 , npt    , bwnoa   , lseta   ,
     &                    prtwta , cprta  , ifail  , itype)
c
c-----------------------------------------------------------------------
c
c  ****************** fortran77 subroutine: xxpars *********************
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
c            unified version of b9pars, bapars & g5pars and a   
c            replacement for these subroutines.
c
c  calling program: various
c
c
c  subroutine:
c
c  input : (i*4)  ndmet    =  maximum number of metastables allowed
c  input : (c*(*))strng1   =  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*(*))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  output: (i*4)  itype    =  resolution of parent metastables
c                             1 - ls resolved
c                             2 - lsj resolved
c                             3 - arbitrary resolution
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)  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          (i*4)  itypea() =  resolution of each parent
c          (r*8)  twta()   =  (2L+1) value for parent L quantum number
c          (c*1)  ctrma()  =  parent L quantum number letter set
c                             (inclusive convention for 'l'=j in set of 
c                              character values for 'l' and extended
c                              ctrma, twta vectors)
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          xxslen     adas      finds the length of a string excluding
c                               leading and trailing blanks 
c          xxrmve     adas      removes a character from a string
c          xxcase     adas      change string to upper or lower case
C
c
c author:  hp summers
c          JA7.08, University of Strathclyde
c          Tel: 0141-548-4196
c
c date:    30/01/03
c
c update:  22/11/04 - hp summers - corrected error in write back of 
c                                  cprta strings for the unified itype  
c
c update:  17/05/07 - ad whiteford - Updated comments as part of
C                                    subroutine documentation
C                                    procedure.
c
c-----------------------------------------------------------------------
      CHARACTER*(*)       CPRTA(NDMET),             STRNG1
      INTEGER             IFAIL,       ITYPE,       NDMET,       NPT
      LOGICAL             LSETA(NDMET)
      REAL*8              BWNOA(NDMET),             PRTWTA(NDMET)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk