c===========================================================================

      function planck(wl,t) 1

c     compute planck function at wavelength wl and temperature t.  
c     units are w/m2/sr/micron (note that w/m2/sr/micron = w/cm2/sr/cm)

      parameter (h=6.6262e-27, bk=1.3807e-16, c=2.9979e10)
      parameter (c1=1.e13*2*h*c**2)
      parameter (c2=1.e4*h*c/bk)
c 
      planck=0.
      if(wl.gt.1.) planck=c1/(wl**5*(exp(c2/(wl*t))-1.))
      return
      end