subroutine getrng(lmdain,pteran,pcloud,grref,clref,ramcor, 1 lprint,rmcrgr,rmcrcl) c c*********************************************************************** c c getrng c c march, 2001 by charlie wellemeyer ssai corporation c c purpose c interpolate appropriate Ring corrections in reflectivity and pres c c method c perform simple linear interpolations in reflectivity and pressure c for the ground case using the 1 and 0.7 atm values and for the cloud c case using values bracketing the target pressure. c c variables c name type i/o description c ---- ---- --- ----------- c arguments c lmdain i*4 i wavelength index for 12 channels c pteran r*8 i terrain pressure c pcloud r*8 i cloud top pressure c grref r*8 o ground reflectivity c clref r*8 o cloud reflectivity c ramcor r*4 i raman scattering corrections c rmcrgr r*8 o interpolated raman correction for surface c rmcrcl r*8 o interpolated raman correction for cloud c c internal c iprofl i*4 profile index c lamda i*4 wavelength index for 8 channels c c*********************************************************************** c implicit none c c -- input parameters real pteran,pcloud,grref,clref real ramcor(9,6) integer lmdain, lamda logical lprint(30) c -- internal parameters real ps(4), fracp, fracr integer ip c -- output parameters real rmcrgr,rmcrcl c data ps/1.0,0.7,0.4,0.25/ c if (lprint(26)) write (6,1000) lmdain,pteran,pcloud, 1 grref,clref,ramcor c c lmdain references al 12 wavelngths ring is for the longest 8 c lamda = lmdain - 4 c c do cloud correction first: find bracketing pressures c ip = 1 100 continue ip = ip + 1 if(ps(ip).le.pcloud) go to 200 if(ip.lt.4) go to 100 c c interpolate raman corrections to cloud pressure c 200 continue fracp = (ps(ip-1)-pcloud)/(ps(ip-1)-ps(ip)) rmcrcl = ramcor(lamda,ip-1)*(1.0-fracp)+ramcor(lamda,ip)*fracp c c if ground reflectivity is high, use 80% and interp in press c (refl dependence is such that explicit interp does not help) c fracp = (1.0d0 - pteran) / 0.3d0 if(grref.gt.0.15) then rmcrgr = ramcor(lamda,1)*(1.0d0-fracp)+ramcor(lamda,2)*fracp else c c else use 15% corrections in pressure interpolation c rmcrgr = ramcor(lamda,5)*(1.0d0-fracp)+ramcor(lamda,6)*fracp endif c if (lprint(26)) then write (6,1100) fracp, fracr, ip, rmcrgr, rmcrcl endif c c convert to fractional form c rmcrgr = rmcrgr / 100.0 rmcrcl = rmcrcl / 100.0 c return c c format statements c 1000 format (/'Subroutine getrng'/'Input: lamda = ',i8, 1 ' pteran = ',f8.4,' pcloud = ',f8.4,' grref = ',f8.4/ 2 ' clref = ',f8.4,' ramcor = ',6(/8f8.3)) 1100 format ('Output: fracp = ',f8.4,' fracr = ',f8.4, 1 ' ip = ',i8, ' rmcrgr = ',f8.2,' rmcrcl =',f8.2) c end