0
$\begingroup$

I made a tool to get Noon, Sunrise, and Sunset times But sometimes errors appear like at:

Lat: N 67°8'5.07''

Long: W 121°10'17.93'

Date: 2024/06/14 15:07 (UTC-7)

Because there is no sunrise or sunset times at this location and date and all I need to specify the reason for these either "the sun is circumpolar" or "The sun never rises" to write it in the debug log.

So, Is there a way to know if the sun is circumpolar or never rises at a specific date and specific location?

$\endgroup$
9
  • 1
    $\begingroup$ How do you get the rise and set times? You surely have the geocentric coordinates of the Sun. Thus compare its declination value against the latitude $\endgroup$ Commented Sep 30 at 15:50
  • $\begingroup$ Yes, I know it's Right Ascension, Declination, Altitude, and Azimuth at any date and location I want. $\endgroup$
    – Ahmed Dyaa
    Commented Sep 30 at 15:54
  • $\begingroup$ Should I compare it's declination value against the latitude for both cases? And what is the formula for comparison? $\endgroup$
    – Ahmed Dyaa
    Commented Sep 30 at 15:58
  • 1
    $\begingroup$ What "error" are you getting? I think the error tells you that there is no Sunrise. $\endgroup$
    – JohnHoltz
    Commented Sep 30 at 16:49
  • 2
    $\begingroup$ In your equations that calculate Altitude from RA & Declination, when the sun doesn't rise or doesn't set you'll get a step where you need to get the arccos of a value that's not in the range [-1, 1]. So you need to test that value before you try to calculate its arccos (or use some kind of exception handling). $\endgroup$
    – PM 2Ring
    Commented Sep 30 at 18:14

1 Answer 1

3
$\begingroup$

The declination and latitude are sufficient to determine if an object rises and sets, is circumpolar, or never rises. Based on the following figure for the northern hemisphere,

  • The object is circumpolar if the declination is closer to the pole than 90-latitude.
  • The object never rises if the declination is farther from the equator than latitude-90.
  • The object rises and sets if the declination is between those extremes.

If including atmospheric refraction, the declination needs to be adjusted so that the refracted object has 0 altitude when it touches the horizon.

The diameter of the Sun also needs to be included so that the top limb, not the center, appears at 0 altitude when it touches the horizon.

Cut through the sky along the plane of the meridian

$\endgroup$
4
  • $\begingroup$ Thanks for you answer, 1- so if declination >= 90 - |Latitude| the sun must be circumpolar, and if declination > |Latitude| - 90 the sun must never rise? 2- and if I had the atmospheric refraction value I should recalculate the declination as adjustedDeclination = declination - atmospheric refraction before checking? 3- declination's value changes throughout the day so at what time should I check if the sun is circumpolar or never rises? $\endgroup$
    – Ahmed Dyaa
    Commented Oct 3 at 5:33
  • $\begingroup$ 1 - close except you need to consider the sign of the declination also. May be easier to use If Lat >0 then ... else ....End If than try to create 1 equation that covers both hemispheres. 2 - is correct, and you can subtract the semi-diameter if you do not account for that elsewhere. (continued) $\endgroup$
    – JohnHoltz
    Commented Oct 3 at 17:24
  • $\begingroup$ 3- The Sun moves more in right ascension per day than in declination. You need to compensate for the RA, too. Ideally you use the RA and Dec at the time of rise, time of transit, and time of set. Some how I derived a linear equation (many years ago) to interpolate the times based on the RA and Dec at 0 hr and 24 hr. For example, RA = RA0+(RA24-RA0)/24*t. Transit is easy since (sidereal time)-(RA) = 0. This gives (sidereal time at 0 + 1.00273*t)-(RA0+(RA24-RA0)/24*t)=0. Solve for t. I probably did something similar for rising and setting by calculating what hour angle was needed at 0 and 24 hr $\endgroup$
    – JohnHoltz
    Commented Oct 3 at 17:29
  • $\begingroup$ 3 - continued. and interpolating to find at what time t the required hour angle occurred. The Moon moves much faster and the change in RA and Dec are not linear. For the Moon (or other fast moving body) you can calculate the RA and Dec at three times (0, 12, 24 hr) and write a quadratic equation for the RA versus time and Dec vs time. Then the solution becomes a direct solution to the quadratic equation. If the Sun (or Moon) is circumpolar (or below the horizon) at 0 and 24 hrs based on declination, you know is it above (or below) the horizon all day long. $\endgroup$
    – JohnHoltz
    Commented Oct 3 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .