7.25. CKCRAY

CKCRAY    CKCRAY    CKCRAY    CKCRAY    CKCRAY    CKCRAY    CKCRAY    
          **********************************************
                    **************************
                              ******

SUBROUTINE CKCRAY (LINE, NN, KRAY, LOUT, NDIM, NRAY, NF, KERR)
Searches a character string, LINE, and compares the space-delimited
substrings in LINE, to an array of character strings, KRAY;
if a substring in LINE is located in KRAY, the index of its location
in KRAY is stored in the integer array NRAY.  For example, the
subroutine might be called to assign Chemkin species indices to a
given list of species names.  This application is illustrated in the
following example:

   input:  LINE    = "OH  N2  NO"
           KRAY(*) = "H2" "O2" "N2" "H" "O" "N" "OH" "H2O" "NO"
           NN      = 9, the number of entries in KRAY(*)
           LOUT    = 6, a logical unit number on which to write
                     diagnostic messages.
           NDIM    = 10, the dimension of array NRAY(*)
   output: NRAY(*) = 7, 3, 9, the index numbers of the entries
                     in KRAY(*) corresponding to the substrings
                     in LINE
           NF      = 3, the number of correspondences found.
           KERR    = .FALSE.

INPUT
LINE    - Character string.
KRAY(*) - Character string array; dimension at least NN.
NN      - Integer scalar, total character string count of KRAY.
LOUT    - Integer scalar, formatted output file unit.
NDIM    - Integer scalar, dimension of the integer array NRAY.

OUTPUT
NRAY(*) - Integer array, indices of the elements of KRAY
          which correspond to the substrings in LINE;
          dimension at least NDIM.
NF      - Integer scalar, count of correspondences found.
KERR    - Logical, syntax or dimensioning Error flag.