Solar declination

The solar declination is given by:

where is the Julian day number. The solar declination is needed to calculate the sunset hour angle. The sunset hour angle is needed for the calculation of possible daylight hours.

The solar declination can be calculated with the following Python code.

from pylab import * def declination(J): ds=0.4093*sin(2*pi/365*J-1.405) return ds J = arange(1,365,1) plot(J,declination(J)) ytext = ylabel('solar declination in radians') xtext = xlabel('Julian day') show()