subroutine radhigh(sza_v,az_v,sat_v,rs_v,outrad,outtcl,nout, 1 success) c c author: edward celarier c procedure name: radhigh c procedure type: fortran subroutine c version date: 27.vi.97 c c purpose: c use interpolation of the high-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 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 rs_v r8 i frac surface reflectivity 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, nrs_p parameter(nsza_p=10, naz_p=7, nsat_p=9, ntcl_p=6, nrs_p=5) c -- calling parameters real*8 sza_v, az_v, sat_v, rs_v real*8 outrad(0:ntcl_h-1), outtcl(0:ntcl_h-1) integer*4 nout logical success c -- common blocks integer*4 nsza_h, naz_h, nsat_h, ntcl_h, nrs_h real*8 sza_h(0:nsza_p-1), az_h(0:naz_p-1), sat_h(0:nsat_p-1), & tcl_h(0:ntcl_p-1), rs_h(0:nrs_p-1), & rad_h(0:nsza_p-1, 0:naz_p-1, 0:nsat_p-1, 0:ntcl_p-1, 0:nrs_p-1) common /radhighcom/ sza_h, az_h, sat_h, tcl_h, rs_h, rad_h, & nsza_h, naz_h, nsat_h, ntcl_h, nrs_h c -- local variables real*8 szacoef(0:3), azcoef(0:3), satcoef(0:3), rscoef(0:3) integer*4 sza_0, szadeg, szain integer*4 az_0, azdeg, azin integer*4 sat_0, satdeg, satin integer*4 rs_0, rsdeg, rsin real*8 sum integer*4 itcl, isza, iaz, isat, irs nout= ntcl_h call lagrangeco(sza_v,sza_h,nsza_h,sza_0,szadeg,szacoef,szain) call lagrangeco(az_v, az_h, naz_h, az_0, azdeg, azcoef, azin) call lagrangeco(sat_v,sat_h,nsat_h,sat_0,satdeg,satcoef,satin) call lagrangeco(rs_v,rs_h,nrs_h,rs_0,rsdeg,rscoef,rsin) do itcl=0, ntcl_h-1 sum=0.d0 do isza= 0, szadeg do iaz= 0, azdeg do isat= 0, satdeg do irs= 0, rsdeg sum= sum + & ( & szacoef(isza)*azcoef(iaz)*satcoef(isat)*rscoef(irs) & ) * & ( & rad_h(isza+sza_0,iaz+az_0,isat+sat_0,itcl,irs+rs_0) & ) enddo enddo enddo enddo outrad(itcl)= sum outtcl(itcl)= tcl_h(itcl) enddo success=.true. return end