A theoretical model to determine solar and diffuse irradiance in valleys