program plancky
C
C find planck spectrum.
C
parameter(n1=190000,nd=190000,nh=190000)
integer i,nbod
real x(n1),y(n1),z(n1),h,c,lambda,t,k,planck,e,
@ m(n1),potsum,pot,r(n1),pot2sum,pot2,rr,ss,ksum,kk,v(n1)
h=6.6e-27
k=1.4e-16
c=3e10
t=313.
write(*,*) 'Input temperature duh:'
read(5,*) t
e=2.7182818
C calculate the planck spectrum.
C
open(1,file='planck.dat')
do lambda=-7,7,0.01
c note, lambda is the *log* of the wavelength here...
planck=2.0*h*c*c/(10.**lambda)**5
write(*,*) lambda, planck
planck=planck*1.0/(e**(h*c/((10**lambda)*k*t)) -1.0)
write(1,*) lambda, planck
enddo
10 format(1x,i7,1x,i1,3x,1f3.0)
12 format(i7,2x,i4,2x,i4)
111 format(1pe16.8,6(1pe23.15))
close(1)
end