c=============================================================================== c c NAME: tb_clear c c PURPOSE: Test used to determine HIRS-8 TB clear-sky value from composite grids. c Performs long-term cloud test for Pathfinder cloud detection. c c INPUTS: name data type description c -------------------------------------------------------- c lmask byte land mask id (2=coastal,1=land,0=water) c nclrst real # clear short-term clear-sky obs. c nclrlt real # clear long-term clear-sky obs. c tavgst real Average clear-sky short-term temperature c tavglt real Average clear-sky long-term temperature c tmaxst real Maximum clear-sky short-term temperature c tmaxlt real Maximum clear-sky long-term temperature c c OUTPUTS: c tbclear real Gives clear-sky temperature using composite statistics c tbid int*2 Gives method used to arrive at clear-sky temperature c 4 -> Tavg-st c 3 -> Tmax-st - Del2 c 2 -> Tavg-lt c 1 -> Tmax-lt - Del3 c NOTES: c Typically the short term statistics (tbid = 4,3) when persistent clouds not c an issue. Long-term statistics are needed for the persistent cloud regions. c Del2 or Del3 are used for samples with relatively few observations. c c HISTORY: Darren Jackson CIRES/ETL April 2002 c c================================================================================= subroutine tb_clear(lmask,nclrst,nclrlt,tavgst,tavglt, . tmaxst,tmaxlt,tbclear,tbid) implicit none byte lmask integer*2 tbid real del1(0:1),del2(0:1),del3(0:1),del4(0:1),nclrstmn,nclrltmn real tavgst,tavglt,tmaxst,tmaxlt,tbclear,nclrst,nclrlt data del1/2.0,6.0/ ! from ISCPP paper data del2/2.0,5.0/ data del3/2.5,8.0/ data del4/4.0,8.0/ data nclrstmn/3./ data nclrltmn/3./ if(lmask .eq. 2) lmask=1 ! Set coastal regions to land setting if((tmaxst .ge. tmaxlt-del1(lmask)) .and. . (nclrst .ge. nclrstmn)) then if(tavgst .ge. tmaxst-del2(lmask)) then tbclear=tavgst tbid=4 else tbclear=tmaxst-del2(lmask) tbid=3 endif else if(nclrlt .ge. nclrltmn) then if(tavglt .ge. tmaxlt-del3(lmask)) then tbclear=tavglt tbid=2 else tbclear=tmaxlt-del3(lmask) tbid=1 endif else tbclear=tmaxlt-del3(lmask) tbid=1 endif endif return end