!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer, 
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms 
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer 
!version 3 or (at your option) any later version that should be found at: 
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html 
!
!This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
!without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
!See the above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software; 
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec), 
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
***s/r itf_chm_inikey
*
#include "model_macros_f.h"
*

      subroutine itf_chm_inikey() 1,1
      implicit none
*
*author 
*     A. Kallaur - arqi - june 2005
*
*revision
* v3_30 - Kallaur A.       - initial version
*
*
*implicites
*
#include "tr3d.cdk"
#include "itf_chm_bus.cdk"
#include "itf_chm_busind.cdk"
!
!  Local variables
!
      integer i,k,deb,lght
      integer init,init0,init1
      data    init0,init1 /0,1/
!
!-------------------------------------------------------------------
!
! Add chemical species to the tracer stack. Note the actual
! loading is done in "inikey.ftn"
!
      do i=1,chm_bdyn_top
         call itf_chm_getindx(chmdynnm(i),'D',deb,lght,init0)
         chmt_name_S(i) = chmdynon(i)
         chmt_ind(1,i)  = deb
         chmt_ind(2,i)  = deb
         chmt_ntr       = chmt_ntr + 1
      enddo
      do i=1,chmt_ntr
         do k=1,tr3d_ntr
            if (Tr3d_name_S(k).eq.chmt_name_S(i)) goto 40
         end do
         tr3d_ntr = tr3d_ntr + 1
         Tr3d_name_S(tr3d_ntr) = chmt_name_S(i)
         Tr3d_sval(tr3d_ntr) = 0.0
  40  continue
      enddo
!
!-------------------------------------------------------------------
!
      return
      end