====== Solar declination ====== The solar declination is given by: $$ \delta = 0.4093 * sin \left ( \frac {2*\pi }{365}*J-1.405 \right ) $$ where $J$ is the Julian day number. The solar declination is needed to calculate the [[en:hydro:sunset-hour-angle|sunset hour angle]]. The sunset hour angle is needed for the calculation of [[en:hydro:daylight-hours|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()