!=================================================================
!  一次元火星大気ダストの放射計算プログラム;
!  ダスト質量混合比の設定
!
!  2000/10/15  小高正嗣
!=================================================================

      subroutine QBASIC
     I   ( DENS0, QTAU_ALL, 
     O     QVAP0, BETA ,
     C     QEXT_SR, 
     C     PI, QREFF, QDENS,
     G     FDZ, DX,
     D     NZ, NZB )

!-----------------------------------------------------------------      
      implicit real*8 ( a-h,o-z )
!-----------------------------------------------------------------      
      dimension
     \   DENS0(-2:NZB), QVAP0(-2:NZB)

      dimension
     \   FDZ(-2:NZB)
!-----------------------------------------------------------------      

      QALL = 0.0D0
      do iz = 0, NZ
         QALL = QALL + DENS0(iz) * QVAP0(iz) * FDZ(iz) * DX
      end do

      BETA = ( 3.0D0 * QEXT_SR ) / ( 4.0D0 * PI * QREFF * QDENS ) 

      Q0 = QTAU_ALL / BETA / QALL 

      do iz = -2, NZB
         QVAP0(iz) = Q0 * QVAP0(iz)
      end do

!-----------------------------------------------------------------      
      return
      end
