Find the true location of the sun in relation to your reference of the horizon if the sun is observed to make an angle of theta with the horizon. This is not an easy question. Use Snell’s law to take into account the aberration and bending of light rays as they pass through the earth’s atmosphere and make assumptions on the index of refraction as the atmosphere packs up. Any ideas on how to do this?

The derivation is rather complicated. You will find it at
http://mintaka.sdsu.edu/GF/explain/atmos_refr/integrate.html

What you are looking for it the and "r" in that reference. They derive a formula for it.