SUBROUTINE CH_NUMSPECIES 1
*
#if defined (DOC)
*
***s/r CH_NUMSPECIES  - Ensure that all species are taken into account
*
*
*Author  : Y.J. Rochon, ARQX/MSC June 2005
*
*Revisions:
*
*Revisions:
*
*    -------------------
*
*    Purpose: Ensure that all species are taken into account
*
*    Arguments
*
*     Input:
*
*
*     Output:
*
#endif
      IMPLICIT NONE
*implicits
*
*     Global variables
*
#include "pardim.cdk"
#include "comdim.cdk"
#include "comlun.cdk"
#include "comstate.cdk"
#include "comchem.cdk"
*
*     Local variables
*
      character*4 clspec(ncmtmax)
      integer J,JJ,IFLAG,ispec
c
      if (NCMTASSI.EQ.0) RETURN
      ispec=0
c
      DO J=1,NVSP
         DO JJ = 1, NCMTASSI
            IF (CSNEED(J) .EQ. CNAMANAL(JJ)) then
               if (CSNEED(J).ne.'HU'.and.CSNEED(J).ne.'LQ'.and.
     &             CSNEED(J).ne.'TT'.and.CSNEED(J).ne.'UU'.and. 
     &             CSNEED(J).ne.'VV') then 
                   ispec=ispec+1
                   clspec(ispec)=csneed(J)
               end if
               EXIT
            END IF
         END DO
      END DO
c
c     Ensure that all species are taken into account
c
      DO JJ=1,NCMTASSI
         IF (CNAMANAL(JJ).ne.'HU'.and.CNAMANAL(JJ).ne.'LQ'.and.
     &       CNAMANAL(JJ).ne.'TT'.and.CNAMANAL(JJ).ne.'UU'.and.
     &       CNAMANAL(JJ).ne.'VV') THEN
            IFLAG=1
            DO J=1,ISPEC
               if (CLSPEC(J).eq.CNAMANAL(JJ)) then    
                  IFLAG=0   
                  EXIT
               end if
            END DO
            IF (IFLAG.EQ.1) THEN
               CALL ABORT3D(NULOUT,'CH_NUMSPECIES: Missing stats!')
            END IF
         END IF
      END DO
c
      return
      end