Correcting for sun diameter and refraction in sunrise/sunset equations

In summary, the conversation discusses the use of a C library for solar position calculations and the need to adjust the function for sunrise and sunset times to account for the sun's diameter and atmospheric refraction. The solution involves modifying the computation of the sunset hour angle in the 'ssha()' function of the library. This adjustment has been tested and found to be accurate in comparison to Weather.com.
  • #1
irotas
6
0
I am using the following C library for a variety of solar position calculations:
http://rredc.nrel.gov/solar/codesandalgorithms/solpos/

In the library, they use the function srss() to compute sunrise and sunset times.

Unfortunately, it seems that their equation is for the time that the center of the sun reaches 0 elevation, and completely ignores the diameter of the sun and atmospheric refraction.

I would like to adjust the srss() function to account for these effects. I found a good explanation online for the required adjustment:
"Sunrise or Sunset is defined for a geocentric altitude of -50 arc minutes; 34 arc minutes is to correct for atmospheric refraction and 16 arc minutes is to correct for the Sun's semidiameter" (although this seems a little suspicious since the refraction depends on atmospheric conditions and the sun is not always the same distance from the earth, but it's probably a decent approximation)

I also found online the angular speed of the earth, which is 7.2921159 × 10-5 radians/second.

My first thought was to simply calculate how long it takes the Earth to rotate 50 arc minutes at the given angular speed, but this isn't correct since the sun doesn't rise/set orthogonally to the horizon.

If there was a way to calculate the angle of the tangent of the trajectory of the sun just as it hits 0 elevation, it may be possible to use a linear approximation to determine how much of an correction to make.

It may also be possible that I'm making this entirely too complicated and there's an easier solution. Or maybe it's much harder than I think. In any case, it's been fun to ponder about and I'm hoping someone here can offer some advice.

Thanks!

-Adam

References:
http://www.adeptscience.co.uk/products/mathsim/mathcad/add-ons/free_ebooks/astro_form_samp.htm
http://hypertextbook.com/facts/2002/JasonAtkins.shtml
 
Last edited by a moderator:
Astronomy news on Phys.org
  • #2
I found a solution:
http://en.wikipedia.org/wiki/Sunrise_equation#Hour_Angle

The correction can by made by modifying how ‘solpos’ computes the cosine of the sunset hour angle. In function ‘ssha()’, simply modify the computation of ‘cssha’ to account for the sine of -50/60 degrees
Original: cssha = -tdat->sl * tdat->sd / cdcl;
Corrected: cssha = (-0.014543898 - tdat->sl * tdat->sd) / cdcl;

The resulting sunrise/sunset calculations have been compared with Weather.com for a variety of locations at all seasons. Computed times are never more than 1 minute off, and are usually exactly the same.
 

Related to Correcting for sun diameter and refraction in sunrise/sunset equations

1. What is the purpose of correcting for sun diameter and refraction in sunrise/sunset equations?

The purpose of correcting for sun diameter and refraction in sunrise/sunset equations is to account for the apparent size and bending of light as it passes through Earth's atmosphere. This is necessary in order to accurately calculate the true position of the sun at sunrise and sunset.

2. How does the sun's diameter affect sunrise/sunset times?

The sun's diameter plays a role in sunrise/sunset times because it affects the amount of time it takes for the top edge of the sun to appear or disappear on the horizon. As the sun's apparent size changes throughout the day, this can impact the calculated times for when the sun rises and sets.

3. What is refraction and how does it impact sunrise/sunset calculations?

Refraction is the bending of light as it passes through different mediums, such as Earth's atmosphere. This can cause the sun's apparent position to be slightly different than its true position, which can impact the calculated times for sunrise and sunset.

4. How do scientists account for sun diameter and refraction in sunrise/sunset equations?

Scientists use complex mathematical formulas to calculate and correct for sun diameter and refraction in sunrise/sunset equations. These calculations take into account factors such as atmospheric conditions and the sun's position in the sky.

5. Are there any other factors that need to be considered when calculating sunrise/sunset times?

Yes, in addition to sun diameter and refraction, other factors such as the observer's location on Earth, the time of year, and the topography of the horizon may also need to be taken into account when calculating sunrise/sunset times.

Similar threads

  • Astronomy and Astrophysics
Replies
6
Views
2K
Replies
8
Views
7K
  • Astronomy and Astrophysics
Replies
7
Views
5K
  • Astronomy and Astrophysics
Replies
3
Views
2K
  • Astronomy and Astrophysics
Replies
8
Views
4K
  • Introductory Physics Homework Help
Replies
19
Views
4K
  • Sci-Fi Writing and World Building
Replies
9
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
20K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Replies
17
Views
4K
Back
Top