~ $ cd projects/hot-nights && cat README.md

Hot nights, counted

A night whose lowest temperature stays at 25 °C or above is called a torrid night, and at 20 °C a tropical one: the house does not cool down and nobody sleeps well. The Meteocat publishes the daily minimum of every automatic station it runs. This counts the torrid ones, year by year, and cuts each record in two to see whether it has moved:

Badalona - Museu · 42 m, urban, by the sea · days with a daily minimum of 25 °C or more, whole year
1.3days a year, 2006–2015
6.4days a year, 2016–2025
+5.1days a year, from one half to the other

Days a year

051015202530200520102015202020252005: 0 days, with only 102 of 365 days measured2006: 4 days2007: 0 days2008: 0 days2009: 1 days2010: 0 days2011: 0 days2012: 5 days2013: 1 days2014: 0 days2015: 2 days2016: 0 days2017: 2 days2018: 7 days2019: 1 days2020: 4 days2021: 0 days2022: 14 days2023: 14 days2024: 6 days2025: 16 days2026 so far, to 11 October: 33 days1.3 a year6.4 a year

When in the year they fell

JanFebMarAprMayJunJulAugSepOctNovDec
2026313152
2025547
202424
202359
2022158
2021
20204
20191
20187
20172
2016
20152
2014
20131
20125
2011
2010
20091
2008
2007
200631
2005

The mean daily minimum of each year, °C, in the months chosen

1313.51414.51515.51620102015202020252006: 14.4 °C2007: 13.7 °C2008: 13.5 °C2009: 14 °C2010: 13.1 °C2011: 14.2 °C2012: 13.7 °C2013: 13.4 °C2014: 14.2 °C2015: 14 °C2016: 14 °C2017: 13.9 °C2018: 14.1 °C2019: 13.9 °C2020: 14.3 °C2021: 14 °C2022: 15.2 °C2023: 14.9 °C2024: 14.7 °C2025: 15 °C13.8 °C14.4 °C

The highest daily minimum on record here: 28.8 °C on 23 August 2023, whatever months are chosen.

Source: Servei Meteorològic de Catalunya (XEMA). Dades obertes de la Generalitat de Catalunya. The dataset, at its source. This site keeps sums of the finished years 1988 to 2025, and 2026 so far, to 11 October, last added to on 13 October 2026.

The threshold slides, because what the site keeps is not the count but a histogram of each month's days. Move it down to 20 °C and the nights are tropical; choose another kind of day and the same page counts hot afternoons, frost, or rain. At the end of the list are six of the Meteocat's long series, which reach back to 1950: the long record, below, is drawn from them.

What is in it

The long record

The network's automatic stations reach back to 1988 at the most, and six of the nine only to 2005 or later. The Meteocat's climatologists keep longer series: a day at a time since 1950, every day checked and the whole homogenised, so that a station moved or a thermometer replaced does not show as a step, and blended, where one record breaks off, from the stations around it. And one longer still: Barcelona's mean temperature, month by month, since 1780. It was put together with the University of Barcelona from the records of the doctors who measured the city — the first of them, Francesc Salvà, in his house in carrer de Petritxol — and from the Observatori Fabra, where most of it comes from. Its rain goes back to 1786: by its paper's count, the longest series of rain measured in the Iberian Peninsula.

What follows is a blueprint: the pictures are drawn by nodes wired together, and the dials on the board turn them. Its menu holds a few more questions — where the long line turns, the six long series side by side, the summers since 1780, whether a warm year is a year of warm nights, and the rain since 1786.

Barcelona, since 1780 Barcelona's mean temperature every year since 1780, from the Meteocat's long series of the city. Under it, the Observatori Fabra since 1950, from its checked and homogenised series: the nights that did not cool below the first dial, and the days that reached the second, a bar a year. Turn the dials to 25 and 35 °C for the torrid ones.

Nights from, °C
20
Days from, °C
30
Barcelona's mean temperature, year by year
12141618201750180018501900195020002050yearmean (°C)

mean along year

Source: Servei Meteorològic de Catalunya: the climate series of Barcelona since 1780 (Prohom, Barriendos, Aguilar and Ripoll, 2012). Brought up to date 2026-10-08.

