subroutine radlow(rs,sza_v,az_v,sat_v,pt_v,outrad,outtcl,nout, 1 success) c c author: edward celarier c procedure name: radlow c procedure type: fortran subroutine c version date: 27.vi.97 c c purpose: c use interpolation of the low-radiance table to generate a set c of (cloud optical thickness, radiance) pairs for subsequent use c in determining cloud optical thickness from the radiance. c c calling parameters: c name type i/o units description c -------- ---- --- ----- -------------- c rs r8 i frac surface reflectivity c sza_v r8 i deg solar zenith angle c az_v r8 i deg solar-fov-satellite azimuth angle c sat_v r8 i deg satellite zenith angle c pt_v r8 i atm terrain pressure c outrad r8 o i/f radiances at reflectivity wavelength c outtcl r8 o corresponding cloud optical thicknesses c nout i4 o number of elements in outrad & outtcl c success l o successful completion flag c c c external routines required: c lagrangeco determine appropriate degree and coefficients c for lagrange interpolation. c c notes & caveats: c c revision history: c 27.vi.97 documentation added (eac). c c============================================================================ implicit none integer*4 nsza_p, naz_p, nsat_p, ntcl_p, npt_p parameter(nsza_p=11, naz_p=7, nsat_p=9, ntcl_p=5, npt_p=2) c -- calling parameters real*8 rs, sza_v, az_v, sat_v, pt_v real*8 outrad(0:ntcl_l-1), outtcl(0:ntcl_l-1) integer*4 nout logical success c -- common blocks integer*4 nsza_l, naz_l, nsat_l, ntcl_l, npt_l real*8 sza_l(0:nsza_p-1), az_l(0:naz_p-1), sat_l(0:nsat_p-1), & tcl_l(0:ntcl_p-1), pt_l(0:npt_p-1), & rad_l(0:nsza_p-1, 0:naz_p-1, 0:nsat_p-1, 0:ntcl_p-1, 0:npt_p-1), & tprm_l(0:nsat_p-1, 0:ntcl_p-1, 0:npt_p-1), & flxd_l(0:nsza_p-1, 0:ntcl_p-1, 0:npt_p-1), & sbar_l(0:ntcl_p-1, 0:npt_p-1) common /radlowcom/ sza_l, az_l, sat_l, tcl_l, pt_l, & rad_l, flxd_l, tprm_l, sbar_l, & nsza_l, naz_l, nsat_l, ntcl_l, npt_l c -- local variables real*8 szacoef(0:3), azcoef(0:3), satcoef(0:3), ptcoef(0:3) integer*4 sza_0, szadeg, szain integer*4 az_0, azdeg, azin integer*4 sat_0, satdeg, satin integer*4 pt_0, ptdeg, ptin real*8 sum integer*4 itcl, isza, iaz, isat, ipt nout= ntcl_l call lagrangeco(sza_v,sza_l,nsza_l,sza_0,szadeg,szacoef,szain) call lagrangeco(az_v, az_l, naz_l, az_0, azdeg, azcoef, azin) call lagrangeco(sat_v,sat_l,nsat_l,sat_0,satdeg,satcoef,satin) call lagrangeco(pt_v,pt_l,npt_l,pt_0,ptdeg,ptcoef,ptin) do itcl=0, ntcl_l-1 sum=0.d0 do isza= 0, szadeg do iaz= 0, azdeg do isat= 0, satdeg do ipt= 0, ptdeg sum= sum + & ( & szacoef(isza)*azcoef(iaz)*satcoef(isat)*ptcoef(ipt) & ) * & ( & rad_l(isza+sza_0,iaz+az_0,isat+sat_0,itcl,ipt+pt_0)+ & ( & rs*tprm_l(isat+sat_0,itcl,ipt+pt_0)* & flxd_l(isza+sza_0,itcl,ipt+pt_0) & ) / & ( & 1.D0 - rs*sbar_l(itcl,ipt+pt_0) & ) & ) enddo enddo enddo enddo outrad(itcl)= sum outtcl(itcl)= tcl_l(itcl) enddo success=.true. return end