User Tools

Site Tools


en: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()
/usr/www/users/uhydro/doku/data/pages/en/hydro/sunset-hour-angle.txt · Last modified: 2024/04/10 10:02 by 127.0.0.1