# WEM | Water Engineering

Applied Ecohydrology

### Sidebar

hydro:sunset-hour-angle

# Sunset hour angle

The sunset hour angle is given by:

$$\omega_s = arccos(-tan(\phi)*tan(\delta))$$

where $\phi$ is the latitude of the site. The latitude is positive for the northern hermisphere and negative for the southern hemisphere. The symbol $\delta$ is the solar declination in radians. The sunset hour angle is needed for the calculation of daylight hours.

For a given latitude $\phi$ and using the solar declination as a function of the Julian day number $J$ the sunset hour angle can be calculated with the following Python code. Exampe: latitude = 48 degrees north.

sunsetangle.py
from pylab import *
from numpy import *
def sunsetangle(latitude,J):
ds=0.4093*sin(2*pi/365*J-1.405)      # to be replaced by class
sha=arccos(-tan(latitude)*tan(ds))
return sha
latitude=48
J=arange(1,365,1)
plot(J,sunsetangle(latitude,J))
ytext = ylabel('sunset hour angle')
xtext = xlabel('Julian day')
show()
hydro/sunset-hour-angle.txt · Last modified: 2020/10/22 07:51 by kuellsc