subroutine IRW_retrieval(debug, tw, tp, ltrp, isp, ttpp, psfc, * cloud_frc, lwin, iw1, pwin, ecawin, ipw, * tct) c!F77------------------------------------------------------------------- c!Description: Perform infrared window (11 micron) cloud top pressure c retrieval. c c!Input parameters: c debug Debug write flag c tw Observed 11 micron (band 31) brightness temperature (K) c tp Temperature profile c ltrp Tropopause level (1-101) c isp Surface pressure level (1-101) c ttpp Brightness temperature profile at 11 microns c assuming black surface c psfc Surface pressure c cloud_frc Collocated AVHRR cloud fraction within current c HIRS FOV c c!Output parameters: c lwin Level of retrieved cloud top pressure (1-101) c iw1 Beginning level at which to begin comparison of LHS c and RHS of co2-slicing equation c pwin IRW retrieved cloud top pressure rounded to nearest c 5 hPa c ecawin Cloud amount (assume cloud emissivity = 1.0) c ipw Cloud retrieval method (always = 6) c tct Cloud top temperature (K): profile c temperature at retrieved pressure level ('lwin') c c!Revision history: c 07/10 R. Frey c Original version c 11/10 R. Frey c Added 'cloud_frc' c 02/12 R. Frey c Added 'psfc' and 'pwin_init'; check on surface pressure c c!Calls: None c c!End------------------------------------------------------------------- implicit none save integer plev parameter (plev = 101) c Scalar arguments. integer debug, ltrp, isp, lwin, ipw, iw1 real tw, pwin, ecawin, pct, tct, cloud_frc, psfc c Array arguments. real ttpp(plev), tp(plev) c Local scalars. integer ll real pwin_init c Local arrays. real pp(plev) c----------------------------------------------------------------------- c Define 101 pressure levels. data pp / 0.0050, 0.0161, 0.0384, 0.0769, 0.1370, + 0.2244, 0.3454, 0.5064, 0.7140, 0.9753, 1.2972, + 1.6872, 2.1526, 2.7009, 3.3398, 4.0770, 4.9204, + 5.8776, 6.9567, 8.1655, 9.5119, 11.0038, 12.6492, + 14.4559, 16.4318, 18.5847, 20.9224, 23.4526, 26.1829, + 29.1210, 32.2744, 35.6505, 39.2566, 43.1001, 47.1882, + 51.5278, 56.1260, 60.9895, 66.1253, 71.5398, 77.2396, + 83.2310, 89.5204, 96.1138, 103.0172, 110.2366, 117.7775, + 125.6456, 133.8462, 142.3848, 151.2664, 160.4959, 170.0784, + 180.0183, 190.3203, 200.9887, 212.0277, 223.4415, 235.2338, + 247.4085, 259.9691, 272.9191, 286.2617, 300.0000, 314.1369, + 328.6753, 343.6176, 358.9665, 374.7241, 390.8926, 407.4738, + 424.4698, 441.8819, 459.7118, 477.9607, 496.6298, 515.7200, + 535.2322, 555.1669, 575.5248, 596.3062, 617.5112, 639.1398, + 661.1920, 683.6673, 706.5654, 729.8857, 753.6275, 777.7897, + 802.3714, 827.3713, 852.7880, 878.6201, 904.8659, 931.5236, + 958.5911, 986.0666, 1013.9476, 1042.2319, 1070.9170, 1100.0000/ c----------------------------------------------------------------------- c Initializations. pwin = -99.9 lwin = -99 ipw = -99 ecawin = -99.9 tct = -99.9 c----------------------------------------------------------------------- c ... Compute the IRW ("window") cloud height. lwin = ltrp do ll = ltrp, isp if(ttpp(ll) .lt. tw) then lwin = ll end if enddo c ... Find which level tw is closest to and define beginning level at c ... which to begin comparison of LHS and RHS of co2-slicing equation. if(lwin .eq. isp) then iw1 = lwin - 1 else if(lwin .eq. ltrp) then iw1 = lwin else if( abs(tw - ttpp(lwin)) .gt. abs(tw - ttpp(lwin + 1)) ) then lwin = lwin + 1 iw1 = lwin - 1 else iw1 = lwin end if c ... Check surface pressure, round cloud pressure to nearest 5 mb. pwin_init = pp(lwin) if(pwin_init .ge. psfc) pwin_init = psfc pwin = (nint(pwin_init / 5.0)) * 5.0 if(cloud_frc .gt. 0.0) then ecawin = cloud_frc else ecawin = 1.0 end if ipw = 6 tct = tp(lwin) c----------------------------------------------------------------------- c ... Write debug information about IR "window" cloud height retrieval. if(debug .gt. 1) then write(*,'(''IRW cloud top pressure retrieval'')') write(*,'(''Surface level '',i5)') isp write(*,'(''Surface level calc Tb (31) and obs Tb '',2f10.3)') & ttpp(isp), tw write(*,'(''Window cloud height level '',i4)') lwin write(*,'(''Window cloud fraction '',f10.3)') ecawin write(*,'(''Window cloud top pressure and temperature '', & 2f10.3)') pwin, tct write(*,'(1x)') end if c----------------------------------------------------------------------- return end