PROGRAM ClimateModel

! Written by Kate T-C
! February 6, 2009  For the Fortran Short Course
! This program solves for the surface temperature of the earth
!   based on energy balance with the sun.

! implicit none

real, parameter :: So = 1367       ! +/-2 W/m**2
real, parameter :: sigma = 5.67E-8 ! W/m**2/K**4
real, parameter :: a = 0.3         ! +/- 0.1 %
real :: Te = 0          ! Solving for this one

Te = (So/4/sigma*(1-a))**0.25

print *, 'Te = ', Te, ' or ', Te-273.15, 'C'
print *, a

END PROGRAM ClimateModel

