!=================================================================
!  地表面温度計算プログラム
!
!  1999/07/21  小高正嗣
!  1999/10/26  小高正嗣
!  2000/07/09  小高正嗣; Savijarvi(1991)の地面モデル
!              [Savijarvi(1991),Contr. Atmosph. Phys.,64,219-229.]
!=================================================================

      subroutine CLTSFC
     I   ( FHEAT , FXRADD, FXRADS,
     O     TSFC  ,
     C     SIGMA , DTIME ,
     D     NX    , NXB   , 
     D     NZ    , NZB            )

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

      dimension
     \   FHEAT ( 2 )

      dimension
     \   FXRADD( -2:NZB )

      dimension
     \   TSFC ( -2:NXB )

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

      CGRND = 3.6D4
      TGRND = 200.0D0
      pi    = 3.14159263D0

      do ix = -2, NX+2
c         FXRADU_SFC = FXRADS + FXRADD( 0 ) - FHEAT( 1 ) 
c         TSFC( ix ) = ( FXRADU_SFC / SIGMA )**0.25D0

          TSFC( ix ) = TSFC( ix ) + DTIME * (
     \        ( FXRADS + FXRADD( 0 ) 
     \        - SIGMA * TSFC( ix )**4 - FHEAT( 1 ) ) / CGRND 
     \        - 2 * pi / 86400.0D0 * ( TSFC( ix ) - TGRND ) )


      end do

      return

      end