Nights at the Fabra at least as warm as the first dial
02040608019501957196419711978198519921999200620132020yeardays1950: 461951: 131952: 401953: 201954: 91955: 211956: 171957: 201958: 231959: 241960: 111961: 191962: 421963: 181964: 271965: 141966: 101967: 311968: 81969: 241970: 201971: 321972: 91973: 301974: 151975: 241976: 171977: 31978: 111979: 221980: 181981: 191982: 251983: 321984: 51985: 191986: 361987: 401988: 301989: 391990: 341991: 391992: 341993: 201994: 451995: 281996: 181997: 291998: 381999: 352000: 252001: 532002: 262003: 752004: 412005: 432006: 472007: 212008: 392009: 512010: 432011: 342012: 422013: 432014: 392015: 542016: 452017: 562018: 582019: 572020: 582021: 472022: 762023: 612024: 522025: 71

days by year, 76 bars

Source: Servei Meteorològic de Catalunya, CADTEP (Prohom and others, 2023). Brought up to date 2026-10-08.

Days at the Fabra at least as hot as the second dial
02040608019501957196419711978198519921999200620132020yeardays1950: 191951: 31952: 231953: 31954: 21955: 111956: 41957: 71958: 51959: 111960: 21961: 61962: 111963: 91964: 191965: 111966: 51967: 211968: 51969: 181970: 81971: 131972: 31973: 171974: 141975: 191976: 91977: 11978: 51979: 161980: 51981: 121982: 191983: 251984: 81985: 181986: 171987: 271988: 191989: 241990: 201991: 231992: 131993: 211994: 371995: 161996: 121997: 161998: 201999: 172000: 192001: 252002: 152003: 622004: 222005: 212006: 322007: 92008: 212009: 402010: 362011: 192012: 312013: 472014: 92015: 302016: 392017: 312018: 352019: 362020: 322021: 402022: 732023: 492024: 502025: 52

days by year, 76 bars

Source: Servei Meteorològic de Catalunya, CADTEP (Prohom and others, 2023). Brought up to date 2026-10-08.

Barcelona since 1780table246 rows · year, mean, wholeBarcelona's mean temperature,…tablealongyearofmeanand ofa line for eachmean along yearNights from, °Cvaluevalue2020Days from, °Cvaluevalue3030Days of a kindtablestationBarcelona - Obser…kindtropical nightsthresholdmonthstropical nights: daily minimum ≥ 20 °Ctropical nights: daily minimum ≥ 20…Nights at the Fabra at least …tablexyearheightdaysfaint unlessdays by year, 76 barsDays of a kindtablestationBarcelona - Obser…kindhot daysthresholdmonthshot days: daily maximum ≥ 30 °CDays at the Fabra at least as…tablexyearheightdaysfaint unlessdays by year, 76 bars
The blueprint: 8 nodes and 5 wires.
Barcelona, since 1780

Barcelona's mean temperature every year since 1780, from the Meteocat's long series of the city. Under it, the Observatori Fabra since 1950, from its checked and homogenised series: the nights that did not cool below the first dial, and the days that reached the second, a bar a year. Turn the dials to 25 and 35 °C for the torrid ones.

years = barcelona-years
lines "Barcelona's mean temperature, year by year" table: years x: year y: mean
nights-from = dial "Nights from, °C" value: 20
days-from = dial "Days from, °C" value: 30
nights = weather-days station: baic0008 kind: tropical-nights threshold: nights-from
bars "Nights at the Fabra at least as warm as the first dial" table: nights x: year y: days
days = weather-days station: baic0008 kind: hot-days threshold: days-from
bars "Days at the Fabra at least as hot as the second dial" table: days x: year y: days
Where the long line turns

The same 246 years, cut in two at the dial's year: the straight line through the years before the cut, and the one through the years from it on, each as the change it makes a decade. Move the cut, and see how much of the change lives after it.

cut = dial "Cut at" value: 1972
years = barcelona-years
lines "Barcelona's mean temperature, year by year" table: years x: year y: mean
before = keep "Before the cut" table: years column: year is: below value: cut
after = keep "From the cut on" table: years column: year is: at-least value: cut
early = trend table: before y: mean
late = trend table: after y: mean
readout "Before the cut, each decade" value: early.per-ten unit: °C about: "along the straight line through the years before the cut"
readout "From the cut on, each decade" value: late.per-ten unit: °C about: "along the straight line through the years from the cut on"
The six long series, side by side

Every long series at once, a line each, named by its town, by joining the series to where they stand: the days of a kind a year, since 1950. Turn the kind on the board — tropical nights, hot days, frost.

