!+ Function to calculate the Planck function.
!
! Method:
!	Straightforward.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	 Version 	   Date	  		Comment
!   
!	 1.0		   12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77 with extensions listed in documentation. 
!
!- ---------------------------------------------------------------------
      FUNCTION PLANCK(T, LAMBDA)
!
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/physical_constants_pp.ccf'
!
!     DUMMY ARGYUMENTS.
      REAL*8	!, INTENT(OUT)
     &     PLANCK
!             NAME OF FUNCTION
      REAL*8	!, INTENT(IN)
     &     T
!             TEMPERATURE
     &   , LAMBDA
!             WAVELENGTH
!
!     LOCAL VARIABLES.
      REAL*8
     &     EXPONENTIAL
!             INVERSE EXPONENTIAL FACTOR
!
!
!     EVALUATE A NEGATIVE EXPONENTIAL TO ENSURE CONDITIONING.
      EXPONENTIAL=EXP(-(H_PLANCK*C_LIGHT/K_BOLTZMANN)/(LAMBDA*T))
      PLANCK=2.0D+00*H_PLANCK*C_LIGHT**2*EXPONENTIAL
     &   /((LAMBDA**5)*(1.0D+00-EXPONENTIAL))
!
!
      RETURN
      END
