FUNCTION eryth(sza, az, sat, pt_ifov, pt_site, & rs_ifov, rs_site, rad, oz, p, q, success) c c PROCEDURE NAME: eryth c PROCEDURE TYPE: fortran function c VERSION DATE: 27.VI.97 c c PURPOSE: c Calculates the erythemally-weighted, diurnally- and spectrally c integrated UV exposure using lookup tables. c c Exposures are calculated to be corrected for the effect of cloud c cover. c This code allows the flux to be estimated at a particular overpass c site that is not exactly collocated with the TOMS ifov. c c CALLING PARAMETERS: c Name Type i/o units Description c -------- ---- --- ----- -------------- c eryth R8 o arb. "Erythemal Exposure" c sza R8 i deg Solar zenith angle of TOMS observation c az R8 i deg Azimuth angle of TOMS observation c sat R8 i deg Satellite zenith angle of TOMS obs'n. c pt_ifov R8 i atm Terrain pressure at centroid of c TOMS IFOV. c pt_site R8 i atm Terrain pressure at "overpass" site. c rs_ifov R8 i frac. Surface reflectivity at TOMS IFOV c rs_site R8 i frac. Surface reflectivity at "overpass" site c rad R8 i norm. I/F ratio (calc'd from N-value) at c the reflectivity wavelength (360 or c 380 nm) c oz R8 i DU TOMS ozone (above terrain) c p R8 i cos(latitude - solar dec. ang.) c q R8 i cos(latitude + solar dec. ang.) c success L o successful completion flag. c c EXTERNAL ROUTINES REQUIRED: c profoz calculates the TOMS profile ozone corresponding to the c TOMS ozone above the surface. c taucloud calculates putative cloud optical thickness c erythinterp Calculates the erythemal exposure. c c NOTES & CAVEATS: c No exposure is calculated (0.d0 is returned) for sza > 75 deg. c If the exposure is to be calculated at the IFOV centroid, just set c pt_site=pt_ifov and rs_site=rs_ifov . c c REVISION HISTORY: c 27.VI.97 Documentation added (eac). c c============================================================================ IMPLICIT NONE c----------------------------------------------------------------------- c Calling parameters c REAL*8 eryth, sza, az, sat, pt_ifov, pt_site, rs_ifov, rs_site REAL*8 rad, oz, p, q LOGICAL success c----------------------------------------------------------------------- c Local variables c REAL*8 tcl, taucloud REAL*8 poz, profoz REAL*8 exposure, erythinterp IF (sza .GT. 75.) THEN eryth=0.d0 RETURN END IF tcl= taucloud(sza,az,sat,pt_ifov,rs_ifov,rad,success) IF(.NOT.success) GOTO 903 poz= profoz(oz, pt_ifov, success) IF(.NOT.success) GOTO 904 exposure= erythinterp(poz, pt_site, rs_site, tcl, p, q) eryth= exposure RETURN 903 CONTINUE WRITE(6,*)'Error calculating the cloud optical thickness.' RETURN 904 CONTINUE WRITE(6,*)'Error calculating the profile ozone.' RETURN END