subroutine hlimb1c(isp,alt,bad,rcoef,chnord,npred,tb,tblc) c c* Routine uses multiple regession to compute limb corrected Tbs for HIRS c channel 8. Uses regression coefficients derived from IDL procedure c hirs_limb_coef5.pro. c c INPUT: c isp(nspot)................HIRS scan position (1-56) c alt(nspot)................altitude c bad(nspot)................Bad values c rcoef(ncoef,nang,nchn2)...regression coefficients c chnord(ncoef-1,nang,nchn2)..Channel number for coefficients c npred(nang,nchn2)...........Number of predictors c tb(nspot,nchn).....HIRS Tbs for all HIRS channels c c OUTPUT: c tblc(nspot,1)....HIRS limb corrected Tb for HIRS channel 8 c implicit none include 'hirs1c.inc' integer k,i,j,n,isp(nspot) integer chnord(ncoef-1,nang,nchn3),npred(nang,nchn3) integer indx1,indx2 real tb(nspot,nchn2),tblc(nspot,nchn2),cosx(nang),y(2),slope real rcoef(ncoef,nang,nchn3) real alt(nspot),lza,coslzen logical bad(nspot) c external cosd data cosx/1.0, 0.9, 0.8, 0.7, 0.6, 0.5/ c* Loop on each profile do n=1,nspot if(.not. bad(n)) then c* Find boundary indices coslzen=cosd(lza(alt(n),isp(n))) if(coslzen .le. 0.5) coslzen=.5001 indx1=int(10.*(1.-coslzen))+1 indx2=indx1+1 c* Compute limb corrected TB for HIRS channel 8 do 20 i=8,8 tblc(n,i-7)=missing y(1)=0. y(2)=0. do j=2,npred(indx1,i) if(tb(n,chnord(j-1,indx1,i)) .eq. missing) goto 20 y(1)=y(1)+rcoef(j,indx1,i)*tb(n,chnord(j-1,indx1,i)) enddo y(1)=y(1)+rcoef(1,indx1,i) do j=2,npred(indx2,i) if(tb(n,chnord(j-1,indx2,i)) .eq. missing) goto 20 y(2)=y(2)+rcoef(j,indx2,i)*tb(n,chnord(j-1,indx2,i)) enddo y(2)=y(2)+rcoef(1,indx2,i) c* Interpolate to find limb value slope=(y(2)-y(1))/(cosx(indx2)-cosx(indx1)) tblc(n,i-7)=y(2)+slope*(coslzen-cosx(indx2)) 20 continue endif enddo return end