How are the sunset and sunrise times precisely determined?

In the morning, I see light before I can see any portion of the sun. Maybe due to trees, mountains, etc. But even when I am on the beach looking east, out over the ocean, what am I precisely suppose to see to determine the sunrise time? Same with sunset, of course …

Before you can actually see the sun, it would already be visible from straight above you in the sky. The sunlight is scattered in the air above you and provides some light. This is particualrly true if there are clouds overhead, but not right at the horizon since the clouds reflect the sunight well.

In addition due to refraction (bending of the light as it passes through the atmosphere – much like in a prism), you can actually see the sun before it has truly risen in an astonomical sense.

I believe but am not sure that sunrise is defined as the moment the top
of the sun is visible. I have also heard when half the sun is visible

Sunrise time is when the upper limb of the sun appears above the horizon.

This occurs when the sun’s elevation is approximately -0.75 degrees. Why?Because

  • atmospheric refraction makes the sun appear “higher” by around 0.5 degrees, and
  • the sun’s disc is approximately 0.5 degrees of arc, so that the upper limb is 0.25 degrees above the centre.

I take it is the same for the setting sun?