When reading hourly data, the timestamps in the file need to be translated into an internal time variable, based on the following rules:
1.) Convert timestamp to UTC time.
2.) Generate an internal copy of the time variable that is adjusted as follows, such that the solar position angles are computed in the middle of the time interval ΔT, namely:
a.) For weather files with hour-ending timestamps, compute the solar position at t – ½Δ
b.) For weather files with hour-beginning timestamps, compute the solar position at t + ½Δ
3.) Compute the sunrise and sunset times.
a.) If the first irradiance reading interval starts before the sunrise compute that interval’s solar position at the midpoint of [sunrise time, end-of-interval]
b.) If the last irradiance reading interval ends after the sunset, compute that interval’s position at the midpoint of [begin-of-interval, sunset]