!=================================================================
!  CO2 大気放射過程計算プログラム; 加熱率の計算
! 
!  1999/05/31  小高正嗣
!  1999/06/07  小高正嗣
!  1999/10/18  小高正嗣
!=================================================================

      subroutine CLQRAD
     I   ( FXRADN, DENS0, TEMP0 , TPOT0,
     I     FDZ   , 
     O     DTPRAD,
     C     CPDRY , DX   ,
     D     NZ    , NZB                  )

!-----------------------------------------------------------------      
      implicit real*8 ( a-h,o-z )
!-----------------------------------------------------------------      

      dimension
     \   DTPRAD( -2:NZB )

      dimension
     \   FDZ  ( -2:NZB )

      dimension
     \   TPOT0( -2:NZB ), TEMP0( -2:NZB ), DENS0( -2:NZB )

      dimension
     \   FXRADN( -2:NZB )

!-----------------------------------------------------------------      

      do iz = 0, NZ
         DTPRAD( iz ) = 
     \      - ( FXRADN( iz + 1 ) - FXRADN ( iz ) ) /
     \        ( CPDRY * DENS0( iz ) * FDZ( iz ) * DX ) *
     \        ( TPOT0( iz ) / TEMP0( iz ) )
      end do


      DTPRAD( -1 ) = DTPRAD ( 0 )
      DTPRAD( -2 ) = DTPRAD ( 0 )
      DTPRAD( NZ+1 ) = DTPRAD ( NZ )
      DTPRAD( NZ+2 ) = DTPRAD ( NZ )

      return
      end 



