<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_MSPPS_TS'><A href='../../html_code/radiance/da_mspps_ts.inc.html#DA_MSPPS_TS' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_mspps_ts(tb, nchan, satzen, ts) 2,1
 
! http://www.star.nesdis.noaa.gov/corp/scsb/mspps/algorithms.html
! land algorithm for surface temperature
 
   use gsi_constants, only: deg2rad

   implicit none

   integer,                intent(in)  :: nchan
   real, dimension(nchan), intent(in)  :: tb
   real,                   intent(in)  :: satzen
   real,                   intent(out) :: ts

   real, parameter :: rmiss = -999.0
   real, parameter :: tbmin = 50.0
   real, parameter :: tbmax = 550.0

   real :: cza

   ts = rmiss  ! initialize

   if ( tb(1) &gt; tbmin .and. tb(1) &lt; tbmax .and.   &amp;
        tb(2) &gt; tbmin .and. tb(2) &lt; tbmax .and.   &amp;
        tb(3) &gt; tbmin .and. tb(3) &lt; tbmax .and.   &amp;
        satzen &gt;= 0.0 .and. satzen &lt;= 90.0 ) then
      cza = COS(satzen*deg2rad)
      ts = 2.9079E2-(8.5059E-1-1.9821E-3*tb(1))*tb(1)+         &amp;
           (6.1433E-1-2.3579E-3*tb(2))*tb(2)-                  &amp;
           (1.1493-5.4709E-3*tb(3))*tb(3)-1.50E1*(cza-5.40E-1)
   end if

end subroutine da_mspps_ts