When the sun lines up with Barcelona: sunrise behind the Torre Glòries, sunset down the Diagonal
Give the days you will be in Barcelona. For each one, the page finds the minutes when the city lines up with the sun, and where to stand to see it: the sun coming out from behind the Torre Glòries, setting at the far end of the Diagonal, or shining the whole length of Cerdà's streets.
Example: Sant Jordi, 23 April 2027
23 April 2027
07:21
The sun comes out from behind the Torre Glòries
In short: from the Diagonal near Carrer d’Aragó and Carrer de Sardenya, the sun comes out from behind the Torre Glòries on 21–23 April and 20–22 August in 2027, around 07:20.
Avinguda Diagonal, the pedestrian stretch near Carrer d’Aragó and Carrer de Sardenya
On your days the sun neither rises behind the Torre Glòries nor rises or sets at the end of the Diagonal. The moment above is the best you have.
Share this page
The streets of the Eixample never line up with the rising or setting sun. They run at 45.0° and 135.2° from north, and in Barcelona the sun only ever rises between 57.1° and 121.1° and sets between 239.0° and 303.0°. The Avinguda Diagonal cuts across the grid at 71.7°, inside those arcs: on 55 days in 2027, the sun rises behind the Torre Glòries or rises or sets at the far end of the avenue.
In short: from the Diagonal near Carrer d’Aragó and Carrer de Sardenya, the sun comes out from behind the Torre Glòries on 21–23 April and 20–22 August in 2027, around 07:20.
Your days, one by one
Each day, with its moments in the order they are worth getting up for. All times are Barcelona time.
#Why the Diagonal, and not the streets of the Eixample?
Ildefons Cerdà laid out the Eixample grid at an angle to the compass. Measured on OpenStreetMap, its 36 streets running from the mountain to the sea lie at 135.2°, and its 26 streets parallel to the sea at 45.0°. Barcelona's sun never gets there: sunrise moves through the year between 57.1° (June) and 121.1° (December), sunset between 239.0° and 303.0°. All four directions of the grid fall outside those arcs, so on no street of the Eixample does the sun ever rise or set at the far end.
The Diagonal is different. From Plaça de Francesc Macià to the sea, the avenue runs 6.3 km in a straight line at 71.7°, inside the arc of sunrise; looking the other way, at 251.7°, the same line falls inside the arc of sunset. Twice a year the sun rises at its sea end; twice more it sets at its mountain end.
Yellow: the arc of sunrise through the year. Violet: the arc of sunset. Thin dark lines: the grid's directions, which the sun never reaches at sunrise or sunset.
The map shows the real streets. The button below takes the sun through a whole year: the lines of sunrise and sunset turn, and on the days they line up, the Diagonal lights up. Tap a point on the avenue to see its days.
On 19 April 2024 at 07:19, Pere López Brosa photographed the sunrise from the Diagonal, with the Torre Glòries at the far end of the avenue. His phone recorded the time to the second and a GPS position. The page's model was asked to rebuild the same view: buildings from OpenStreetMap, set on the official terrain model of Spain's National Geographic Institute, the 144.4 m tower 1.17 km away, and the sun to the second.
The photograph matches the model from a spot about 30 metres north-west of the GPS fix, an ordinary error for a phone. From there the tower has exactly the width it has in the picture, the gap of sky to its right has the height it has in the picture, and the model says the first edge of the sun appears in that gap at 07:19:30. The photographs were taken at 07:19:28 and 07:19:33.
Pere López Brosa, 19 April 2024, 07:19:33 (Wikimedia Commons, CC BY-SA 4.0). The dotted circle is where the model puts the sun at the same second: the tower is the reference, and the scale, 126.2 pixels per degree, comes from the lens recorded in the file. CommonsThe same second, calculated: OpenStreetMap buildings on the IGN terrain, the tower and the sun.
The same model, from the same spot, says the sun comes out from behind the tower on 21–23 April and 20–22 August in 2027. Sant Jordi, 23 April, falls inside the window every year to 2030. The spot is the pedestrian stretch of the Diagonal near Carrer d’Aragó and Carrer de Sardenya, a few hundred metres from the Sagrada Família.
The windows move with where you stand. Closer to the tower, the sun passes behind it earlier in April; further away, towards Passeig de Gràcia, later. Along the whole avenue, sunrise behind the tower falls on 20–28 April and 15–23 August in 2027. Only the photographed spot is checked; the others are calculated.
The grid misses the sun at sunrise and sunset, but it catches it during the day. Twice a day the sun stands exactly in line with the streets: in the morning at the end of the streets that run down to the sea, in the afternoon at the end of the streets parallel to the sea. At that moment the buildings' shadows fall parallel to the pavements and the light reaches the whole length of the street.
Winter shows it best. On 15 December the sun lines up with the streets that run to the sea at 09:31, with the sun only 11.2° above the horizon, and with the streets parallel to the sea at 16:03, at 11.0°; the plane trees are bare. The streets are 21 m from façade to façade and the buildings about 24 m tall. By the page's estimate for a street of that width and height, for about 55 minutes around each of those times at least half of its width is in sun along its whole length. Trees and differences between buildings are left out.
In summer the same minutes come close to midday, with the sun 49–67° up: the street is lit anyway and there is little to see. The page ranks Cerdà's minutes among the good moments only while the sun is at most 25° up, from 25 October to 17 February.
Stand on the pavement or on a pedestrian stretch, never in the roadway. Carrer del Consell de Cent, largely pedestrian, works well for the afternoon, facing Montjuïc.
The streets as measured (OpenStreetMap): bearing from north, width from façade to façade and the median height of the buildings.
The windows on the Passion side, facing south-west, are glazed in warm colours. In the 42 photographs from Wikimedia Commons with a recorded time in which the stone carries clear orange, red and yellow patches, the sun was always in the south-west: from around midday to early afternoon between September and April, from about 15:00 or 16:00 between May and August. The sharpest patches came in the last hours before closing, with the sun low. In the morning, with the sun on the other side, a few photographs show only mixed patches of every colour.
The times in the plan are an estimate from the sun's position in those photographs, for sunny days only and within the basilica's opening hours (on Saturdays it closes at 18:00 all year). The blue and green glow of the windows on the Nativity side appears in photographs taken at very different hours, including with the sun behind that wall, so the page promises no blue light at any particular time.
Every day of the year, with its alignments. In 2027 the sun comes out from behind the tower on 20–28 April and 15–23 August, rises at the far end of the avenue on 24 April – 5 May and 8–19 August, and sets at its far end on 7–17 February and 24 October – 4 November. The dates shift by a day at most from one year to the next. Tap a day to put it into your plan at the top.
Sun behind the tower
Sunrise at the end of the avenue
Sunset at the end of the avenue
Sun behind the tower: 20–28 April and 15–23 August
Sunrise at the end of the avenue: 24 April – 5 May and 8–19 August
Sunset at the end of the avenue: 7–17 February and 24 October – 4 November
If your days catch no alignment, there is still sunrise from the Barceloneta beach. To the east there is nothing but sea: every day of the year the sun comes up out of the water, between 06:19 (11 June) and 08:19 (30 October, the last day of summer time). The time on the page is the moment the first edge of the disc appears; haze over the sea often delays it by a few minutes.
#How it is calculated, and what the page does not claim
The sun: the NOAA equations, the same as on the page about the sun at the end of Bucharest's streets, where they were checked against NASA JPL Horizons. Times are Barcelona time, with summer time.
The city: 65,688 buildings from OpenStreetMap, with their height (or their number of floors × 3.1 m), set on the 5 m terrain of Spain's National Geographic Institute; the hills and the sea beyond the city come from the 30 m Copernicus model. From each point of the Diagonal, every 0.05°, the model finds the highest object in front of you.
An alignment counts only if the sun appears (or disappears) in the gap at the end of the avenue, at most 3° above the horizon, with the avenue running straight for at least another 1.5 km. Sunrise behind the tower counts when the tower covers part of the disc at the moment it appears, seen from at least 600 m away.
What the page does not claim: that the sun rises "out of the sea" at the end of the Diagonal. The model sees a thin strip of sea horizon on the avenue's axis, but trees, lamp posts and haze over the sea are not in the model and no photograph shows it, so anything below 0.5° is treated as blocked. Nor that Cerdà aligned the grid with the sun; no source says so.
Uncertainty: a third of the buildings have no height in OpenStreetMap. 7,063 take the median height of their neighbours and 15,854 are set at 9 m, nearly all of them more than 300 m from the Diagonal (only 387 are closer). An error of a few metres on the façades at the far end of the avenue moves a window by a day or two. Trees are not in the model.
The cloud forecast comes from Open-Meteo and appears only for days in the next two weeks.