en:hydro:daylight-hours
Daylight hours
The maximum possible daylight hours can be calculated as:
$$ N = \frac {24}{\pi}*\omega_s $$
where $\omega_s$ is the sunset hour angle in radians.
The following Python code demonstrates the calculation of possible daylight hours based on the calculation of sunset hour angles that depend on the calculation of solar declination
- daylighthours.py
from pylab import * from numpy import * def daylighthours(latitude,J): ds=0.4093*sin(2*pi/365*J-1.405) # to be replaced by class sha=arccos(-tan(latitude)*tan(ds)) # to be replaced by class dh=24/pi*sha return dh latitude=23 J=arange(1,365,1) plot(J,daylighthours(latitude,J)) ytext = ylabel('daylight hours') xtext = xlabel('Julian day') show()
/usr/www/users/uhydro/doku/data/pages/en/hydro/daylight-hours.txt · Last modified: 2024/04/10 10:02 (external edit)