Functions for calculating daily solar radiation and