kind = dial "Kind of day" value: tropical-nights
days = weather-days station: all-series kind: kind
names = weather-stations
named = join left: days right: names
lines "Days a year, a line a series" table: named x: year y: days split: municipality
Summers since 1780

One season of every year since 1780: its months kept, then a row a year, the season's mean, and the straight line through it. The dial is a list of the seasons. Winter is December to February, each December counted with its own year.

which = dial "Season" value: summer
months = barcelona-months
only = keep "Only one season" table: months column: season is: equals value: which
years = group "A year a row" table: only by: year value: mean how: mean
lines "The season's mean, year by year" table: years x: year y: mean
trend = trend table: years y: mean
readout "Each decade" value: trend.per-ten unit: °C about: "along the straight line fitted through the years"
Is a warm year a year of warm nights?

Barcelona's mean temperature each year against the tropical nights at the Observatori Fabra that year, since 1950: the two series joined by the year. Both rise along the years, and that alone would make them go together; a correlation says what goes with what, never why.

years = barcelona-years
nights = weather-days station: baic0008 kind: tropical-nights
both = join left: years right: nights
scatter "Tropical nights against the year's mean, a dot a year" table: both x: mean y: days
together = correlation table: both x: mean y: days
readout "r" value: together.r about: "of a year's mean temperature and its tropical nights at the Fabra"
Rain since 1786

Barcelona's rain every year since 1786 — by its paper's count, the longest series of rain measured in the Iberian Peninsula — and the straight line through the years from the dial's on, as the change it makes each decade. A year that misses a month has no total, and is left out.

start = dial "From" value: 1786
rain = barcelona-rain
kept = keep "From the dial's year on" table: rain column: year is: at-least value: start
lines "Barcelona's rain, year by year" table: kept x: year y: rain
trend = trend table: kept y: rain
readout "Each decade" value: trend.per-ten unit: mm about: "along the straight line fitted through the years from the dial's on"

What it is not

Each station is cut in half over its own years, so two stations' halves are different periods: a record that starts in 2009 has no flat 1990s in it, and will look steeper for that alone. Compare a station with itself.

The network's stations are not homogenised. A sensor replaced, a screen moved, a car park built next door: each can make a step that has nothing to do with the climate, and nothing here corrects for it. A station is never joined to another, even in the same town. The long series are the opposite: the Meteocat has corrected them for exactly that, and blended stations into them where a record broke off, which is what lets them reach back to 1950. A long series and a station in the same place, as the two at the Observatori Fabra, do not give the same numbers: compare a record with itself, never one kind with the other.

A year missing more than one day in twenty is drawn as an outline and kept out of every mean. The year still running is drawn in grey, up to the last day the Meteocat has, and is kept out of every mean and out of both halves: it is not over, and its days can still be corrected. The long series have no year still running: the Meteocat adds a whole year to them once it is over.

Barcelona's series since 1780 holds a mean for each month, and a year's mean is the mean of its twelve; its rain, a total for each month, and a year's is the sum of its twelve, none for a year that misses one. Its first decades were read in doctors' houses, with the instruments of their day; the Meteocat has checked and homogenised the whole, and places it at the Observatori Fabra, 411 m up, where most of it was measured.

The names — tropical night, torrid night — are common usage, not official definitions. Frost is "below 0 °C" rather than "0 °C or below" because only the first can be counted exactly from the histograms. The difference between two halves, and the straight line through a record, describe what a record did. They are not a forecast, and they do not say why.

Where it comes from

This is the small version of an explorer I built in the summer of 2026, which has every station of the network that is still reporting, humidity and a map: Nits de calor a Catalunya. Here there are nine stations and four variables, the daily series stays at its source, and the site keeps only what it derives from it, a finished year at a time, with the year still running asked for again every day.

The long series are the Meteocat's too: CADTEP, its daily series since 1950 (Sèries climàtiques des de 1950; Prohom and others, 2023, in the International Journal of Climatology), and the climate series of Barcelona since 1780: its temperatures (Prohom, Barriendos, Aguilar and Ripoll, 2012), and its rain since 1786 (Prohom, Barriendos and Sanchez-Lorenzo, 2015, in the International Journal of Climatology). The site keeps them as it keeps the stations, a finished year at a time, once the Meteocat has added it.

~/projects/hot-nights $

~/projects/hot-nights $