subroutine get_cmaq_no2(ncidcmaq)
  use kinds, only : i_kind,r_kind,r_single
  use gsi_chemguess_mod, only : GSI_ChemGuess_Bundle, gsi_chemguess_get
  use gsi_bundlemod, only: GSI_BundleGetPointer
  use mpimod,only : mype
  use gridmod, only : nlon,nlat,nsig
  use cmaqmod, only : ncidcmaqd
  use mpimod, only : mype
  integer(i_kind) :: ino2,ier,it,k
  integer(i_kind) :: ncidcmaq
  character(len=5), allocatable :: cvar(:)
  real(r_kind),pointer :: no2array(:,:,:)
  real(r_kind),allocatable :: no2tmp(:,:,:)
!  real(r_kind) :: mwco=28.0101,scale
  real(r_kind) :: mwno2=46.0055
  real(r_kind) :: nwair=28.97
! units of co in GSI is ppv
!  scale=mwco/28.97
!  scale=1.e6 ! ppv to ppmv
  it=1
  write(6,*)mype,'call chemguess'
  call flush(6)
  call gsi_chemguess_get ( 'var::no2',ino2,ier)
  write(6,*)mype,'ino2',ino2,'nlat',nlat,nlon,nsig
  call flush(6)
  allocate (cvar(ino2))
  if(mype.eq.0)then
!    write(6,*)'find nlat',nlat,nlon,nsig
    allocate(no2tmp(nlat,nlon,nsig))
  else
    allocate(no2tmp(1,1,1))
  endif
  if(mype.eq.0)then
    call readcmaq3d(ncidcmaq,no2tmp,nsig,'ino2')
    no2tmp=no2tmp*mwno2/nwair
!    cotmp=cotmp*scale
!    do k=1,nsig
!      write(6,*)'co in',k,maxval(cotmp(:,:,k)),minval(cotmp(:,:,K))
!    end do
  endif
  call gsi_chemguess_get('gsinames',cvar,ier)
  write(6,*)mype,'cvar',cvar
  call flush(6)
  call GSI_BundleGetPointer(GSI_ChemGuess_Bundle(it),cvar(1),no2array,istatus)
  call scat3d(no2tmp,no2array) 
  deallocate (cvar,no2tmp)
  write(6,*)mype,'bottom get_cmaq-no2'
  call flush(6)
  return  
end subroutine get_cmaq_no2
