<p>I'm doing some ecological modelling using a dataset of observations of wildlife taken at a bunch of different locations and times. I want to assess the extent to which these observations are correlated with how much sunlight there was at the respective time and place. So far I have found that the R <code>suncalc</code> package can calculate the sun position (altitude and azimuth angles) at a given place and time, but this is not entirely what I want because many (negative) altitude angles correspond to the same amount of sunlight (zero).</p>
<p>I would like something that can take the altitude and azimuth angles, and/or the location (latitude+longitude) and exact time (date+time of day), and generate a measure of how much light would be expected to reach the Earth's surface on a clear day. To keep it relatively simple, let's assume that clouds or other atmospheric forces are not relevant. I really only need something that works as a relative measure, and anything that strongly indicates the actual amount of sunlight present in a given place and time will work.</p>
<p>Sorry if this is the wrong place to post this. Let me know if you have any recommendations!</p>

CC BY-SA 4.0
2024-12-17T22:27:42.510Z
Can't you just return 0 when the altitude angle is negative? In https://astronomy.stackexchange.com/a/51898/16685 I said "In general, the intensity is proportional to the sine of the horizontal angle, which equals the cosine of the vertical angle". But that ignores atmospheric attenuation.
PM 2Ring
CC BY-SA 4.0
2024-12-17T22:39:31.073Z
I think doing this would be inaccurate enough as to be problematic for my question. If I understand correctly, this would suggest that the middle of the night is just as bright as a few minutes before sunrise (when solar altitude is negative but, in the absence of clouds, it is quite bright). Many of the observations in my dataset come from twilight because this is a good time to observe wildlife. I'd need something that can incorporate this discrepancy. I assume this is related to attenuation in some way but I am not a physicist so don't know for sure
Peter Thompson
CC BY-SA 4.0
2024-12-17T22:47:14.977Z
Ah, Ok. You should mention that in your question. Astronomical twilight is defined to be when the Sun's altitude is -18°. From  https://en.wikipedia.org/wiki/Atmospheric_refraction "By convention, sunrise and sunset refer to times at which the Sun's upper limb appears on or disappears from the horizon and the standard value for the Sun's true altitude is −50′: −34′ for the refraction and −16′ for the Sun's semi-diameter".
PM 2Ring
CC BY-SA 4.0
2024-12-17T22:59:06.127Z
It's not really possible to do an accurate prediction of the amount of light during twilight because the amount of refraction depends on the atmospheric conditions.
PM 2Ring
CC BY-SA 4.0
2024-12-17T23:25:50.227Z
this question https://astronomy.stackexchange.com/questions/59101/calculation-of-solar-eclipse-progress-based-on-time-and-location has a graph that seems to be relevant.
James K
CC BY-SA 4.0
2024-12-18T15:30:01.080Z
Thank you @JamesK, this is useful and I think gets me what I want.
Peter Thompson
<the-sun><earth><light>
Calculate sun brightness as a function of sun position (zenith angle) throughout the day
Peter Thompson
# Calculate sun brightness as a function of sun position (zenith angle) throughout the day

(Asked by: username_0 on 2024-12-17)

I'm doing some ecological modelling using a dataset of observations of wildlife taken at a bunch of different locations and times. I want to assess the extent to which these observations are correlated with how much sunlight there was at the respective time and place. So far I have found that the R `suncalc` package can calculate the sun position (altitude and azimuth angles) at a given place and time, but this is not entirely what I want because many (negative) altitude angles correspond to the same amount of sunlight (zero).

I would like something that can take the altitude and azimuth angles, and/or the location (latitude+longitude) and exact time (date+time of day), and generate a measure of how much light would be expected to reach the Earth's surface on a clear day. To keep it relatively simple, let's assume that clouds or other atmospheric forces are not relevant. I really only need something that works as a relative measure, and anything that strongly indicates the actual amount of sunlight present in a given place and time will work.

Sorry if this is the wrong place to post this. Let me know if you have any recommendations!

**Tags:** the-sun, earth, light

> **Comments:**
> **username_1**: Can't you just return 0 when the altitude angle is negative? In https://astronomy.stackexchange.com/a/51898/16685 I said "In general, the intensity is proportional to the sine of the horizontal angle, which equals the cosine of the vertical angle". But that ignores atmospheric attenuation.  
> **username_0**: I think doing this would be inaccurate enough as to be problematic for my question. If I understand correctly, this would suggest that the middle of the night is just as bright as a few minutes before sunrise (when solar altitude is negative but, in the absence of clouds, it is quite bright). Many of the observations in my dataset come from twilight because this is a good time to observe wildlife. I'd need something that can incorporate this discrepancy. I assume this is related to attenuation in some way but I am not a physicist so don't know for sure  
> **username_1**: Ah, Ok. You should mention that in your question. Astronomical twilight is defined to be when the Sun's altitude is -18°. From  https://en.wikipedia.org/wiki/Atmospheric_refraction "By convention, sunrise and sunset refer to times at which the Sun's upper limb appears on or disappears from the horizon and the standard value for the Sun's true altitude is −50′: −34′ for the refraction and −16′ for the Sun's semi-diameter".  
> **username_1**: It's not really possible to do an accurate prediction of the amount of light during twilight because the amount of refraction depends on the atmospheric conditions.  
> **username_2**: this question https://astronomy.stackexchange.com/questions/59101/calculation-of-solar-eclipse-progress-based-on-time-and-location has a graph that seems to be relevant.  
> **username_0**: Thank you @username_2, this is useful and I think gets me what I want.  

---

## 0 answers

