FUNCTION eckccf(rt, rs, success) c------------------------------------------------------------------------ c Calling parameters c c Input: REAL*8 rt, rs c Output: REAL*8 eckccf LOGICAL success c======================================================================== c ECKCCF c c Calculates the cloud correction factor of Tom Eck, given a surface c reflectivity rs, and toms reflectivity, rt. c c Reflectivities are given as fractions, not percent. c c------------------------------------------------------------------------ c idiot-check rt and rs c IF (rt .LT. 0. .OR. rt .gt. 1.) GOTO 901 IF (rs .LT. 0. .OR. rs .gt. 1.) GOTO 902 IF (rt .LT. 0.5) THEN eckccf= (1. - rs - rt)/(1. - 2.*rs) ELSE eckccf= (1. - rt) ENDIF success=.TRUE. RETURN c----------------------------------------------------------------------- c Handle error conditions. c 901 WRITE(6,91) rt GOTO 999 902 WRITE(6,92) rs 999 CONTINUE success=.FALSE. RETURN 91 FORMAT(' !!! eckccf: calling parameter rt=',f12.2,' out of range.'/ & ' value must be in [0,1]') 92 FORMAT(' !!! eckccf: calling parameter rs=',f12.2,' out of range.'/ & ' value must be in [0,1]') END