How do I adjust the sunrise equation to account for elevation? I have been working with the sunrise and sunset formula, using the equations from Wikipedia. The problem is that, in my usage thereof, it seems that it only works for sea level; if I start with coordinates that correspond to any point above sea level (or below, for that matter), it will still output the sunrise and sunset for my coordinates at sea level.

For example, today (21/01/2018), in Denver, CO (~1mi above sea level), sunrise was at 07:15:28. Yet my equations keep yielding 07:15:41, which is exactly on-target, were Denver at sea level. How do I account for the fact that higher altitudes experience sunrise earlier than lower altitudes of the same coordinates?
Higher elevations by themselves do not change the time of sunrise. 

The horizon at sea level is 90 degrees from the zenith. The horizon at Denver is still an angle of 90 deg from the zenith if you assume that the ground is "flat". In other words, even though you are 1 mile high in Denver, you cannot see the horizon at 0 mile elevation.

If you are on a hill or mountain and looking down so that the distant horizon is more than 90 degrees from the zenith, then sunrise would occur early. If you are in a valley and the sun rises behind a hill or mountain, the sun rises later.

So you need to know the elevation of the observer and horizon (or obstacles). From that you can calculate the altitude of the sky in that direction. From that you can calculate the time of rising.

(edit Jan 24) For points that are close to each other, simple trigonometry can be used.
$$\tan(\theta)=y/x$$ where y is the difference in elevation between points 1 and 2, and x is the distance. Sunrise occurs when the altitude of the Sun is $\theta-sun's\;radius-refraction$.


For more distant points with latitude (lat) and longitude (long), solving for the sides and angles of a triangles gives an approximate solution. (I am sure there are more precise formulas that account for the Earth's shape.) From the figure below,
$$a=radius\;of\;Earth+Elevation1$$
$$b=radius\;of\;Earth+Elevation2$$
$$\cos(\gamma)=\sin(lat1)\sin(lat2)+\cos(lat1)\cos(lat2)\cos(long1-long2)$$
$$c=\sqrt{a^2+b^2-2ab\cos(\gamma)}$$
$$\cos(\alpha)=\frac{b^2+c^2-a^2}{2bc}$$
$$\theta=\alpha-90$$
and sunrise occurs when the altitude of the sun is $\theta-sun's\;radius-refraction$. Naturally, you need to check all locations along the line of sight between the observer at point 1 and the obstruction at point 2 to find the highest obstruction.