How much does height change Maghrib?

In August 2011, during Ramadan, Dubai's Islamic Affairs department gave an unusual ruling. People living above the 80th floor of the Burj Khalifa should wait two minutes longer than the city below before breaking their fast, and those above the 150th floor should wait three.[1] The reasoning was simple. From that high up, you can still see the sun after it has set on the ground.

We wanted to know how well those two numbers hold up, so we computed them.

The calculation

Maghrib begins at sunset, and sunset is later the higher you are, because you can see further round the curve of the Earth. Our prayer-times endpoint takes an elevation and applies it to sunrise and Maghrib. We ran it for Dubai (25.1972°N, 55.2744°E) at several heights, on three dates across the year.

Height above the ground 20 March 21 June 21 December
300 m 2m 27s 2m 45s 2m 43s
452 m 3m 01s 3m 22s 3m 20s
584 m 3m 26s 3m 50s 3m 48s

Each figure is how much later the sun sets than it does at ground level. The tower itself is 828 m tall.

012340100200300400500600700800Height above the ground (m)Minutes later than at ground levelsunset delay
How much later the sun sets as you go up, computed for Dubai on 8 February 2027. The first 100 m are worth a minute and a half. The next 700 m add less than three more.

So the ruling's two and three minutes are the right size. Rounded to the whole minutes a household can act on, they match what the geometry gives.

The curve also shows why the ruling could use two broad bands. Height counts most near the ground. The first 100 m delay sunset by a minute and a half, and you have to climb another 300 m to add the next minute and a half.

What moves and what doesn't

Sunrise moves by the same amount in the other direction, so at 452 m the day is six to seven minutes longer than on the street.

Fajr and Isha are a different matter. Most calculation methods define them by the sun's angle below the horizon, 18° or thereabouts depending on the school.[2] Our engine measures that angle from the horizontal, so height does not change Fajr in our results. Isha moves only under the Umm al-Qura method, where it is set at 90 minutes after Maghrib and so follows it.

The Dubai ruling also asked upper-floor residents to pray Fajr two minutes earlier.[1] That is a judgement about what dawn means for someone looking down on the horizon, and it belongs to the scholars who made it. Our Fajr follows the chosen method's twilight angle, so it does not include that adjustment.

The harder case: a city on a mountain

A tower on a flat coastal plain is the easy case. The ground is at sea level, the horizon is the sea or the desert, and your height above the ground is your height above the horizon.

Now take three high cities. If you pass their elevation above sea level to our API, you get these delays to Maghrib on the March equinox:

City Elevation Delay to Maghrib
Abha, Saudi Arabia 2,270 m 6m 26s
Sana'a, Yemen 2,250 m 6m 19s
La Paz, Bolivia 3,640 m 8m 04s

Those numbers are only right if the horizon you are looking at is down at sea level, and for most of these cities it isn't. Sana'a sits in a highland basin with higher ground around it. La Paz is in a canyon below the Altiplano. From a street in either city, the sun sets behind terrain that is level with you or above you, and the correction for a sea-level horizon does not apply.

Abha is the interesting one. It stands near the edge of an escarpment that drops towards the Red Sea coast, so from the western edge of the city the evening horizon really is far below. From the middle of town it is not.

The elevation that matters is your height above whatever forms your horizon, and no API can work that out from a latitude and longitude. In a tower over a plain, use your height above the ground. On a mountain overlooking lowland or sea, use your height above that. In a basin or a valley, use zero and accept that the hills will hide the sun a little earlier than any table says.

Trying it

curl -H "Authorization: Bearer $THIRDTRAIL_KEY" \
  "https://thirdtrail.life/v1/ephemerides/prayer-times/?lat=25.1972&lon=55.2744&elevation=452&school=uaq&asr_method=shafi&tz=Asia/Dubai"

school is one of mwl, isna, egyptian, uaq or karachi. It is required, because we would rather you chose a school than have us choose one for you. asr_method is shafi or hanafi, and is shafi if you leave it out. The prayer-times endpoint needs a paid plan.

Sources

  1. Gulf News (2011). "Burj Khalifa residents told to fast longer during Ramadan." https://gulfnews.com/uae/burj-khalifa-residents-told-to-fast-longer-during-ramadan-1.848316
  2. PrayTimes.org. "Prayer Times Calculation." http://praytimes.org/calculation

Method: sun positions from JPL DE421 with Skyfield. Sunrise and Maghrib use a horizon lowered by the geometric dip for the height given. Fajr and Isha use the fixed twilight angles of the chosen school. These are astronomical calculations, not religious rulings. Follow your local mosque or authority for the times you observe.

← All posts