# WEM | Water Engineering

Applied Ecohydrology

### Sidebar

hydro:solar-declination

# 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 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.

solar-declination.py
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()