C
C PURPOSE: CALCULATES PLANCK FUNCTION BNY AT ANGULAR FREQUENCY U, TEMP T
C  (NOTE- U  AND PLANCK ARE IN ANGULAR FREQUENCY UNITS)
C
C INPUTS:
C
C OUTPUTS:
C
C COMMON:
C
C COMMENTS: OCTOBER 6, 1999, P. JUDGE
C 
      FUNCTION PLANCK(Y,T)
C
      INCLUDE 'PREC'
      INCLUDE 'CCONST'
C
      U=Y*0.5/PI
      X=HH*U/BK/T
      IF(X.LT.80.) THEN
        PLANCK=2.0*HH*U/CC*U/CC*U/(EXP(X)-1.0)
      ELSE
        PLANCK=2.0*HH*U/CC*U/CC*U*EXP(-X)
      ENDIF
C
C CONVERT TO ANGULAR FREQUENCIES
C
      PLANCK=PLANCK*0.5/PI
C
      RETURN
      END
C
C**********************************************************************
C
