When topics become sufficiently charged it becomes difficult for a good faith learner to sift through contradicting narratives. Fundamental information becomes buried beneath layers of our society’s economically incentivized media platforms. Whether information is deliberately obscured or not, much public dialog projects authority and expertise in absolute terms without nuanced investigation or conclusions. If you’re skeptical humans have changed the climate, you’ll be well equipped to dispute that claim at the end of this work. If you feel your local weather is different from what you remember, you’ll be able to answer that accurately.
This page defines climate change, presents the evidence used to claim the climate has changed, presents the evidence chain used to claim human activity drives changes in climate, lays out the evidence that would overturn a conclusion that human-caused climate change is real, and covers strong claims that dispute human-caused climate change. Weaker evidence is called out: see where the evidence is weaker. The strongest published arguments against human causation are stated in their own terms with a reply, in is there credible evidence against it?. Everything below is presented factually, interpretations and projections are called out where they appear.
This is not a scientific publication, it has not been reviewed by experts and has not been submitted to any journals or other formal dissemination platform. It is evidence based and reproducible. Every number here is traceable without leaving the page: it carries the code that computed each one, and a record of every file that went in — the address it was requested from, when, how large it was and provides sources a reader could visit.
The thirty-second evidence of a changing climate with human impact
Five lines of evidence produced from different instruments are each presented as sufficient on their own to rule out “nothing unusual is happening”:
Global average surface temperature in 2015–2024 was 1.15 °C to
1.33 °C above 1850–1900 across the four records, and since 1970 every one of
them warms at 0.192 °C to 0.206 °C per decade —
Figure 1.
CO₂ is 54% above its 1700s ice-core level and rising
at 2.63 ppm a year, against 0.86 ppm a year in the
1960s — Figure 3.
The new atmospheric carbon is depleted in ¹³C, with a matching oxygen drawdown: the signature of
burning organic carbon — Figure 4.
Heat content in the upper 2,000 m of ocean rose even through the period when surface warming slowed — Figure 6. It gained 108ZJ over 1955–1990 (7 to 210) and 377 ZJ over 1990–2025 (346 to 408).
Figure 1 is the global temperature record. Four separate groups each combine the world’s thermometer records into a global average of how far temperature has departed from a baseline period; Figure 7 shows the absolute average temperature which is known less precisely.
Four different global temperature records agree: warming of 0.19–0.21 °C per decade since 1970
Annual global mean surface temperature, anomaly relative to 1850–1900 (°C). Small panels repeat each record with the uncertainty its provider publishes; the bottom panel compares their 1970–2024 trends with 95% intervals.
The four records are not fully independent: GISTEMP and NOAAGlobalTemp both use GHCNm v4 land stations and ERSSTv5 sea-surface temperatures Menne et al. 2018Huang et al. 2017, while HadCRUT5 and Berkeley Earth both use HadSST4 Morice et al. 2021Rohde & Hausfather 2020. What differs is the gridding, infilling and homogenization. Their 1970–2024 trends span 0.014 °C per decade. Because the records share weather noise, overlapping intervals prove little; the stricter test is the trend of each pair's difference series, which excludes zero for 4 of the 6 pairs: the differences are detectable, and small. GISTEMP begins in 1880, so it was placed on 1850–1900 by adding the other three records' mean 1880–1900 anomaly (−0.033 °C; the three differ by 0.023 °C) Hawkins et al. 2017. GISTEMP's band ends in 2016, the last year with a distinct published value; NOAAGlobalTemp publishes no usable uncertainty; Berkeley Earth's file ends in 2024; HadCRUT5's 2025 value is provisional, with coverage uncertainty 0.068 °C against 0.004 °C for 2024.
Data: Berkeley Earth global land+ocean annual summary; global land TMAX/TMIN summaries [Berkeley Earth Land/Ocean (files as published on S3)], fetched 2026-09-14 UTC; GISTEMP total 95% confidence interval, uncertainty model v1.2.1 [v1.2.1 (Lenssen et al. 2019)], fetched 2026-09-14 UTC; GISTEMP v4 global, northern-hemisphere and zonal land-ocean means [GISTEMP v4], fetched 2026-09-14 UTC; HadCRUT5 analysis, global annual summary series [HadCRUT.5.0.2.0], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC. Processing: scripts/process/global_temp.py.
Climate describes the long-term patterns and statistics of weather. Climate change is a persistent shift in those patterns—their average, variability, or both—over decades or longer. The IPCC uses this definition regardless of cause, whether natural or human
IPCC AR6 WG1 Glossary. The UN Framework Convention on Climate Change uses a narrower definition:
change “attributed directly or indirectly to human activity that alters the composition of the global
atmosphere”, beyond natural variability IPCC AR6 WG1 Glossary. To avoid ambiguity, this page uses human-caused climate change when referring specifically to the second definition.
“The climate has always changed” and “humans are changing the climate now” are not competing claims.
The first is true and well documented: ice ages paced by orbital cycles Hays et al. 1976, the last
deglaciation Shakun et al. 2012, centuries-long wiggles in the last two thousand years
Neukom et al. 2019. “Human-caused” is a claim about specific, measurable things — the size, speed, timing
and physical fingerprints of the present change. By measuring and calculating, we can attribute changes in climate to specific sources.
Weather is what happens as energy moves around Earth. Weather is the movement of energy. We track the total amount of energy that enters and leaves Earth. There is only one major source of incoming energy on Earth and only one major route of energy leaving Earth, and we call that energy balance the energy budget.
Human-caused climate change boils down to one accounting problem: we know how much energy is arriving, how much energy is leaving, and balance has shifted to accumulate energy on Earth. Weather is energy moving around the planet, more energy on Earth weather has more to work with.
Our planet’s and entire solar system’s single major source of energy is our Sun. Sunlight arrives at the top of the atmosphere at 1,361.1 W m⁻² on a surface
held face-on to the Sun Coddington et al. 2016Kopp & Lean 2011. Earth intercepts that sunlight across its circular cross-section, but the energy is ultimately spread over the entire surface of the planet. Because a sphere has four times the area of its circular cross-section, the average sunlight received per square meter is one quarter of 1,361.1 W m⁻², which is 340.3 W m⁻² averaged over the whole planet. Some of that sunlight is reflected directly back to space by clouds, ice, and bright surfaces. The rest is absorbed by the atmosphere and surface. Over time, that absorbed energy must eventually leave the planet again.
Energy leaves Earth mainly as infrared radiation, our single major energy escape route. When a planet is in energy balance, it gives back to space exactly as much energy as it absorbs from the Sun. Its temperature adjusts until this balance is achieved. The same basic energy balance applies to any object exposed to radiation in space, not just to Earth, and it can be tested against other planets.
What greenhouse gases actually do
Infrared radiation leaving the surface does not all escape directly to space. Gases such as carbon dioxide, water vapor, and methane absorb some of it and re-emit radiation in all directions, including back toward the surface. The radiation that ultimately escapes to space emmits mainly from higher in the atmosphere, where the air is thinner and colder. When CO₂ increases, the atmosphere becomes more opaque to infrared radiation, so the effective level from which radiation escapes shifts higher. Because that higher layer is colder, it emits less radiation to space Pierrehumbert 2010. For a time, less energy leaves the planet than arrives, and the planet warms until the outgoing and incoming energy are equal again.
So the argument so far is this: increasing CO₂ reduces how much energy escapes Earth, CO₂ in the atmosphere is at an all time high and climbing, and the increase of CO₂ is coming from burning fossil fuels. What is all this CO₂ going to do?
Increasing CO₂ essentially slows down how fast infrared radiation can escape, warmer things radiate more heat and so the consequence is Earth warms until it is radiating enough heat to be back in balance. This is why the warming effect does not stop when the strongest parts of CO₂’s absorption bands become saturated near the surface. Additional CO₂ still changes how far infrared radiation can travel through the atmosphere and from what altitude it can escape, which determines how long the energy is trapped here. The resulting forcing from a given increase in CO₂ has been calculated and recalculated for decades Myhre et al. 1998Etminan et al. 2016 using absorption lines measured in laboratories Tyndall 1861Gordon et al. 2022. How much warming follows from that forcing is a separate question, and a less certain one — see where the evidence is weaker.
How much human activity has shifted the energy balance is measured. Between 1850–1900 and 2015–2024, total human-caused effective radiative forcing — the push on the balance at the top of the atmosphere, counted after the stratosphere and the clouds adjust but before the surface warms in response — grew by 2.61 W m⁻² (2.06 to 3.23), while forcing from changes in the Sun’s output changed by 0.03 W m⁻² (−0.01 to 0.07) Smith et al. 2025. The solar interval includes zero: over this period the Sun’s contribution cannot be told from no change at all, while the human ocontribution’s smallest defensible value is two orders of magnitude larger. The human figure is wide because aerosols, which cool, are the least certain term in the budget.
Radiative forcing from human activity calculates both a push toward cooling and a push toward heating. Both are small against the 340.3 W m⁻² of sunlight arriving on average across the planet, and that is the point: a forcing is a change to the balance, not the size of the flows being balanced. Sunlight in and infrared out are each a few hundred W m⁻² and have always very nearly canceled. A persistent few W m⁻² that does not cancel is what accumulates, and where it accumulates is measured in the atmosphere and ocean.
Where surface energy accumulates
An imbalance of energy leaving at the top of the atmosphere has to appear somewhere in the Earth system as stored energy, and most of it goes into the ocean. Averaged over 2013–2025, the heat gained by the upper 2,000 m of the ocean was equivalent to 0.86 W m⁻² when spread over the entire surface of Earth. We measure ocean temperatures with thermometers in the water. Argo floats are the thermometers and they reached global coverage in the early 2000s. Before Argo, the ocean was sampled along shipping lanes, and filling the gaps between those samples uses covariance patterns taken from a multi-model ensemble Institute of Atmospheric Physics. The early decades of this record are therefore a reconstruction informed by models, which is a real limit and is set out in where the evidence is weaker. The energy is small when expressed per square meter, but the total amount of energy is enormous: from 2013–2025 the ocean absorbed heat at about 136 times the rate at which the United States uses energy from all sources combined for a year U.S. Energy Information Administration.
Ocean heat absorption has been accelerating. The ocean took up
2.6ZJ a year over 1960–1990
(−2.9 to 8.1) and
11.8 ZJ a year over 1996–2025
(7.8 to 15.7). That is an increase of
9.2 ZJ a year
(2.4 to 16.0), strong evidence of accumulating energy.
The ocean is taking up heat faster: 9.2 zettajoules a year more in 1996–2025 than in 1960–1990 (2.4 to 16.0)
Top: heat added each year to the upper 2,000 m of the ocean (IAPv4.2). Bottom: global sea surface temperature (NOAAGlobalTemp). Two quantities on two scales, so two panels.
Each bar is one year's gain: that year's average heat content minus the previous year's. Single bars are noisy. Each year's estimate carries an uncertainty that is large before Argo floats reached global coverage in the mid-2000s, and the difference between two uncertain years is more uncertain than either, so the claim rests on multi-decade averages, not on bars. The average yearly gain rose by 9.2 ZJ (2.4 to 16.0) from 1960–1990 to 1996–2025, and the build fails if that interval ever includes zero. The lower panel is a different quantity: sea surface temperature describes the top few meters, while heat content sums the whole upper 2,000 m. The sea surface warmed 0.79 °C (0.64 to 0.94 °C; effective sample size 4.9) from 1850–1900 to 2015–2024.
Data: IAPv4.2 global ocean heat content, monthly, 1940-present [IAPv4.2], fetched 2026-09-14 UTC; NOAAGlobalTemp global ocean [NOAAGlobalTemp v6.0.0], fetched 2026-09-19 UTC. Processing: scripts/process/ocean_solar.py.
Check it yourself: data ocean_heat_uptake_annual.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Weather doesn’t directly reduce energy in the system
Weather is what happens as energy moves through the climate system. Sunlight heats Earth unevenly, with more energy arriving in the tropics and less at the poles. The atmosphere and ocean continually move that surplus toward regions with less energy. Winds, storms, fronts, and ocean currents are the mechanisms that do this. An individual storm is one part of that larger system, and storms would occur on Earth whether or not humans existed.
For that reason, no single hot day, cold spell, or hurricane establishes a long-term change in climate by itself. What changes when the planet’s energy balance changes is the statistics of the weather: the range and frequency of conditions from which individual events arise can shift, making some events more or less common than they were before. That is a claim about distributions, so it is tested by examining distributions—records, trends, and estimated ranges—rather than by treating individual disasters as proof.
This also marks a limit of what energy accounting can tell us. It is strongest when looking at large-scale quantities over long periods: the planet as a whole, many decades, or the accumulated heat in the ocean. It is less direct when asking what will happen in a particular place during a particular season.
Where the evidence is weaker addresses those questions rather than concealing that uncertainty.
Fundamental understanding of the energy budget, climate, and potential human impact is not new
None of the above is new, and neither is putting it before the United States Congress. In the mid-1950s, while the
International Geophysical Year of 1957–58 was being planned, the oceanographer Roger Revelle warned a
Congressional committee that rising CO₂ might bring severe climate shocks within a century
American Institute of Physics. A 1957 report to the chief of the US Weather Bureau used his framing:
“In consuming our fossil fuels at a prodigious rate, our civilization is conducting a grandiose scientific experiment”American Institute of Physics. In 1977 and 1978, six climate bills a year were introduced in Congress, and scientists
testified that rising CO₂ could bring world disaster American Institute of Physics.
On 10 December 1985, Carl Sagan addressed a Senate subcommittee in a televised hearing. Sagan told the Senate that the greenhouse effect was well-established physics, that rising CO₂ and other human-produced gases were increasing heat retention, and that scientists agreed the resulting warming was a real and serious problem even though they were uncertain about its precise timing and severity. He urged policymakers to act before the effects became severe, particularly through greater reliance on low-CO₂ energy sources such as nuclear and solar power, emphasizing that climate change was a global problem requiring international action C-SPAN.
Watch Sagan’s testimony, or the
full hearing on C-SPAN.
Fundamental understanding of our climate and how humans are impacting it hasn’t changed, what has changed is the measurements available:
the ocean floats, CERES satellites, decades of warming records, the ice-sheet gravity satellites and the ice cores reaching back
806,000 years that the evidence chain relies on did not exist yet. Below, we get into the details that chain together our understanding of what we measure and know of the Earth to come to the core conclusion.
The case for human-caused warming is often presented as one argument. It is better understood as a chain
of eight claims, each resting on different instruments and different people. Breaking one link does not
collapse the rest — evidence that could overturn the core conclusions is discussed in Evidence against. Each link below gives the claim in plain
words, the evidence in technical terms, and where to check it.
Link 1 of 8
Carbon dioxide absorbs infrared radiation
CO₂ absorbing infrared is well demonstrated physics, and the measurements of it are the ones remote sensing and instrument design run on. Adding CO₂ to the atmosphere reduces the infrared
radiation escaping to space at the wavelengths CO₂ absorbs, and increases the infrared radiation coming
back down to the surface.
How added CO₂ warms the surface. Earth gains energy from absorbed sunlight and loses energy through infrared radiation to space. Temperature remains stable when incoming and outgoing energy are equal.
1. CO₂ reduces outgoing infrared radiation. The surface absorbs sunlight and emits infrared radiation. CO₂ absorbs infrared at specific wavelengths and re-emits it in all directions. As CO₂ increases, radiation at those wavelengths escapes to space from higher in the atmosphere rather than directly from the surface.
2. Higher emission means colder emission, so less energy escapes. The troposphere gets colder with altitude, so the higher emission level is colder and radiates less infrared to space. Outgoing radiation therefore falls below absorbed sunlight, creating an energy imbalance. That imbalance is the forcing.
3. The climate warms until the imbalance closes. The accumulated energy warms the surface and lower atmosphere. As temperatures rise, the emission level radiates more infrared until outgoing radiation again matches absorbed sunlight. Resulting temperature increase is the response.
The response is not proportional to CO₂ concentration. Each doubling of CO₂ adds roughly the same forcing because additional absorption occurs mainly near the edges of existing absorption bands; the strongest band centers are already effectively opaque. In the band centers, emission can originate in the stratosphere, where temperature increases with altitude. The result is an approximately logarithmic relationship between CO₂ concentration and forcing Pierrehumbert 2010Zhong & Haigh 2013.
None of that mechanism requires a climate model, a simulation of the coupled ocean and atmosphere. It requires measured CO₂ absorption spectra, the observed temperature decrease with altitude in the troposphere, and the Stefan–Boltzmann law. Quantifying the mechanism requires a radiative-transfer calculation using temperature, humidity, and cloud profiles. That calculation is much more constrained than a climate simulation, which is why the forcing from a given increase in CO₂ is known far more precisely than the warming that follows from it IPCC AR6 WG1 Ch. 7.
The absorption itself has been measured since the nineteenth century. In 1861, Tyndall measured the absorption of infrared radiation by gases and found that CO₂ and water vapor absorb strongly compared with the nitrogen and oxygen that make up most of the atmosphere Tyndall 1861. Modern measurements are compiled in the HITRAN database, which contains millions of measured absorption lines used by atmospheric scientists, remote-sensing engineers, and instrument designers Gordon et al. 2022. Radiative-transfer calculations use those measured absorption properties to determine how much radiation escapes to space, and the resulting forcing from doubled CO₂ has been calculated and independently refined for decades Myhre et al. 1998Etminan et al. 2016.
Two common objections concern this mechanism: that CO₂’s absorption bands are already saturated, taken up in
the claim card on saturation, and that water vapor is the gas that really matters, taken
up in the claim card on water vapor.
NOAA’s Annual Greenhouse Gas Index quantifies the present-day forcing from long-lived greenhouse gases. CO₂ contributes 2.33 W m⁻² relative to 1750 in 2024, out of 3.54 W m⁻² from all long-lived greenhouse gases, of which CO₂ is
66% NOAA Global Monitoring Laboratory.
Check it yourself: aggi_forcing.csv in the data appendix holds the full table used
here, written by scripts/process/ghg.py in the code appendix from NOAA’s
published index. This link needs no time-series chart: the underlying absorption is a laboratory
measurement, and the forcing is calculated from those measured properties rather than fitted to a trend.
Link 2 of 8
Atmospheric CO₂ is rising, and by how much is not in dispute
CO₂ has been measured continuously since 1958 and is now 54% above its
pre-industrial level. The instrumental record and the ice-core record agree where they overlap.
Keeling’s measurements at Mauna Loa began in 1958 with a calibration scheme designed to be reproducible
by other laboratories Keeling 1960Thoning et al. 1989; the record is now maintained by NOAA
and Scripps in parallel, and dozens of other stations measure the same gas. Annual means went from
316.0 ppm in 1959 to 427.4 ppm in 2025, an
increase of 111 ppm. The rate itself has increased: 0.86 ppm a
year averaged over the 1960s, 2.63 ppm a year over 2016–2025. Globally averaged
2025 values from NOAA’s network: CO₂ 425.6 ppm, methane
1,935.9 ppb, nitrous oxide 338.9 ppb.
Before 1958 the air itself is preserved in Antarctic ice. The composite used here runs to
806,000 years before present Bereiter et al. 2015Lüthi et al. 2008, with the most
recent section from Law Dome, where snowfall is heavy enough to date layers to within a few years
MacFarling Meure et al. 2006. Across the whole record, CO₂ before 1850 stayed between
174 and 299 ppm.
Atmospheric CO₂ is 129 ppm above the highest level in the 806,000-year ice-core record
CO₂ in parts per million. Top: the Antarctic ice-core composite and Mauna Loa annual means, with the pre-1850 ice-core range shaded. Bottom left: the period where the two overlap. Bottom right: Mauna Loa monthly means and their seasonal cycle.
Mauna Loa annual mean CO₂ was 316.0 ppm in 1959 and 427.4 ppm in 2025, which is 54% above the 1700–1799 ice-core mean of 278 ppm. Growth averaged 0.86 ppm a year in the 1960s and 2.63 ppm a year over 2016–2025. Ice-core gas ages are smoothed over decades in the youngest section (Law Dome) and centuries in the oldest (Dome C), so short-lived excursions could be lost in the deep record even though its sustained levels are well constrained Bereiter et al. 2015MacFarling Meure et al. 2006Lüthi et al. 2008. The pre-industrial band is computed from the composite itself, excluding samples dated 1850 or later, which overlap the instrumental era. Monthly values before May 1974 come from the Scripps program and after it from NOAA Keeling 1960Thoning et al. 1989; the shaded months were measured at Maunakea after the 2022 Mauna Loa eruption, and hollow markers are months with no measurements.
Data: Antarctic composite CO2, 0-800 kyr BP, fetched 2026-09-14 UTC; NOAA GML Mauna Loa CO2, fetched 2026-09-14 UTC. Processing: scripts/process/ghg.py.
Check it yourself: the annual means, and the global methane and nitrous oxide values, are in
ghg_annual.csv; the monthly series behind the chart is
co2_mauna_loa_monthly.csv and the ice is
co2_ice_core_composite.csv. All three are in the data appendix, written
by scripts/process/ghg.py in the code appendix. The ice-core and
instrumental records overlap between about 1958 and 2001, and the chart shows that overlap rather than
hiding the join.
Link 3 of 8
The added CO₂ is from fossil fuel
Four independent fingerprints point to fossil fuel as the source: the isotopic composition of the added carbon,
the matching fall in atmospheric oxygen, the dilution of radiocarbon, and the accounting between
reported emissions and the observed increase.
Carbon from plants — and from the fossil fuels that plants became — is depleted in the heavier stable
isotope ¹³C, because photosynthesis discriminates against it and selectively builds molecules with more ¹²C. If the extra CO₂ came from volcanoes or
from the ocean, the atmosphere’s δ¹³C would not fall; it has fallen steadily, by
1.129‰ at Mauna Loa between 1981 and
2024 and by 1.075‰ at the South Pole
Keeling et al. 2005Keeling et al. 2017Graven et al. 2020. ¹³C is otherwise a stable isotope of carbon.
Burning consumes oxygen in a fixed ratio to the carbon released, and the atmosphere’s oxygen content is
measured precisely enough to see the drawdown: 725per meg across
three stations between 1992 and
2025, while Mauna Loa CO₂ rose
71 ppm over the same years Keeling et al. 1996Manning & Keeling 2006. Ocean outgassing would raise atmospheric oxygen slightly, not lower it. The size
of the oxygen fall also constrains the land biosphere: over this period it has been a net carbon sink,
which removes the remaining non-fossil candidate.
As CO₂ rises, its carbon gets lighter and atmospheric oxygen falls: the signature of burning organic carbon
Monthly, seasonally adjusted, measured values only. Top: CO₂ at Mauna Loa (ppm). Middle: δ¹³C of CO₂ (‰, VPDB) at Mauna Loa and the South Pole. Bottom: the O₂/N₂ ratio (per meg) at La Jolla, Alert and Cape Grim.
δ¹³C at Mauna Loa fell by 1.129‰ between 1981 and 2024 (−0.261‰ per decade; the South Pole record agrees at −0.242‰ per decade). Plants, and the fossil fuels made from them, are depleted in carbon-13, so a falling δ¹³C points to organic carbon rather than volcanic or oceanic CO₂. On its own δ¹³C cannot separate fossil fuel from living biomass Keeling et al. 2017Graven et al. 2020. Oxygen fell by 725 per meg between 1992 and 2025, an average of 22 per meg a year, while Mauna Loa CO₂ rose 71 ppm over the same years, because combustion consumes oxygen. The oxygen budget also shows the land biosphere has been a net carbon sink over this period, which leaves fossil carbon as the source Manning & Keeling 2006Keeling et al. 1996. The radiocarbon fingerprint is discussed in the text rather than plotted: the fetched Mauna Loa Δ¹⁴C file covers only a few years Levin et al. 2010Suess 1955.
Data: NOAA GML Mauna Loa CO2, fetched 2026-09-14 UTC; Scripps CO2 Program monthly flask d13C at Mauna Loa and South Pole; intermittent D14C at Mauna Loa, fetched 2026-09-14 UTC; Scripps O2 Program monthly O2/N2 at La Jolla, Alert and Cape Grim, fetched 2026-09-14 UTC. Processing: scripts/process/ghg.py.
Two further fingerprints are cited rather than plotted here. Fossil carbon is millions of years old and
contains no radiocarbon, so burning it dilutes atmospheric ¹⁴C — the Suess effect, identified in 1955 and
tracked since Suess 1955Levin et al. 2010Graven et al. 2020. And the annual carbon budget
compares reported fossil emissions against the observed atmospheric increase and the estimated land and
ocean sinks: the atmosphere retains part of what is emitted, and the rest is taken up
Friedlingstein et al. 2025. Volcanic emissions are measured too, and are roughly two orders of
magnitude smaller than fossil emissions Gerlach 2011Burton et al. 2013Fischer & Aiuppa 2020 — that comparison is treated as its own claim in the
common claims section.
The same accounting can be read from the other end: where the added CO₂ comes from, source by source.
Fossil emissions are compiled from energy statistics and cement production data; emissions from clearing and
converting land are estimated from land-use records with carbon bookkeeping models Friedlingstein et al. 2025.
In 2024, fossil fuels and industry supplied
89% of the total, and coal alone supplied
37% (Figure 5). These numbers are not indicative of the
natural carbon cycle, the continual exchange of carbon between air, ocean and living things, which was close to
equilibrium before industry IPCC AR6 WG1 Ch. 5. Part of each year’s
emissions is absorbed by the ocean and land, which is why the atmospheric rise is smaller than the emissions.
In 2024, 89% of the CO₂ people added came from fossil fuels and industry, and 11% from clearing and converting land
World CO₂ emissions by source, billion tonnes a year, stacked. Global Carbon Budget, as republished by Our World in Data.
Of the 43.2 billion tonnes emitted in 2024: coal 37%, oil 29%, natural gas 19%, cement, flaring and other industry 5%, land-use change 11%. Every share here is rounded to a whole percent, so they need not add to exactly 100, and the four fossil and industry shares need not add to exactly the figure in the title. The mix has reversed since 1850, when clearing land released 14 times as much CO₂ as burning fossil fuel; land use still accounts for 33% of all CO₂ emitted since then. Fossil emissions are compiled from energy statistics and cement production data; land-use emissions are estimated from land-use records with carbon bookkeeping models Friedlingstein et al. 2025. These are additions each year. They are not the natural carbon cycle, and they are not where the carbon ends up: part of each year's emissions is taken up by the ocean and land.
Data: Our World in Data CO2 dataset: annual CO2 emissions by source and by country [owid/co2-data, master branch CSV], fetched 2026-09-19 UTC. Processing: scripts/process/carbon_sources.py.
Check it yourself: data co2_emissions_by_source.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
The shift in Earth’s energy balance has been measured
More CO₂ has produced measurable changes in radiation: less infrared escapes to space in CO₂ absorption bands, while more infrared returns from the atmosphere to the surface.
Feldman and colleagues measured the surface radiative forcing of CO₂ directly, at two sites, over
2000–2010, using spectrally resolved downwelling infrared and subtracting the contributions of water
vapor and clouds; the measured increase matched the expected forcing from the concurrent CO₂ rise
Feldman et al. 2015. Looking down instead of up, satellite spectra of outgoing longwave radiation show
the same bands deepening between 1970 and 1997 Harries et al. 2001.
At the top of the atmosphere, CERES measures the imbalance between incoming sunlight and outgoing
radiation, and finds it has grown over the satellite era Loeb et al. 2021Loeb et al. 2024Mauritsen et al. 2025. That record is not plotted on this page: the absolute imbalance from CERES is
anchored to in-situ ocean heat uptake rather than measured absolutely, so only its changes are
independent evidence — and this build did not fetch the CERES product, which is recorded in the build
log. The measure of the imbalance that does not depend on a climate simulation is the ocean, which is the
next link — with the caveat that its early decades are a model-informed reconstruction rather than a
direct measurement (what this page concedes).
Check it yourself: this link rests on the cited papers, not on a dataset processed here. Their DOIs are
in the source list with the HTTP status returned when they were checked.
Link 5 of 8
Earth is accumulating energy, and the increase has been measured
Most of the extra energy ends up in the ocean: the upper 2,000 m gained
440zettajoules between 1960 and 2025, against a published
uncertainty of ±77 ZJ on the 1960 value.
Energy is conserved, so an imbalance at the top of the atmosphere has to show up as heat somewhere. The
ocean’s heat capacity dwarfs the atmosphere’s, and the inventory of Earth’s energy gain finds the large
majority of it there, with smaller shares warming land, melting ice and warming the atmosphere
Schuckmann et al. 2023. Measuring it took a purpose-built observing system: the Argo array of
profiling floats, which reached near-global coverage of the upper 2,000 m in the mid-2000s, following
decades of sparser ship-based profiles Levitus et al. 2012Cheng et al. 2024.
Earth kept accumulating heat through 1998–2012, the window often called a pause in surface warming
Top: heat content of the ocean's upper 2,000 m (zettajoules, relative to 2006–2015; IAP analysis, 95% interval shaded). Bottom: global surface temperature (°C, mean of the available records, relative to 1850–1900). The shaded window is 1998–2012.
Heat gained in the upper 2,000 m: 56 ZJ over 1983–1997, 144 ZJ over 1998–2012 and 165 ZJ over 2013–2025, at average rates of 4.0, 10.3 and 13.8 ZJ a year. Those are changes between single years, not fitted trends: over windows this short the ocean series is smooth enough that a straight-line fit fails this page's own rule for claiming a trend, so none is fitted. A change between two years depends on which two: moving each window by up to two years either way gives 28 to 65 ZJ for 1983–1997 and 127 to 148 ZJ for 1998–2012. The later window gained more in every placement, but the ratio between them is not stable, and the early values carry wide published uncertainties (what this page concedes). Surface trends, where the rule is met: 0.15 °C per decade over 1983–1997 (0.02 to 0.28 °C) and 0.12 °C over 1998–2012 (0.02 to 0.23 °C). Those intervals overlap almost entirely, and a change-point test on the surface record finds no break (Figure 33): the lower surface trend of 1998–2012 is a point estimate, not a demonstrated slowdown. Heat uptake did not slow over that window, which is the core of how the period is now understood Fyfe et al. 2016Medhaug et al. 2017. Heat content rose in 66% of year-to-year steps since 1955, and 2025 sat 23 ZJ above 2024 Pan et al. 2026. Before Argo floats reached near-global coverage (marked) the estimate rests on sparser ship data and model-informed mapping, so early values carry wider intervals Cheng et al. 2024Levitus et al. 2012. One zettajoule is 10²¹ joules.
Data: Berkeley Earth global land+ocean annual summary; global land TMAX/TMIN summaries [Berkeley Earth Land/Ocean (files as published on S3)], fetched 2026-09-14 UTC; GISTEMP total 95% confidence interval, uncertainty model v1.2.1 [v1.2.1 (Lenssen et al. 2019)], fetched 2026-09-14 UTC; GISTEMP v4 global, northern-hemisphere and zonal land-ocean means [GISTEMP v4], fetched 2026-09-14 UTC; HadCRUT5 analysis, global annual summary series [HadCRUT.5.0.2.0], fetched 2026-09-14 UTC; IAPv4.2 global ocean heat content, monthly, 1940-present [IAPv4.2], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC. Processing: scripts/process/ocean_solar.py, scripts/process/global_temp.py.
Check it yourself: data ocean_heat_content_annual.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
This is also the answer to the claim that warming paused between 1998 and 2012. Surface temperature is a
thin, noisy layer of the climate system; ocean heat content is the integral. Over that window the surface
trend was 0.12 °C per decade against
0.15 °C over the preceding fifteen years — point estimates whose
intervals overlap almost entirely, and a change-point test on the whole record finds no break
(Figure 33). The ocean, meanwhile, kept gaining heat:
144 ZJ over 1998–2012 against
56 ZJ over 1983–1997 Fyfe et al. 2016Medhaug et al. 2017.
Those are differences between single years rather than fitted trends, and the earlier figure is comparable
to the uncertainty of the pre-Argo ocean (what this page concedes); moving either
window by up to two years changes the ratio between them a great deal but never reverses their order
(Figure 6’s caption gives the range).
Earth’s surface temperature is rising, in four independent reconstructions and evidenced in things that are not thermometers
Four groups, using partly different data and different methods, agree on the rate to within
0.014 °C per decade over 1970–2024 — and the physical world agrees with the
thermometers.
The four records and their uncertainties are Figure 1 at the top of this page. They are not
fully independent — two pairs share sea-surface temperature sources — so the more searching test is
whether things with no connection to the station network are changing in the same direction. They are.
One thing to settle first, because it is the usual next question: what is the planet’s average surface
temperature, in degrees? The answer is that the change is known far more precisely than the level. Berkeley
Earth publishes two estimates of the 1951–1980 level that differ only in how they treat sea-ice regions, and
they sit 0.6 °C apart — far more than either one’s stated uncertainty.
Both are drawn below, and the two lines are a constant distance apart, so they show exactly the same warming.
That is why every other temperature chart on these pages plots an anomaly, a departure from a reference
period, instead of a temperature: an anomaly does not depend on which definition of the level you picked.
The planet's average surface temperature in degrees: about 13.9 °C in 1850–1900 and 15.1 °C in 2015–2024
Global mean surface temperature, absolute. The mean of the records available in each year (HadCRUT5, NOAAGlobalTemp, Berkeley Earth from 1850 and GISTEMP from 1880), placed on Berkeley Earth's two published levels for 1951–1980.
The level of the global average is known far less precisely than its change. Berkeley Earth puts the 1951–1980 level at 14.1 °C when sea-ice regions are represented by the air above the ice, and at 14.7 °C when they are represented by the water below it: a 0.6 °C difference from that one choice, although each estimate's stated uncertainty is only ±0.02 °C. The two lines differ by a constant, so they show the same warming. That is why every other temperature chart on this page plots anomalies (departures from a reference period): an anomaly does not depend on how the level is defined. The title uses the air-over-ice level.
Data: Berkeley Earth global land+ocean annual summary; global land TMAX/TMIN summaries [Berkeley Earth Land/Ocean (files as published on S3)], fetched 2026-09-14 UTC; GISTEMP total 95% confidence interval, uncertainty model v1.2.1 [v1.2.1 (Lenssen et al. 2019)], fetched 2026-09-14 UTC; GISTEMP v4 global, northern-hemisphere and zonal land-ocean means [GISTEMP v4], fetched 2026-09-14 UTC; HadCRUT5 analysis, global annual summary series [HadCRUT.5.0.2.0], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC. Processing: scripts/process/absolute_temp.py, scripts/process/global_temp.py.
Check it yourself: data global_absolute_temperature.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Arctic sea ice in September has shrunk from 7.2 to 4.6 million km² between the first and last ten years of the satellite record
September mean Arctic sea-ice extent (million km²), NSIDC Sea Ice Index, 1979–2025. The axis starts at zero.
Trend 1979–2025: −0.76 million km² per decade (−0.90 to −0.63), or −11.9% of the 1981–2010 mean per decade. The lowest September was 2012. The underlying passive-microwave product changes for the most recent year (provider note), which matters more for a single year than for the trend. Antarctic sea ice behaved differently, with slow growth for decades and then a sharp drop Parkinson 2019, and is addressed in the misinformation section.
Data: NSIDC Sea Ice Index v4.0, Arctic September monthly extent [G02135 v4.0], fetched 2026-09-14 UTC. Processing: scripts/process/sealevel_ice.py.
Check it yourself: data arctic_sea_ice_september.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Reference glaciers have lost 28.1 meters of water equivalent since 1970
Top: the mean annual mass balance of the World Glacier Monitoring Service reference glaciers reporting in each year (mm water equivalent). Bottom: the cumulative balance relative to 1970 (m water equivalent).
Mean annual balance: −228 mm water equivalent a year over 1976–1985 and −950 over 2016–2025. Years since 2000 with a positive mean balance: 0. 59 glaciers reported in 2025, while the earliest years rest on a handful of glaciers, so the early bars are the least representative World Glacier Monitoring ServiceZemp et al. 2019. Satellite measurements of nearly all the world's glaciers give the same direction of change over the past two decades Hugonnet et al. 2021.
Check it yourself: data wgms_reference_glaciers.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Sea level at the San Francisco tide gauge, one of the longest records in the world, is in the
California section. Sea ice, glaciers and sea level are measured by satellites, field
surveys and float gauges respectively; none of them depends on how a weather station’s records were
homogenized.
The pattern of warming matches greenhouse forcing, not a brighter Sun
Greenhouse warming and solar warming make different predictions about where the warming shows up. The
measurements match the greenhouse pattern.
More sunlight would warm the whole atmospheric column, including the
stratosphere. More greenhouse gas warms the lower atmosphere and cools the layers above it, because the
upper atmosphere radiates more efficiently to space while receiving less energy from below. The
measurements show a warming troposphere and a cooling stratosphere Santer et al. 2013Santer et al. 2023.
One qualification worth mentioning: Ozone depletion also cools the lower
stratosphere, and AR6 assesses it as the main driver of the cooling there from 1979 to the mid-1990s
IPCC AR6 WG1 SPM. Most of that layer’s cooling happened before 1998; since then the two satellite
records give −0.054 °C (RSS) and −0.100 °C
(UAH) per decade, which differ substantially. An example of cooperation below explains why ozone depletion cooling became less of a factor. What ozone does not explain is the combination — a warming
troposphere beneath a cooling stratosphere, which a brighter Sun cannot produce — or the cooling higher
up, where the carbon-dioxide signal is cleaner Santer et al. 2023.
Human forcing has grown by 2.61 W/m² since 1850–1900; solar forcing by 0.03 W/m², an interval that includes zero (−0.01 to 0.07)
Top: effective radiative forcing relative to 1750 (W m⁻², 11-year centred means), anthropogenic and solar, from one dataset so no conversion factor is introduced. Middle: total solar irradiance (W m⁻², NRLTSI2; before 1978 a proxy-based reconstruction). Bottom: global surface temperature (°C relative to 1850–1900).
Both forcing changes are 2015–2024 means minus 1850–1900 means, from the Indicators of Global Climate Change dataset Forster et al. 2025Smith et al. 2025. This page fits no trend to the measured irradiance record: over 1980–2023 its effective sample size falls below the minimum set for claiming a trend. The comparison the data do support is between solar cycles, each of which runs about eleven years from one sunspot minimum to the next: mean irradiance across solar cycle 24 (2008–2019) was −0.12 W m⁻² relative to cycle 22 (1986–1996), while the surface warmed. Irradiance before satellites depends on which reconstruction is used Coddington et al. 2016; Connolly and colleagues argue that some reconstructions leave room for a much larger solar role Connolly et al. 2021, and Richardson and Benestad dispute the statistics behind that claim Richardson & Benestad 2022. A brighter Sun would also warm the stratosphere, which has cooled (Figure 11). Irradiance is kept in its own panel rather than converted into forcing, so no albedo or geometry factor is assumed here.
Data: Berkeley Earth global land+ocean annual summary; global land TMAX/TMIN summaries [Berkeley Earth Land/Ocean (files as published on S3)], fetched 2026-09-14 UTC; GISTEMP total 95% confidence interval, uncertainty model v1.2.1 [v1.2.1 (Lenssen et al. 2019)], fetched 2026-09-14 UTC; GISTEMP v4 global, northern-hemisphere and zonal land-ocean means [GISTEMP v4], fetched 2026-09-14 UTC; HadCRUT5 analysis, global annual summary series [HadCRUT.5.0.2.0], fetched 2026-09-14 UTC; Indicators of Global Climate Change 2024 data release: effective radiative forcing 1750-2024, human-induced warming, energy imbalance [v2025.06.11 (Zenodo record 15639576)], fetched 2026-09-14 UTC; NRLTSI2 yearly total solar irradiance, fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC. Processing: scripts/process/ocean_solar.py, scripts/process/global_temp.py.
Check it yourself: data solar_vs_anthropogenic_forcing.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Solar output is also measured, not just theoretically calculated. The Sun runs through a solar cycle of roughly eleven years,
numbered from one sunspot minimum to the next, and over the satellite era mean irradiance across
solar cycle 24 (2008–2019) came in −0.12 W m⁻² below
cycle 22 (1986–1996) while the surface warmed; in the same dataset, solar effective radiative forcing changed by
0.03 W m⁻² (−0.01 to 0.07) between 1850–1900 and 2015–2024, against
2.61 W m⁻² (2.06 to 3.23) from human activity
Forster et al. 2025Lockwood & Fröhlich 2007. The solar interval spans zero and the human one does not come
near it: the comparison holds at both ends of both intervals, which is the only way a comparison of two
uncertain quantities is worth making.
The lower atmosphere warmed while the stratosphere above it cooled: a brighter Sun would have warmed both
Top: satellite layer temperatures (°C relative to 1979–1998) from RSS and UAH. Middle: Arctic against tropics, and northern-hemisphere winter against summer (GISTEMP, relative to 1951–1980). Bottom: global land daily maximum against daily minimum (Berkeley Earth, relative to 1951–1980).
Troposphere trends 1979–2025: RSS TTT 0.189 °C per decade, UAH LT 0.156 °C, RSS TLT 0.231 °C; the two groups differ by more than their stated intervals, which is why both are shown Mears & Wentz 2017Spencer et al. 2017Santer et al. 2017. Lower stratosphere over the same years: RSS −0.191 °C and UAH −0.251 °C per decade. Most of that cooling happened before 1998, and AR6 assesses ozone depletion as the main driver of lower-stratospheric cooling from 1979 to the mid-1990s IPCC AR6 WG1 SPM; since 1998 the trends are −0.054 °C (RSS) and −0.100 °C (UAH) per decade. The two brief warm spikes in that panel follow large volcanic eruptions, a natural influence on stratospheric temperature that the fingerprint work has to separate from the human one Santer et al. 2013. The cleaner carbon-dioxide signal is higher up, in the layer “roughly 25 to 50 km above the Earth's surface”: including it in a fingerprint analysis “increases signal-to-noise ratios by a factor of five”Santer et al. 2023. That layer is described here rather than plotted, because no public series for it validated in this build. Arctic (64–90°N) trend 1979–2025 0.678 °C per decade against 0.154 °C in the tropics, which is 3.3 times the global rate as computed here; Rantanen and colleagues, with several observational datasets, report that since 1979 the Arctic has been warming “nearly four times faster than the globe”Rantanen et al. 2022. Northern winter 0.286 °C against summer 0.259 °C per decade over 1970–2025: the intervals overlap, so this fingerprint is weak in hemispheric means. Over land, daily minima rose faster than maxima in 1950–1979 (0.104 °C against −0.015 °C per decade, an interval −0.087 to 0.057 °C that includes zero) but not in 1979–2023 (0.235 °C against 0.305 °C), a reversal also reported in the literature Vose et al. 2005. The day–night fingerprint is not visible in recent global land data, and this page does not claim it.
Data: Berkeley Earth global land+ocean annual summary; global land TMAX/TMIN summaries [Berkeley Earth Land/Ocean (files as published on S3)], fetched 2026-09-14 UTC; GISTEMP v4 global, northern-hemisphere and zonal land-ocean means [GISTEMP v4], fetched 2026-09-14 UTC; RSS v4.0 monthly anomalies: TLT, TMT, TLS [v04_0], fetched 2026-09-14 UTC; UAH v6.1 monthly anomalies: lower troposphere, mid troposphere, lower stratosphere [v6.1], fetched 2026-09-14 UTC. Processing: scripts/process/satellite.py, scripts/process/global_temp.py.
Two of the three classical greenhouse fingerprints are strong in the data used here and the third is not,
which the chart shows rather than hides. The Arctic is warming about 3.3 times as fast
as the globe, computed here from GISTEMP’s 64–90°N band over 1979–2025 (Rantanen and colleagues,
with several observational datasets, report “nearly four times faster than the globe”
since 1979 Rantanen et al. 2022), stratospheric cooling is present and is clearest higher up
Santer et al. 2023, and the day–night asymmetry that held over 1950–1979 is not visible in global land
data since 1979 Vose et al. 2005.
Formal attribution: how much of the warming is human
Simulations reproduce the observed record only when human forcings are included; the assessed human
contribution to warming since 1850–1900 is close to all of it, with a stated range, and reported CO₂
emissions account for the observed atmospheric increase.
Detection and attribution is a statistical procedure, not an assertion: it asks whether the observed
pattern of change over space and time can be reproduced by natural forcings and internal variability
alone, and estimates the scaling factors that best fit the observations Allen & Tett 1999Gillett et al. 2021. IPCC AR6 states the result with its interval intact:
“Global surface temperature was 1.09 [0.95 to 1.20] °C higher in 2011–2020 than
1850–1900”IPCC AR6 WG1 SPM, and assesses the human contribution to the 1850–1900 to 2010–2019
warming as “1.07 [0.8 to 1.3] °C” — that is, essentially all of it, with the stated
uncertainty.
Simulations reproduce the observed warming only when human influences are included
Global surface temperature change relative to 1850–1900 (°C): observations, and CMIP6 simulations driven by human and natural forcing or by natural forcing alone, with their very likely ranges. Data as published for IPCC AR6 WG1 Figure SPM.1b.
Means for 2010–2019: observed 1.06 °C, human and natural simulations 1.04 °C, natural only 0.06 °CCEDA (AR6 Figure SPM.1 data). This is model output, not observation: the comparison is only as good as the models' forcing estimates and their internal variability, and some CMIP6 models have climate sensitivity above the assessed range Zelinka et al. 2020Hausfather et al. 2022. The formal detection-and-attribution results behind AR6's assessed human contribution are discussed in the text Gillett et al. 2021IPCC AR6 WG1 Ch. 3. Model values end in 2019 and observations in 2020.
Data: IPCC AR6 WG1 Figure SPM.1 data: panel a reconstructions/observations, panel b observed vs simulated [CEDA v20221116], fetched 2026-09-14 UTC. Processing: scripts/process/attribution_models.py.
Check it yourself: data attribution_ar6_spm1b.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Do reported emissions actually account for the rise in the air? Yes, and the check needs no climate
model, only a carbon ledger. Two of its four terms are measurements: the carbon released by burning fossil
fuels and making cement, tallied from energy and production statistics, and the carbon that stayed in the
atmosphere, read off the measured CO₂ concentration. Emissions are the larger of the two, so there is no
missing source to find. The other two terms, how much the ocean took up and how much went into land plants
and soils, are estimates rather than direct measurements: the Global Carbon Budget computes them with
ocean biogeochemistry models and dynamic vegetation models, and estimates emissions from land-use change
with bookkeeping models Friedlingstein et al. 2025.
Over 1960–2023 that budget finds the ocean and land sinks took up
“about 56 % of the emissions”, leaving an airborne fraction whose long-term average
over the same period is “44 %” — land-borne “30 %” and
ocean-borne “25 %”. The ledger does not close exactly: a remaining
1% imbalance is reported by its own authors as a measure of
“imperfect data and incomplete understanding” of the carbon cycle, and it is published
rather than absorbed into one of the other terms.
Two things follow, and they point in opposite directions, so both are worth stating. The rise in the air is
smaller than what was emitted, which is why emissions and concentration are not the same number and should
never be compared as if they were. And the rise in the air is fully accounted for by what was emitted,
which is what makes the comparison a check on the claim rather than a restatement of it. That half rests on two
measured quantities; how the remainder divides between ocean and land is where the models enter. The
fingerprints that identify the added carbon as fossil, rather than merely consistent with it, are in
link 3, where this accounting is the fourth of four.
Is any of the human contribution measured rather than simulated? That the added CO₂ is fossil is a measurement, not a model: its carbon is
depleted in ¹³C and the atmosphere’s oxygen falls as it accumulates (link 3). The radiative
effect of that CO₂ has been observed at both ends of the atmosphere. At the surface, spectrally resolved
instruments at two sites gave
“observationally based evidence of clear-sky CO2 surface radiative forcing that is directly attributable to the increase, between 2000 and 2010, of 22 parts per million atmospheric CO2”,
trending “0.2 W m(-2) per decade” at each Feldman et al. 2015. From orbit, the spectrum
leaving the planet deepened in exactly the greenhouse bands between 1970 and 1997, which the authors
call “direct experimental evidence for a significant increase in the Earth's greenhouse effect”Harries et al. 2001. The energy that stays is measured in the ocean (link 5), and the vertical
pattern of the warming is measured by satellites and matches greenhouse forcing rather than a brighter Sun
(link 7). What those measurements cannot do by themselves is divide the observed warming into
shares; that division is what the attribution above adds, and it is where the models enter.
The method has been criticized — most substantively by McKitrick, who argues the optimal-fingerprinting
regression violates the conditions for the estimator to be valid McKitrick 2021. That critique,
and the reply to it, are covered in is there credible evidence against it; attribution results
based on other methods, including energy-balance and pattern-scaling approaches, reach similar
conclusions about the sign and rough size of the human contribution. Bottom line: the assessed human
contribution is close to all of the observed warming, CO₂ is the largest single part of that contribution
rather than the whole of it (the other greenhouse gases add, aerosols subtract), and human activity
accounts for essentially all of the CO₂ rise.
Check it yourself: attribution_ar6_spm1b.csv in the data appendix, written
by scripts/process/attribution_models.py from the data
published with AR6 Figure SPM.1. The numbers quoted
from AR6 are quotations, marked as such, with their intervals unchanged.
Global averages are abstractions. This section asks what the instruments behind them say about
California, about Fresno, and about Thousand Oaks and Simi Valley, including the places where the local
record is too thin to answer. Whether a record can carry a trend at all is most of what makes a local
claim credible.
The short version. The state and county records warm, and their intervals exclude zero. Neither city
has a record long enough to carry a trend of its own. Water is the mixed part: no trend detected in April
snowpack at the high southern Sierra courses, a water-year precipitation mean that has barely moved,
modest evidence that the spread around that mean has widened, drought years clustered in the recent
record, and more mapped burned area since 2000.
Local numbers on this page are in °F, because that is how they were recorded and how they are used; the
switch at the top converts every number and every axis. The baseline here is 1901–2000, the only
century-long period the county, state and global series share.
Start with all four scales at once. Each stripe below is one year, coloured by how far that year sat from
its own series’ twentieth-century average, with the globe on top and the two counties at the bottom.
The globe, California, Fresno County and Ventura County all shift from cooler to warmer years
Each stripe is one year's mean temperature anomaly relative to that series' own 1901–2000 mean, on a single shared color scale (°C). Globe: NOAAGlobalTemp from 1850. California and the counties: NOAA nClimGrid from 1895.
Change between the 1895–1924 and 1996–2025 means: globe 0.97 °C, California 1.46 °C, Fresno County 1.42 °C, Ventura County 2.20 °C. The local rows are noisier because a small area averages out less weather, which is expected rather than disagreement. The color scale is shared and set by the largest anomaly in any row, so nothing is clipped, which is why the global row, whose swings are smaller, looks paler. County and state values are gridded analyses of homogenized station data, not single stations Vose et al. 2014. This chart uses 1901–2000 as its baseline so that all four rows share one period; Figure 1 uses 1850–1900.
Data: California statewide series [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC; Fresno County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC; Ventura County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/us_ca.py.
Check it yourself: data local_vs_global_anomalies.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
A stripe chart is a quick read of relative measurements. The value behind each stripe is in the data
appendix, and the same numbers appear as lines with axes in Figure 15 further down. The local rows swing
more than the global row because a county averages over far less area, so weather that cancels out globally
survives locally. The larger local swing is expected, and it is why a single warm or cold year where you live says
almost nothing about the global trend.
California is 2.62 °F warmer than in 1895–1924, and 10 of its ten warmest years came after 2000
Statewide annual mean temperature anomaly relative to 1901–2000 (°F), NOAA nClimGrid. Boxes mark the 1895–1924 and 1996–2025 means with 95% intervals. The strip below places the ten warmest years by rank.
NOAA publishes no measurement uncertainty for statewide values, so the boxes show a statistical interval: each 30-year mean with a 95% interval that allows for year-to-year autocorrelation. The difference between the two means has interval 1.87 to 3.37 °F. Linear trend 1895–2025: 0.234 °F per decade (0.182 to 0.286 °F). The warmest year in the record is 2014, and the record contains 131 complete years. nClimGrid interpolates quality-controlled, homogenized station data onto a 5 km grid Vose et al. 2014Vose et al. 2015.
Data: California statewide series [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC; Fresno County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC; Ventura County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/us_ca.py.
California’s statewide record starts in 1895 and is a gridded analysis of quality-controlled station
data, not a single thermometer Vose et al. 2014. Between the 1895–1924 and 1996–2025 means it warmed
2.62 °F (1.87 to 3.37 °F),
a trend of 0.234 °F per decade. Over the same two periods the globe warmed
1.75 °F
(0.88 to 2.63 °F; effective sample size 3.4). Land warms faster than the global average,
which is mostly ocean, and California is land.
Global, state and county records rise together; the smaller the area, the larger the year-to-year swings
Annual mean temperature anomaly relative to each series' own 1901–2000 mean, on identical axes (°C). Globe: NOAAGlobalTemp. California, Fresno County and Ventura County: NOAA nClimGrid.
Change between the 1895–1924 and 1996–2025 means, with 95% intervals: globe 0.97 °C (0.49 to 1.46 °C; effective sample size 3.4), California 1.46 °C (1.04 to 1.87 °C), Fresno County 1.42 °C (0.95 to 1.89 °C), Ventura County 2.20 °C (1.64 to 2.76 °C). A county averages over far less area than the globe, so weather that cancels out globally survives locally; the larger swings are expected, not disagreement. These intervals are conservative by construction: the autocorrelation adjustment treats the steady rise inside each 30-year window as persistence, which lowers the effective sample size. Baseline here is 1901–2000; Figure 1 uses 1850–1900.
Data: California statewide series [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC; Fresno County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC; Ventura County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/us_ca.py.
Check it yourself: data local_vs_global_anomalies.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Fresno
Fresno’s long station record illustrates why a long station record is not the same thing as a long
climate record.
Fresno airport's 1996–2025 average is 3.2 °F above its 1948–1977 average, and its nights warmed more than its days
FRESNO YOSEMITE INT'L (USW00093193), annual means computed from raw, unhomogenized daily observations (°F). Top: daily mean with a LOWESS smooth and decadal means. Bottom: daily maximum and daily minimum. Neither axis starts at zero.
Change from the 1948–1977 mean to the 1996–2025 mean: Tavg 3.2 °F (1.8 to 4.7 °F; effective sample size 6.7), Tmax 1.8 °F (0.4 to 3.1 °F; effective sample size 9.0), Tmin 4.7 °F (3.2 to 6.1 °F; effective sample size 6.6). Over 1948–2025 this station's Tmin rose 0.40 °F per decade faster than the homogenized county Tmin, a station-minus-county residual that urban growth, irrigation, siting and homogenization can all contribute to, while its Tmax tracked the county (0.00 °F per decade difference, −0.13 to 0.14 °F, which cannot be told from zero). Urban growth and irrigation both act on Central Valley nights Christy et al. 2006Bonfils & Lobell 2007Kueppers et al. 2007, so warmer nights at one airport are not by themselves a greenhouse fingerprint; the county analysis (Figure 15), the US reference network (Figure 32) and the global pattern (Figure 11) are the checks that do not depend on this station. The vertical line is the station's one recorded relocation NOAA NCEI. Years excluded by the missing-data rule: 0.
Data: ACIS ThreadEx 'Fresno Area', fetched 2026-09-14 UTC; GHCN-Daily FRESNO YOSEMITE INT'L, fetched 2026-09-14 UTC; NCEI HOMR station history for FRESNO YOSEMITE INT'L, fetched 2026-09-14 UTC; Fresno County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/stations.py.
The airport station (USW00093193) has run since 1948. Its annual mean is
3.2 °F warmer in 1996–2025 than in 1948–1977, with
daily minima up 4.7 °F and daily maxima up
1.8 °F. Nights warming faster than days is one of the
classical greenhouse fingerprints, but at a single central valley station it is also what urban growth and
irrigation could explain Christy et al. 2006Bonfils & Lobell 2007Kueppers et al. 2007. This page treats
the Fresno pattern as a local observation rather than as attribution: the station’s Tmin rose
0.40 °F per decade faster than the surrounding county’s
homogenized Tmin, while its Tmax tracked the county to
0.00 °F per decade
(−0.13 to 0.14 °F), a difference that cannot be told from
zero. Tracking the county does not mean flat: the station’s own maxima rose
0.38 °F per decade
(0.20 to 0.56 °F), and the station tracked the county to within a difference
that cannot be told from zero, so the county’s maxima rose at much the same rate. The nights simply rose
faster.
Fresno airport averages 42.5 days a year at or above 100 °F, up from 31.4; nights at or above 75 °F went from 0.7 to 10.6
FRESNO YOSEMITE INT'L (USW00093193), counted from raw daily observations. Bars are annual counts; lines are decadal means over decades with at least 8 valid years. The title compares the 1948–1977 and 1996–2025 means.
Pre-registered quasi-Poisson regression over 1948–2025: rate ratio per decade 1.07 (1.04 to 1.10) for hot days and 1.62 (1.46 to 1.80) for warm nights. Both counts are over-dispersed relative to a Poisson model (Pearson dispersion 3.3 and 3.2), which is why the intervals use the quasi-Poisson correction. The warm-night increase is partly local: see the station-minus-county difference in Figure 16. A year is counted only if no daily value is missing in May–September for hot days or June–September for warm nights; that rule excluded 0 and 0 years. The highest daily minimum in the record is 90 °F.
Threshold counts are what people actually notice. Days at or above 100 °F went from
31.4 a year in 1948–1977 to
42.5 in 1996–2025; nights at or above 75 °F went from
0.7 to 10.6. The
warm-night change is the larger one, and it is the one most affected by the station’s own surroundings.
Fresno's long record is three stations spliced together; the 1949 move shifted the annual mean, and both moves shifted the nights
ACIS ThreadEx "Fresno Area" annual mean temperature, 1888–2025 (°F), and each year's difference from homogenized Fresno County nClimGrid. The vertical lines mark the two splices, each labeled with its date: the record runs from Fresno to Chandler Downtown AP, then to Yosemite International.
Step in the station-minus-county difference, measured as the mean of the 10 years after the move minus the 10 years before it: at the 1939 move Tavg −0.5 °F (−1.1 to 0.2 °F; effective sample size 5.4) and Tmin −1.8 °F (−2.6 to −0.9 °F; effective sample size 4.5); at the 1949 move Tavg −1.1 °F (−1.6 to −0.6 °F; effective sample size 6.1) and Tmin −0.7 °F (−1.1 to −0.3 °F; effective sample size 9.0). A trend fitted straight through this spliced series would absorb those steps, so none is fitted across a splice. Removing steps like these is exactly what homogenization does, and Figure 31 shows how much it changes the global land trend. The 1948–1949 overlap days carry identical values under both station identifiers, so the 1949 step is estimated against the county series rather than from simultaneous observations. ThreadEx splicing method: ThreadEx (AMS conference paper).
Data: ACIS ThreadEx 'Fresno Area', fetched 2026-09-14 UTC; NCEI HOMR station history for FRESNO YOSEMITE INT'L, fetched 2026-09-14 UTC; Fresno County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/stations.py.
Fresno’s record before 1948 exists only as a splice of three stations, and the splice leaves steps large
enough to matter: across the 1949 move the station-minus-county difference changed by
−1.1 °F (−1.6 to −0.6 °F; effective sample size 6.1). Fresno’s
trend from 1887 shows how a record can be read as an artefact of two relocations as much as a climate
signal. That same record is a concrete example of why homogenization exists, and Figure 31 shows what
homogenization does to the global land record.
Fresno County now needs 645 fewer heating degree days and 287 more cooling degree days a year than in 1895–1924
Fresno County annual heating and cooling degree days (°F-days, base 65 °F), NOAA nClimGrid. Degree days are defined in °F and do not change with the unit toggle.
Degree days add up how far each day's mean temperature falls below (heating) or rises above (cooling) a 65 °F base, and are the standard proxy for heating and cooling demand. Change between the 1895–1924 and 1996–2025 means: heating −645 °F-days (−865 to −426), cooling 287 °F-days (189 to 385). Trends 1895–2025: heating −57 °F-days per decade, cooling 25 °F-days per decade. This is a county-wide gridded analysis, so it does not include the extra cooling demand of a city's own heat island.
Data: Fresno County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/us_ca.py.
Check it yourself: data fresno_county_degree_days.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
All 12 calendar months in California have a positive central
estimate since 1970, from 0.13 °F to
0.70 °F per decade, but 3 of them still have intervals that
include zero: February, March and May. This page claims no warming for those three, only that no month has
a negative central estimate. Winter (December–February) warmed
0.39 °F per decade and summer (June–August)
0.64 °F. Summer’s central estimate is larger, but the two intervals
overlap, so this record cannot say summers are warming faster than winters, only that both are warming. The
winter trend’s interval lies entirely above zero. The month-by-month trends, including those whose intervals
include zero, are in the data appendix.
California's winter and summer have both warmed since 1970, and the difference between them is inside the uncertainty
California statewide mean temperature, December–February and June–August, as anomalies against each season's 1901–2000 average (NOAA nClimGrid).
Trends 1970–2025: winter 0.39 °F per decade (0.12 to 0.67 °F), summer 0.64 °F per decade (0.43 to 0.85 °F). Summer's central estimate is the larger of the two, but the intervals overlap, so these data cannot say the seasons are warming at different rates, and the build fails if that stops being true. This chart is seasonal and starts in 1895; the months are a different calculation, in the data appendix. All 12 calendar months have a positive central trend over 1970–2025, from 0.13 °F to 0.70 °F per decade, but 3 of them have intervals that include zero: February, March and May. A positive central value is all the monthly data support for those three.
Data: California statewide series [nClimGrid (Climate at a Glance)], fetched 2026-09-16 UTC. Processing: scripts/process/seasonality.py.
Check it yourself: data california_monthly_tavg.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Thousand Oaks and Simi Valley
For these two cities, the instrumental records cannot support a climate trend, and the chart shows why.
Ventura County is 3.96 °F warmer than in 1895–1924, but no station in Thousand Oaks or Simi Valley has a record long enough to show it
Annual mean temperature (°F). Top: the Ventura County nClimGrid analysis (a gridded product, not a station) with the three nearest long-running stations. Bottom: two gridded products evaluated at each city's coordinates, and that city's short RAWS fire-weather record. Sites differ in altitude and exposure, so their levels differ; axes do not start at zero.
This is the county-level gridded analysis, not a station in Thousand Oaks. No station in Thousand Oaks has a record long enough to compute a climate trend, and neither does Simi Valley: their RAWS fire-weather stations have 7 and 5 complete years, so no trend is drawn through them. The three nearest long-running stations get no trend either, because each record breaks for decades: Woodland Hills Pierce College (24 km from Thousand Oaks) has no valid annual mean from 1991 to 2011, Camarillo Airport (23 km) none from 1969 to 1999, and Ojai (47 km) none from 1982 to 2008; this page fits no line across a gap like that. Each is compared with the county across its gap instead, as station minus county, the check applied to Fresno in Figure 16. Woodland Hills 0.5 °F (−0.7 to 1.6 °F; effective sample size 4.9) and Camarillo 0.2 °F (−1.6 to 2.0 °F; effective sample size 4.6) show no difference that can be told from zero. Ojai does: its own mean changed by −0.1 °F (−0.9 to 0.7 °F) while the county's rose 3.3 °F over the same years, a station-minus-county change of −3.4 °F (−4.5 to −2.4 °F; effective sample size 6.9). A record broken for that long cannot say whether the difference is Ojai's own climate or a change of site or instruments inside the gap. PRISM Daly et al. 2008 and Livneh Livneh et al. 2015 interpolate largely the same station network, so they are drawn as levels rather than as independent evidence and get no trend; Livneh values after 2011 are excluded because they depart from PRISM by more than their earlier offset.
Data: PRISM gridded annual Tavg/Tmax/Tmin, 1981-2025, at Thousand Oaks and Simi Valley coordinates, fetched 2026-09-14 UTC; ACIS StnMeta inventories: Conejo/Simi box, Fresno box, wide Ventura/west LA box; ThreadEx FATthr metadata, fetched 2026-09-14 UTC; Livneh observed gridded yearly Tmax/Tmin, fetched 2026-09-14 UTC; GHCN-Daily CAMARILLO AP, fetched 2026-09-14 UTC; GHCN-Daily OJAI, fetched 2026-09-14 UTC; GHCN-Daily WOODLAND HILLS PIERCE COLLEGE, fetched 2026-09-14 UTC; GHCN-Daily SIMI VALLEY CALIFORNIA RAWS, fetched 2026-09-14 UTC; GHCN-Daily THOUSAND OAKS 1 SW, fetched 2026-09-14 UTC; GHCN-Daily THOUSAND OAKS CALIFORNIA RAWS, fetched 2026-09-14 UTC; Ventura County, CA [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/stations.py.
The fire-weather (RAWS) stations at Thousand Oaks and Simi Valley have
7 and 5 complete
years of data. RAWS instruments are sited for fire behavior, not climate monitoring, and are not
homogenized; ten years of them cannot produce a trend, so none is drawn. What can be said is:
Ventura County, the gridded analysis both cities sit in, warmed
3.96 °F
(2.95 to 4.97 °F) between 1895–1924 and 1996–2025.
The nearest long-running stations carry no annual-mean trend. Woodland Hills Pierce College
(24 km away), Camarillo Airport
(23 km) and Ojai
(47 km) each go decades without a valid annual mean — Ojai
has none from 1982 to
2008 — and this page fits no trend across a gap like that, for
the same reason it fits none across Fresno’s station moves: a change of site or instruments can hide
inside it.
One element at one of them does carry a trend, and it belongs here rather than in a file. Woodland
Hills’ nightly minima survive quality control where its daily maxima do not, so the Tmin series has
fewer holes than the annual mean built from it: over its valid years it warmed
0.66 °F per decade
(0.27 to 1.04 °F), which agrees in direction with the county. Two
things have to be said beside it. It clears this page’s completeness rule with no margin —
8 valid years in its emptiest decade, against a
requirement of 8 — so one more missing year would have refused it. And a single station’s
night-time minima are the quantity most exposed to its own surroundings, which is the argument this page
makes about Fresno. It is a check on the county analysis, not a substitute for it.
Compared with the county across their gaps instead, using the station-minus-county check applied
to Fresno, Woodland Hills (0.5 °F,
−0.7 to 1.6 °F; effective sample size 4.9) and Camarillo
(0.2 °F,
−1.6 to 2.0 °F; effective sample size 4.6) show no difference that can be told from
zero. Ojai does: its own mean changed by −0.1 °F
(−0.9 to 0.7 °F, an interval that includes zero) while the
county’s rose 3.3 °F over the same years, a
station-minus-county change of −3.4 °F
(−4.5 to −2.4 °F; effective sample size 6.9). That difference is well clear of zero,
and a record broken for decades cannot say whether it is Ojai’s own climate or a change inside the
gap.
What the county record can do, because it is gridded and unbroken, is answer the question at the scale
people actually notice weather: a single month. Here is every October in Ventura County since 1895.
October in Ventura County is 4.4 °F warmer than it was in 1895–1924, in a month whose coldest and warmest years are 15.4 °F apart
Mean temperature for the month of October in Ventura County, every year from 1895 to 2025 (°F). Each point is one October. The line is a LOWESS smooth, and the two bars are the 1895–1924 and 1996–2025 means, the same thirty-year endpoints every other local comparison on this page uses. The axis does not start at zero.
This is the county's gridded analysis, not a thermometer in a town: no station in Ventura County has a record of this length, which is the point Figure 21 develops. The change between the two thirty-year means is 4.36 °F (2.99 to 5.73 °F), against 3.96 °F for the county's whole year (2.95 to 4.97 °F). This page does not claim October warms faster than the rest of the year, in either direction: the two series come from the same grid and October is one twelfth of the annual mean, so they are not independent, and the difference between them was not tested here. What one month of one county shows better than any annual chart is how much noise a trend has to climb out of: the warmest October in the record (2015, 67.4 °F) and the coldest (1916, 52.0 °F) are 15.4 °F apart, more than three times the whole change being measured, and the year-to-year standard deviation alone is 2.7 °F, well over half of that change. One warm October is weather; 131 of them are climate. The trend over the full record is 0.43 °F per decade (0.33 to 0.53 °F); since 1970 it is 0.71 °F (0.35 to 1.07 °F). nClimGrid interpolates quality-controlled, homogenized station data onto a 5 km grid Vose et al. 2014Vose et al. 2015. The early decades of that grid rest on a thinner station network, much of it outside the county, so the first values here are more uncertain than the last, which is one more reason the change is measured between two thirty-year means rather than between two years.
Data: Ventura County, CA [nClimGrid (Climate at a Glance)], fetched 2026-10-06 UTC. Processing: scripts/process/seasonality.py.
Check it yourself: data ventura_october_tavg.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
October in the county is 4.36 °F warmer in 1996–2025
than it was in 1895–1924 (2.99 to 5.73 °F), against
3.96 °F for the county’s year as a whole
(2.95 to 4.97 °F). This page does not claim October is warming faster
than the rest of the year: the two series are built from the same grid and October is one twelfth of the
annual mean, so they are not independent, and no test of the difference between them was run here. The more
useful thing a single month shows is the size of the noise a trend has to climb out of. The warmest October
in the record (2015) and the coolest
(1916) are 15.4 °F apart — more
than three times the change being measured — and the year-to-year standard deviation alone is
2.7 °F. One warm October is weather. It takes most of the
record’s 131 Octobers before the trend is anything but a guess,
which is why a town’s short record cannot answer this question and a century of county grid can.
Water, fire and the coast
The local questions that matter most in California are about water, not temperature, and the water
evidence is the most mixed on this page.
April 1 snowpack at these high southern-Sierra courses shows no clear trend since 1950, only very large swings
April 1 snow water equivalent: each snow course as a percent of its own 1951–2000 average, averaged over the Kings and San Joaquin basin courses that meet the coverage rule (California Department of Water Resources, CDEC).
Trend 1950–2025 across 34 courses: 1.3 percentage points per decade (−4.8 to 7.3); 1930–2025 across 20 courses: −0.3 (−4.4 to 3.8). Neither interval excludes zero, so this analysis finds no trend. The index reached 8% in 2015 and 245% in 2023. These courses are high (median elevation 8,800 ft), where April snow responds least to warming. Mote and colleagues report that “over 90% of snow monitoring sites with long records across the western US now show declines”Mote et al. 2018, a regional result this southern-Sierra subset does not reproduce. The snow-versus-rain fraction is not plotted: no dataset fetched in this build supports it.
April 1 snowpack at the high Kings and San Joaquin courses shows no trend over 1950–2025:
1.3 percentage points per decade
(−4.8 to 7.3). These are high courses (median elevation
8,800 ft), where warming has the least purchase on April snow,
and a regional study of long-record western sites finds declines at most of them
Mote et al. 2018. Both things are true: the western pattern is downward, and this particular high-
elevation subset does not show it. What the record does show is volatility:
8% of average in 2015,
245% in 2023.
California's average precipitation has barely changed since 1896; the evidence that its swings widened is modest
Statewide water-year precipitation (inches, October–September, NOAA nClimGrid). Top: annual totals with the 1896–1960 and 1961–2025 means. Bottom: the standard deviation of the 30 water years ending in each year.
Pre-registered Brown–Forsythe test of equal variance, water years 1896–1960 against 1961–2025: p = 0.043. Standard deviation 5.29 → 6.89 inches; coefficient of variation 0.24 → 0.31; means 22.0 and 22.2 inches. One test at α = 0.05 with p close to the threshold is modest evidence, and the result depends on where the record is split; the rolling standard deviation shows how much that quantity moves on its own. Its step up between the mid-1970s and 1983 comes mostly from a handful of extreme years entering the 30-year window, above all the dry 1977 and the very wet 1983 water years, so it is not a separate sign of a change in regime. Swain and colleagues set out the physical reasons to expect more volatile precipitation as the atmosphere warms, and report the increase as a global average rather than a California-specific finding Swain et al. 2025Diffenbaugh et al. 2015; their earlier work projected the same for California in particular Swain et al. 2018.
Data: California statewide series [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/us_ca.py.
Check it yourself: data california_precip_water_year.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Water-year precipitation tells a similar story: the mean has barely moved
(22.0 inches in 1896–1960 against 22.2 inches in
1961–2025) while the spread has widened (standard deviation 5.29 to
6.89 inches; pre-registered Brown–Forsythe p = 0.043). That p is
just under the 0.05 line from a single test, which is modest evidence and is reported as such.
Does a flat state average hide a wetter north and a drier south? No. In every one of NOAA’s
7 California climate divisions, the 95% interval on the precipitation trend
includes zero. The question is a fair one, because the state is long enough for its two ends to differ
sharply: its north coast gets 48.0 inches in an average water year and its
south-eastern desert gets 6.1. Those divisions are also the finest scale NOAA
publishes a long homogeneous precipitation record for, back to 1896.
No California climate division has a precipitation trend that can be told from zero, and the intervals are wide enough to allow anything from −2.6% to 1.8% per decade, so this is a limit of the record rather than a finding of no change
OLS trend in water-year (October–September) precipitation, 1896–2025, for each of NOAA's seven California climate divisions, ordered north to south and coloured in three bands: the northern three, the two central ones, then the two southernmost. Each trend is a percent of that division's own long-term mean per decade, so a rainforest division and a desert division can be read off one axis. Bars are 95% intervals, corrected for year-to-year autocorrelation. In this series there is almost none, so nearly all of that width is ordinary sampling uncertainty.
California's statewide water-year precipitation mean has barely moved (22.0 inches over 1896–1960 against 22.2 inches over 1961–2025), and the obvious next question is whether that flat state average hides a wetter north and a drier south. At the finest scale NOAA publishes a long homogeneous record for, it does not. 0 of 7 divisions have an interval that excludes zero, and the "wetter north" half of the question fails before the intervals are even considered: the three northern divisions average −0.17% of their own mean per decade, which is also dry. What is true is narrower: the two southernmost divisions hold the two driest central estimates, averaging −0.70%, and the rest show no ordered pattern down the state, with the single wettest central estimate sitting in the middle band rather than in the north. Neither average carries an interval of its own, because averaging estimates that each include zero produces nothing this page can put a 95% interval on, and the gap between the two averages sits well inside the uncertainty of either. Precipitation in a Mediterranean climate arrives in a handful of winter storms, so the year-to-year variance is enormous and a century of it is not long enough to resolve a small trend. What has changed is that spread, not the total: statewide, the standard deviation of water-year precipitation went from 5.29 to 6.89 inches (Brown–Forsythe p = 0.043), and run on each division separately the same test finds the spread wider in the later period in all 7 of them, with p below 0.12 in 6. That is not seven confirmations of the statewide result: the seven divisions compose the statewide series and are not independent of it, so it is the same result seen seven times. Every division's p is in the data table, and none was selected for being small.
Data: California climate divisions 1-7: water-year [nClimDiv (Climate at a Glance)], fetched 2026-10-06 UTC. Processing: scripts/process/california_drought.py.
The “wetter north” half of the question fails before the intervals are even considered: the three northern
divisions average −0.17% of their own mean per decade, which is itself dry. What
survives is narrower — the two southernmost divisions hold the two driest central estimates, averaging
−0.70% — and between them the state shows no ordered pattern, with the single
wettest central estimate sitting in the middle of the state rather than at the top of it. Neither average carries an interval of its own, because averaging
estimates that each include zero produces nothing this page can put an interval on, and the gap between
the two averages sits well inside the uncertainty of either. Precipitation here arrives in a handful of winter storms, so its year-to-year variance
is enormous and a century of it is not long enough to resolve a trend this small: the intervals run from
−2.6% to 1.8% per decade, so this record
cannot rule out a drying of roughly a quarter over a century, or a wettening of close to a fifth. That is a limit of the record
rather than evidence that nothing is changing.
Drought is a different question from rainfall, and it has a different answer. A drought index is a water
balance: it asks whether the moisture arriving covers what the ground and the air take away, so a warmer year
with the same rainfall scores drier. NOAA publishes three Palmer indices for California from 1895, each
meant to measure a different timescale of that balance.
California has spent 38 of 131 years at least half in moderate meteorological drought: 22 separate droughts, of which 7 began in the most recent thirty years
How many of each year's twelve months sat at or below −2.0 on each of NOAA's three Palmer drought indices for California, 1895 to 2025. NOAA calls that value the boundary of moderate drought. One panel per index, on one shared scale of nought to twelve months.
The three indices are not three independent measurements. One water-balance model is run on one set of precipitation and temperature inputs, and the three are different time-integrations of its output, so their agreement is not corroboration and nothing here treats it as such. They are published as measuring different things: the Palmer Drought Severity Index is “a meteorological drought index used to assess the severity of dry or wet spells of weather”, the Palmer Hydrological Drought Index is “a hydrological drought index used to assess long-term moisture supply”, and the Palmer Z-Index is a month-by-month moisture anomaly which “can respond to a month of above-normal precipitation, even during periods of drought”NOAA National Centers forU.S. Weather Bureau. In this record the first two barely differ: they give the same month count in 112 of the 131 years, so the second panel is close to a redraw of the first rather than a second check on it. The third panel really is different, and sparse for a reason: a memoryless monthly index spends far less of its time below any fixed line. **The counts, and what they are counts of.** Taking a drought year to be one with at least 6 months at or below the line: 38 meteorological, 38 hydrological and 4 short-term, with 4 years in drought on all three at once. Those years are not independent draws: they come in runs. The 38 meteorological drought years are 22 separate droughts averaging 1.7 years each, and the 15 of them that fall in the most recent thirty years are 7 droughts. So the recent concentration is partly that recent droughts have run longer, not only that there have been more of them. No trend is fitted to any of this, for that reason. The worst year on both longer indices is 2014; 2025 is the last year with all twelve months, and later months exist but their year does not yet. **Three limits worth stating plainly.** NOAA publishes drought categories for the first two indices and not for the third, so applying the same line to the Z-Index is a choice made in this repository for comparability rather than a NOAA category. NOAA calibrates these indices on 1931–1990, so −2.0 is "moderate drought" relative to that window rather than to the whole record plotted here. And a Palmer index is a water balance, so a warmer year with the same rainfall scores drier, which is the point when the question is drought and a trap when the question is rainfall. That last property is also the index's most contested: NOAA's climate-division Palmer indices estimate evaporative demand from temperature alone, and Sheffield and colleagues argue that this overstates how much drier warming makes a place, finding “there has been little change in drought over the past 60 years” with a more complete formulation Sheffield et al. 2012; Trenberth and colleagues answer that the choice of formulation is not what decides the result Trenberth et al. 2013. The bias, if it is one, runs toward *more* drought, so this chart should be read as the generous case rather than the conservative one. Rainfall on its own, with no evaporative demand in it at all, has its own chart: Figure 25.
Data: California statewide Palmer drought indices [nClimDiv (Climate at a Glance)], fetched 2026-10-06 UTC. Processing: scripts/process/california_drought.py.
Check it yourself: data california_drought_annual.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Of the 131 years in the record, 38 spent at least half
their months in moderate-or-worse meteorological drought, and
15 of those fall in the most recent thirty years — a span that is
under a quarter of the record. Those are years, not droughts, and drought years come in runs: the
38 are 22 separate droughts, and the
recent 15 are
7 of them. So part of what the recent concentration measures is
that recent droughts have lasted longer, not only that there have been more. No trend is fitted to the
counts, for that reason.
Three cautions belong beside those counts. The three indices are not independent evidence (one
water-balance model, one set of inputs, three time-integrations of its output), and in this record the
first two barely differ at all, giving the same month count in 112 of the
131 years, so the second panel is close to a redraw of the first. Because the model
counts temperature as well as rain, a warming state drifts toward drought even if its rainfall never
changes, which connects the drought panels to the precipitation record above them rather than adding a
separate finding. And how that model turns
temperature into evaporative demand is the part of it that is actually disputed: Sheffield and colleagues
argue the temperature-only formulation NOAA uses overstates the drying Sheffield et al. 2012 and Trenberth
and colleagues answer that it is not what decides the result Trenberth et al. 2013. If there is a bias, it
runs toward more drought, so read this chart as the generous case.
California's mapped burned area averaged 0.28 million acres a year before 2000 and 0.86 after, in a record whose early decades are the least complete
Top: area burned by fires recorded in CAL FIRE's FRAP perimeter database (acres per year). Bottom: California April–October mean daily maximum temperature anomaly (°F relative to 1901–2000, nClimGrid), a warm-season heat proxy rather than the fuel-aridity index used in attribution studies.
Means: 0.28 million acres a year over 1950–1999 and 0.86 over 2000–2025; the largest year was 2020 at 4.2 million acres. CAL FIRE cautions that this perimeter database needs care for statistics, because of missing perimeters, lost records and minimum-size cutoffs, and the earlier decades are the least complete, which inflates any apparent increase CAL FIRE. Fire has several causes: most US wildfires are started by people Balch et al. 2017, and fuel-dominated and wind-dominated fires differ in geography, season and management Keeley & Syphard 2019. The climate contribution is a measured share, not the whole: Abatzoglou and Williams attribute “∼55%” of the 1979–2015 increase in western US forest fuel aridity to human-caused climate change Abatzoglou & Williams 2016, and Williams and colleagues find the clearest warming effect in summer forest fires rather than wind-driven autumn fires Williams et al. 2019Turco et al. 2023. Marked: the Thomas Fire (282,000 acres, 20% of that year's mapped area) and the Woolsey Fire (90,000 acres), both of which burned in Ventura County.
Data: CAL FIRE FRAP fire perimeters: acres and fire count by year; Thomas, fetched 2026-09-14 UTC; California statewide series [nClimGrid (Climate at a Glance)], fetched 2026-09-14 UTC. Processing: scripts/process/hydro_fire_snow.py, scripts/process/us_ca.py.
Check it yourself: data california_burned_area.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Burned area rose from 0.28 to
0.86 million acres a year after 2000, over a period when
April–October maximum temperatures rose 2.75 °F. Fire has
many causes (ignitions, fuel, wind, where people build), and the quantified climate share is a share,
not the whole Abatzoglou & Williams 2016Williams et al. 2019Keeley & Syphard 2019Balch et al. 2017. The
Thomas and Woolsey fires, both marked on the chart, burned in Ventura County in
2017 and 2018.
Sea level at San Francisco is 186 mm higher than in 1900–1929
Annual mean sea level (mm, relative to 1993–2012): the San Francisco tide gauge, one of the world's longest records, and satellite global mean sea level.
Tide-gauge trend 1855–2025: 1.52 mm per year (1.31 to 1.73); since 1993, 2.3 mm per year (0.5 to 4.0). Change between the 1900–1929 and 1996–2025 means: 186 mm (155 to 217). No trend is fitted here to the 32-year satellite series, because its effective sample size falls below this page's minimum, and the published satellite rate is “3 ± 0.4 mm/y since 1993”, which the same analysis finds to be accelerating Nerem et al. 2018. A tide gauge measures the sea against the land it stands on, so vertical land motion and regional ocean circulation make any single gauge differ from the global mean; the two lines are not expected to match PSMSL data paper 2012Frederikse et al. 2020Nerem et al. 2018.
Data: NOAA LSA satellite-altimetry global mean sea level, 66S-66N, seasonal signal removed, fetched 2026-09-14 UTC; PSMSL Revised Local Reference, San Francisco, fetched 2026-09-14 UTC. Processing: scripts/process/sealevel_ice.py.
Check it yourself: data sea_level_san_francisco.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Sea level at San Francisco, the longest tide-gauge record on the Pacific coast, is
186 mm higher in 1996–2025 than in 1900–1929
(155 to 217), rising at
1.52 mm a year since 1855.
What this section supports, in one line. Temperature at county and state scale is clear, and it is
consistent with the global record, running warmer because land warms faster than an average that is mostly
ocean. Thousand Oaks and Simi Valley cannot be answered from their own records at all. The water questions
divide: sea level rises on a fitted trend whose interval excludes zero, mapped burned area is higher since
2000 in a record whose early decades are the least complete, snowpack and precipitation show no trend this
record can detect, and drought sits between them because a drought index counts heat as well as rain.
Yes. There is credible published work that disputes parts of the mainstream position, and there is a
great deal of confident material that does not survive contact with data. This section covers the
first kind. Each argument below is stated in its strongest form, in the words its authors would
recognize, before the reply; where the argument is partly right, it says so.
What would count as evidence against the core conclusion is worth stating before looking at any of it.
The conclusion here is the evidence chain in the previous section. It would be overturned by:
CO₂’s infrared absorption behaving differently in the atmosphere than
in the laboratory; an isotopic or budget analysis showing the added CO₂ is not fossil
(link 3); an energy inventory showing the planet is not accumulating heat, which is why the
ocean record is on this page; a vertical pattern of temperature change that matches solar rather than
greenhouse forcing; a measured ocean uptake persistently larger than the assessed human forcing, which
would mean the accounting is wrong somewhere and something other than the known forcings is adding
energy; or a natural mechanism that
reproduces both the magnitude and the pattern without greenhouse forcing. Every one of those but the last
is a measurement someone could go and make.
Human activity being the cause of current and projected warming could be overturned if the human share of
CO₂ were shown to be an insignificant fraction of the CO₂ rise and that CO₂ rise was insignificant to
warming. Human activity produced 2.61 W m⁻²
(2.06 to 3.23) of effective radiative forcing between
1850–1900 and 2015–2024, against 0.03 W m⁻²
(−0.01 to 0.07) from the Sun Smith et al. 2025.
Meanwhile the upper ocean gained 0.86 W m⁻² over
2013–2025, averaged across the planet.
To overturn the projected warming, you need evidence that equilibrium climate sensitivity (ECS) is
substantially lower than the range used here. Low ECS would not mean human CO₂ failed to cause the warming
already observed; it would mean the same forcing produces less warming in the future.
IPCC AR6 gives a very likely ECS range beginning at “2°C”, with a best estimate of
“3°C”IPCC AR6 WG1 SPM. The relevant falsification test is therefore an observationally
constrained ECS estimate with a central value below 2°C, using an analysis that accounts for the
pattern effect, and independently reproduced.
The energy-budget estimate discussed below already has a median below 2°C, and whether it
adequately accounts for the pattern effect is unresolved. An analysis that cleared both tests, robustly
and reproduced independently, would put the projected warming here outside its stated evidential basis.
The papers below make narrower claims than that, and some of them are disputed. None of them disputes the
central link, that added CO₂ is warming the planet: the substantive disagreement is primarily about how
much warming a given forcing ultimately produces, which is the first argument in this section.
Climate sensitivity may be at the low end of the assessed range
The argument. Estimates of equilibrium climate sensitivity that use the historical energy budget —
observed warming, estimated forcing and observed ocean heat uptake — systematically land lower than
estimates from models or paleoclimate. Lewis and Curry, using the IPCC’s own AR5 forcing estimates, report
that “medians are derived for ECS of 1.50 K (5%–95% range: 1.05–2.45 K) and for TCR of
1.20 K (5%–95% range: 0.9–1.7 K)” — an equilibrium sensitivity whose median sits below the bottom of the
range assessed from all lines of evidence, and whose upper bound is “much lower” than
earlier energy-budget work gave. The argument is that the higher values depend on model structure rather
than observation Lewis & Curry 2018Lewis 2022.
The reply.Feedbacks are not constant: the spatial pattern of sea-surface warming determines the
strength of the cloud and lapse-rate feedbacks, so an energy-budget estimate computed over a historical
period with a particular warming pattern underestimates the long-run value — the “pattern effect”
Armour 2017. The multi-line assessment that combines process understanding, historical warming
and paleoclimate constraints narrowed the likely range but kept its width Sherwood et al. 2020; the
glacial-cooling constraint inside that assessment has since been revisited with proxy data assimilation
Tierney et al. 2020Osman et al. 2021.
Verdict: partly right, and it matters. Sensitivity is uncertain, this page says so
(see where the evidence is weaker), and the low end is not excluded. A low
sensitivity would still refute nothing in the chain: every link there measures what has already happened.
Models warm the tropical upper troposphere faster than observations do
The argument. In the tropical 200–300 hPa layer, where models predict amplified warming from moist
convection, the observed trends run below the modeled ones. McKitrick and Christy treat model sensitivity
as a testable hypothesis and report that, comparing modeled with observed trends over about sixty years,
“all models warm more rapidly than observations and in the majority of individual cases
the discrepancy is statistically significant”, which they argue is
“informative evidence against the major hypothesis in most current climate models”McKitrick & Christy 2018.
The reply. Part of the gap comes from the forcings the models were given rather than from their
physics: the simulations used forcings that diverged from what actually happened after 2000. Part comes
from structural uncertainty in the satellite records themselves, which is large in exactly this layer
Santer et al. 2017Mears & Wentz 2017. The disagreement between RSS and UAH visible in
Figure 11 is that structural uncertainty made concrete.
Verdict: partly right. A real, unresolved model–observation discrepancy in one diagnostic. It does not
touch the surface record, the ocean heat content, the isotopes, or the stratospheric cooling.
The statistics behind optimal fingerprinting are unreliable
The argument. Optimal fingerprinting regresses observations on model-simulated patterns using
generalized least squares, following Allen and Tett’s 1999 method. McKitrick’s claim about that method is
not a matter of degree: he writes that its authors
“stated the GM Theorem incorrectly, omitting a critical condition altogether”, that
“their GLS method cannot satisfy the GM conditions”, and that
“their variance estimator is inconsistent by construction”. On that account the
attribution intervals built with it are not what they claim to be McKitrick 2021Allen & Tett 1999.
The reply, and the structure of the argument. This is a critique of one estimator, not of the
evidence. Attribution results that do not use it — the energy-budget accounting of link 5, the vertical
pattern of link 7, and simple comparisons of observed change against natural-forcing-only simulations —
point the same way, and the assessed human contribution rests on multiple lines
Gillett et al. 2021IPCC AR6 WG1 Ch. 3.
Verdict: right but narrow. Take the critique at face value and the attribution interval becomes
less certain than stated; the sign and rough magnitude do not depend on that estimator.
Solar reconstructions could allow a larger solar role
The argument. Total solar irradiance before the satellite era is a reconstruction, and the choice
among published reconstructions is unresolved. Connolly and colleagues compile sixteen of them against five
temperature series and conclude that the answer depends on which you pick: the fits span
“everything from no role for the Sun in recent decades (implying that recent global warming
is mostly human-caused) to most of the recent global warming being due to changes in solar activity”.
They argue that studies settling on the first did so because they
“failed to adequately consider all the relevant estimates of TSI”Connolly et al. 2021.
The reply. Richardson and Benestad show the fit depends on statistical choices that do not hold up,
and that the reconstructions favoured are inconsistent with independent constraints
Richardson & Benestad 2022. Independently of that dispute, the satellite era, where irradiance is
measured rather than reconstructed, shows no trend that could account for the warming
(mean irradiance across the eleven-year solar cycle24
(2008–2019) was
−0.12 W m⁻² below cycle 22
(1986–1996)), and solar forcing does not
produce stratospheric cooling.
Verdict: partly right about the uncertainty, wrong about the conclusion. Pre-1978 solar forcing is
uncertain; the modern period is not, and the pattern test does not depend on the solar
reconstruction at all.
Homogenization blends urban warming into rural stations
The argument. Pairwise homogenization compares each station against neighbors. Where the neighbors
are themselves urbanizing, the procedure can spread urban warming across a network rather than removing it.
Katata and colleagues call that “urban blending”, which
“arises when the homogenization process inadvertently mixes urbanization biases of
neighboring stations into the adjustments applied to each station record”, with the result that
“urbanization biases of the original unhomogenized temperature records are spread throughout
the homogenized” data. Examining Japanese and other records, they conclude that
“urban blending is a major problem for the homogenized data for both countries”Katata et al. 2023.
The reply. The test that does not depend on homogenization is the US Climate Reference Network,
built from scratch at rural sites chosen to avoid siting and urbanization effects. Over 2005–2025 the mean
difference between it and the adjusted network, computed here, is 0.01 °C
(−0.08 to 0.09 °C; effective sample size 4.2), an interval that includes zero, and
Figure 32 shows both series. That is agreement on average, not agreement in rate. The effect
claimed is a difference in rates, and over twenty-one autocorrelated years the trend of the difference
series falls below this page’s own minimum, so no drift is claimed here in either direction. The published
test of rates compared nearby station pairs from the two networks over 2004–2015 and found that
adjustments “make both trends and monthly anomalies from USHCN stations much more similar to those of neighboring USCRN stations”Hausfather et al. 2016; urban effects in the longer US record are examined in Hausfather et al. 2013.
The global network has been tested without a reference network at all, by what is called here the
satellite night-lights test: the GISS analysis uses satellite night lights to find the stations
sitting in unlit places and adjusts the rest against them,
“verifying that urban effects on analyzed global change are small”Hansen et al. 2010.
Raw against adjusted GHCNm station data, computed for this page, is in Figure 31.
Verdict: not supported where it has been tested; this page’s own test cannot yet decide it. The
published comparison cited here finds adjustment moving stations toward the reference network; this
page’s twenty-one years cannot yet test rates, and whether blending matters in networks and periods
without a reference network is not resolved by either — though the satellite night-lights test above
finds any urban effect on the global record small Hansen et al. 2010. The claim also has to survive the
unadjusted data, which is gridded here with the same code as the adjusted data: over 1900–2024 the
unadjusted stations warm 0.117 °C per decade
(0.084 to 0.151 °C) against 0.140 °C adjusted
(0.108 to 0.171 °C), and over 1970–2024 0.294 °C against
0.312 °C (Figure 31). The adjustments do raise the trend, by
0.022 °C per decade since 1900
(0.019 to 0.025 °C), a difference well clear of zero, so this is not
a claim that the two records agree. It is that the warming does not come from the adjustments: the raw
stations, untouched, give most of it.
Arguments that do not survive the data
Three recurrent claims come with published journal versions, and each has a published reply:
Natural CO₂ dominates and human CO₂ washes out quicklyHarde 2017, answered in detail by
Köhler and colleagues, who show the analysis conflicts with the isotopic and budget evidence in
link 3Köhler et al. 2018.
CO₂ follows temperature rather than leading itHumlum et al. 2013, answered by Richardson and by
Masters and Benestad, who show the method removes the long-term trend before measuring the lag and so
cannot detect it Richardson 2013Masters & Benestad 2013.
Each is treated at more length, in its strongest form, in the common claims section.
What this adds up to
The strongest dissent is about how much and how fast, not about whether. It argues the low end
of sensitivity, a discrepancy in one atmospheric layer, the validity of one estimator, and the size of the
pre-satellite solar term. None of it disputes that CO₂ absorbs infrared, that it has risen
111 ppm since 1959, that the increase is fossil, that the ocean is
accumulating heat, or that the stratosphere is cooling while the troposphere warms. A page that told you
there was no serious disagreement in this field would be lying to you; a page that told you the
disagreement reached the core conclusion would be lying too.
Extreme weather is both a difficult and a useful test of climate change. Individual events are noisy and can have many causes, so attributing any single event is often uncertain. But some types of extremes have changed enough, and consistently enough, that the broader trend can be measured.
“Extreme weather” is not one question. Heat extremes, heavy rain, drought and
hurricanes have different physics, different record lengths and different answers; treating them as one
question lets parties reach conclusions that the data for any single category do not support.
Hurricanes: frequency is not trending
Continental US hurricane landfalls have been counted since 1900, and no trend in the count can be
detected. Over the whole record the rate ratio per century is
0.92 for all hurricanes
(0.64 to 1.33) and
1.05 for major hurricanes
(0.55 to 1.98), where a ratio of 1 would mean no
change, with likelihood-ratio p-values of 0.66 and
0.89 (Figure 34).
Those intervals are the point, and they cut both ways. The landfall record does not support a claim that
US hurricanes have become more frequent, but the landfall count is a small, noisy sample, and it cannot
rule out a change of roughly a third in either direction over a century, or close to a doubling for major
hurricanes.
“No trend detected” is what this record can say. “No trend” is more than it can say.
Landfall counts are also a poor instrument for the question. They depend on where storms happen to go, they
say nothing about storms that stay at sea, and the record’s early decades pre-date aircraft and satellite
reconnaissance, a point made in both directions in the better-reporting card.
What the assessed literature does claim about storms
The assessed literature claims intensity and rainfall, not total storm counts. AR6 attributes to human influence
“the intensification of heavy precipitation” including that associated with tropical
cyclones, at medium confidence for the cyclone part IPCC AR6 WG1 Ch. 11. That is a narrower statement than
“more hurricanes”, and this page does not stretch it: the frequency result above and the intensity
literature are not in conflict, because they are about different quantities.
Temperature extremes are the category where the measurement is longest, the physics is simplest and the
signal is largest. AR6’s assessment is that
“The frequency and intensity of hot extremes (including heatwaves) have increased, and those of cold extremes have decreased on the global scale since 1950”IPCC AR6 WG1 Ch. 11.
This page’s own California numbers point the same way without needing the assessment: Fresno County now runs
287 more cooling degree days and
645 fewer heating degree days a year than in 1895–1924
(Figure 19), and all 12 calendar months in the state
have a positive central trend since 1970, though for 3 of them, February, March and May, the
interval includes zero, so a positive central value is all the monthly data support there
(Figure 20).
Drought, and the different ways to be dry
Drought is three different things, and they do not trend together: meteorological (rain), agricultural
and ecological (soil moisture and evaporative demand), and hydrological (runoff and storage). AR6 reports that
“Increasing trends in agricultural and ecological droughts have been observed on all continents”
in a set of named regions, at medium confidence IPCC AR6 WG1 Ch. 11, while meteorological drought trends
are much patchier. California’s average annual precipitation has barely changed (Figure 24);
how drought there has changed anyway is set out in the costs section.
What a reader should take from weather extreme trends
Ranked by how well the trend is established: heat extremes first; then the intensification of
heavy rainfall; then agricultural and ecological drought in particular regions; then tropical cyclone
intensity, where the physical argument is stronger than the observational record is long. Frequency of US
hurricane landfalls belongs at the bottom, where the record is too short and too noisy to establish
anything in either direction.
Attributing any single event to climate change is a different exercise again, with wider uncertainty than
the headlines usually carry. This page’s own caveat on event attribution says
what that method can and cannot support.
Every answer is open on the page — nothing is hidden behind a click, and a text search finds all of it.
Each answer gives the direct statement first, then the evidence, then where to check it.
How do we know this isn't natural variability?
Because natural variability has a signature, and this does not match it. Internal variability
(El Niño, the Pacific and Atlantic decadal patterns) moves heat around the climate system: when
the surface warms from an El Niño, the ocean below it loses heat. Since 1960 the upper 2,000 m of
the ocean has gained440zettajoules while the surface
warmed — both reservoirs gaining at once, which internal variability cannot do
Schuckmann et al. 2023.
The external natural candidates are measured too. Solar forcing changed by
0.03 W m⁻²
(−0.01 to 0.07, an interval that includes no change at
all) between 1850–1900 and 2015–2024, against
2.61 W m⁻²
(2.06 to 3.23) from human activity
Forster et al. 2025, and volcanic eruptions cool for a few years at a time. Simulations driven by
natural forcings alone reproduce 0.06 °C of warming for
2010–2019 against 1.06 °C observed CEDA (AR6 Figure SPM.1 data).
Finally, the vertical pattern (troposphere warming, stratosphere cooling) is produced by
greenhouse forcing and not by any of the natural candidates Santer et al. 2013.
How is a global average temperature computed from uneven, changing stations?
By averaging anomalies on a grid, not absolute temperatures. Each station’s departure from its
own long-term average is far more spatially coherent than its absolute temperature, so a sparse
network can still estimate the change over a large area. Stations are checked against neighbors to
detect steps caused by moves, instrument changes and changes in observation time, and those steps
are removed Menne & Williams 2009Menne et al. 2018. Grid cells are then averaged with area weights;
groups differ in how they treat cells with no data: interpolating (GISTEMP, Berkeley Earth),
leaving them out (older HadCRUT), or statistical infilling Morice et al. 2021Rohde & Hausfather 2020Vose et al. 2021.
The test of all this is that four groups making different choices get the same answer to within
0.014 °C per decade over 1970–2024 (Figure 1), and that a
network purpose-built to need no adjustment at all (USCRN) matches the adjusted US record
(Figure 32).
How much have humans warmed the planet, with what uncertainty?
IPCC AR6 assessed the human contribution to warming from 1850–1900 to 2010–2019 as
“1.07 [0.8 to 1.3] °C”, against observed warming of
“1.09 [0.95 to 1.20] °C” over 2011–2020 IPCC AR6 WG1 SPMGillett et al. 2021. The best estimate of the human-caused part is nearly all of the
observed warming, with the interval as quoted.
Measured independently on this page: the four surface records put 2015–2024 between
1.15 °C and 1.33 °C above their
1850–1900 means, and the spread between the records is a fair measure of how much method choice
matters.
What is climate sensitivity, and why does its range matter more than the central estimate?
Equilibrium climate sensitivity (ECS) is the eventual warming from doubling CO₂ once the system has
come back into balance; transient climate response (TCR) is the warming at the moment of doubling
under a steady increase. ECS controls how much warming a given emissions path eventually produces,
so its range translates directly into different futures for the same emissions.
The assessment that combined process evidence, the historical record and paleoclimate gave a likely
range of “2.6–3.9 K” with a wider 5–95% range Sherwood et al. 2020; AR6 adopted a
similar range IPCC AR6 WG1 Ch. 7. Estimates from the historical energy budget alone land lower
Lewis & Curry 2018, partly because feedbacks depend on the pattern of ocean warming, which
has not been constant Armour 2017. The central estimate is not the thing to argue about:
the top of the range and the bottom differ by roughly a factor of two in eventual warming, and that
is where the evidence stands. See where the evidence is weaker.
How reliable is the record before satellites?
Less reliable than the modern record, and reliable enough for the claims made here. The main
problems are sparse coverage (especially the Southern Hemisphere and the poles before the 1950s)
and changing measurement practice at sea (buckets to engine intakes to buoys), which is why
sea-surface temperature corrections are the largest adjustments in the whole record
Folland & Parker 1995Kennedy et al. 2019Huang et al. 2017.
Two checks matter. First, the groups treat these problems differently and still agree on the
modern trend to within 0.014 °C per decade. Second, a comparison using
only instrumentally homogeneous buoy and Argo data reproduced the recent warming rate found in the
adjusted records Hausfather et al. 2017. The 1850–1900 baseline itself carries roughly a tenth of
a degree of uncertainty, which is why this page quotes changes with intervals rather than single
numbers Hawkins et al. 2017.
Why does one or two degrees matter when the weather swings fifteen in a day?
Because they are different quantities. A daily swing is local and transient; the global annual mean
is an average over the whole surface and the whole year, and changing it means changing how much heat
the climate system holds: the upper ocean alone gained 440
zettajoules since 1960, over a period in which the global surface warmed by about one degree.
The effects that matter are mostly in the tails, and they move with the mean. At Fresno airport,
days at or above 100 °F went from 31.4 a year in
1948–1977 to 42.5 in 1996–2025, and nights at or above
75 °F from 0.7 to
10.6 (Figure 17). A few degrees of change in
the mean makes a large change in how often a threshold is crossed.
What would falsify human-caused global warming?
Specific, checkable things. Naming them matters, because a claim that nothing could
disprove is not a scientific claim.
The isotopes. If δ¹³C in atmospheric CO₂ stopped falling while CO₂ kept rising, and the
oxygen drawdown stopped tracking fossil-fuel carbon, the fossil origin of the increase would be
in trouble (Figure 4).
The energy budget. If ocean heat content stopped increasing for a decade or more while
greenhouse gases kept rising, the forcing story would be wrong (Figure 6).
The vertical pattern. If the stratosphere started warming along with the troposphere, the
greenhouse fingerprint would be gone and a solar or internal explanation would be back in play
(Figure 11).
The spectrum. If measurements of downward longwave radiation at CO₂ wavelengths stopped
matching the CO₂ increase, link 4 would fail, and with it the point where
link 1’s laboratory physics meets the real atmosphere Feldman et al. 2015.
Sustained divergence. If observed warming fell outside the range of simulations that include
human forcing for several decades while staying inside the natural-only range, attribution would
fail (Figure 12).
None of these has happened. Each is a measurement that is still being made, and each would be
publishable if it went the other way.
What did past model projections actually predict, and what happened?
Of 26 projections published between the 1970s and 2007 and
evaluated against what followed, 15 warmed at a
rate statistically consistent with observations, 7 ran warm and
4 ran cool Hausfather et al. 2020 (Figure 30).
The famous example is Hansen et al. 1988, whose scenario B projected
0.28 °C per decade for 1988–2017 against
0.19 °C observed Hansen et al. 1988. Its physics was not the main
error: the scenario assumed more greenhouse forcing than actually occurred, which is why the
comparison that matters is warming per unit of forcing. Some recent CMIP6 models run hot in the
other direction, with sensitivities above the assessed range, and that is a known problem the
modeling community named and worked around rather than hid Zelinka et al. 2020Hausfather et al. 2022.
What is happening in California specifically?
Statewide annual mean temperature is 1.46 °C higher in
1996–2025 than in 1895–1924 (1.04 to 1.87 °C), and
10 of the ten warmest years in a
131-year record fall after 2000 (Figure 14).
Water is the more important and less certain story. April 1 snowpack at the high southern Sierra
courses shows no trend (1.3 percentage points per decade,
−4.8 to 7.3); water-year precipitation shows a mean that has barely moved and a
wider spread (Brown–Forsythe p = 0.043); mapped burned area rose from
0.28 to 0.86 million
acres a year after 2000, with several causes at work. The California section works
through each one.
Is any of this visible in Fresno or Ventura County data?
Yes, and with a caveat that matters. Fresno County’s gridded record is
1.42 °C warmer
(0.95 to 1.89 °C) and Ventura County’s is
2.20 °C warmer
(1.64 to 2.76 °C), comparing 1996–2025 with 1895–1924.
The caveat: individual station records carry local effects. Fresno airport’s own nights warmed
0.22 °C per decade faster than the county around
it, which is what urban growth and irrigation do to a valley station. Ojai, a long record near
Thousand Oaks, goes the other way: across a gap of decades in its record its mean changed by
−0.1 °C
(−0.5 to 0.4 °C, which includes zero) while Ventura County’s rose
1.8 °C over the same years. Neither fact changes the
county or global result; both are reasons to be careful with any single station, including ones that
support the conclusion.
What are the largest remaining uncertainties?
In rough order of how much they matter: climate sensitivity, especially the cloud feedback; the
regional distribution of precipitation change; the timing of slow, potentially irreversible changes
(ice sheets, the Atlantic overturning circulation); aerosol forcing, which is the largest uncertain
term working in the opposite direction; and the frequency response of tropical cyclones.
Four of the five are set out with their numbers and their sources in
where the evidence is weaker, together with three claims made in the other direction, by
people arguing for action, that outran the evidence. Aerosol forcing is the exception: its size is why the
human forcing interval in the energy budget is as wide as it is.
Is warming accelerating? Recent years look like a jump.
The recent years are warm (2025 and
2024 are the warmest in these records), but a jump of a few years is
not yet distinguishable from a straight line plus noise by the test fixed in advance here. A change-point search over 1970–2025, allowing for autocorrelation, selected
0 breaks; the best single break
(2012) failed to improve the fit criterion by the required
margin Beaulieu et al. 2024.
That cuts both ways, and it is the same test that refuses to find the 1998–2012 “pause”
(Figure 33). Short windows are noisy whichever direction they point.
Why do the two satellite datasets disagree, and what does that tell me?
Because a satellite radiometer does not measure temperature: it measures microwave emission, and
turning that into a temperature for a thick atmospheric layer requires corrections for orbital
drift, calibration changes, and the transition between a dozen different instruments since 1979.
Different groups make different defensible choices. Over 1979–2025 the lower troposphere warms at
0.231 °C per decade in RSS and
0.156 °C in UAH Mears & Wentz 2017Spencer et al. 2017.
That is a large relative difference, and this page shows both series rather than picking one. It is
also why the pattern argument is stronger than any single trend value: both datasets agree that
the troposphere warmed and the stratosphere cooled.
Does the "97% of scientists" figure prove anything?
It proves something about scientists, not about the atmosphere, and this page treats it that way.
Surveys of the literature and of researchers find agreement that rises with expertise, and the most
recent full-text analysis concludes that the consensus “exceeds 99% in the peer reviewed scientific literature”Cook et al. 2013Cook et al. 2016Myers et al. 2021Lynas et al. 2021; the best-known of them has been criticized on methodology Tol 2016.
Consensus is a reasonable prior for a non-expert deciding whom to read. It is not evidence about
the physics, and nothing on this page rests on it: every claim here is supported by a measurement
you can download from the data appendix.
How do we know ice-core CO₂ is real air and not an artefact?
Because the ice-core record overlaps the direct measurements, and the two agree. Air trapped in
Law Dome ice, where snowfall is heavy enough that layers can be dated to within a few years,
covers the period from the 1800s through the early 2000s, and where it overlaps Mauna Loa the
values match (Figure 3, lower left panel) MacFarling Meure et al. 2006Bereiter et al. 2015.
The known limitation is smoothing: air diffuses in the porous upper layer before the ice seals, so
each sample averages over a range of years: decades in the youngest sections, centuries in the
deepest. That limits what the record can say about brief spikes, and it is why the comparison in
this page is between sustained levels: the pre-1850 range of 174 to
299 ppm against 427.4 ppm today.
The physical basis of this argument was in the published literature before the subject became political,
most of it before modern computers. Dates are worth knowing, because “this is a recent scare” is itself a
claim, and it is checkable.
The physics arrived first
The absorption of infrared by carbon dioxide and water vapor was measured in the 1860s
Tyndall 1861. In 1896 Arrhenius did the first quantitative calculation of what changing the amount
of atmospheric CO₂ would do to surface temperature, by hand Arrhenius 1896. AR6 still records that
“the first estimate was presented by Swedish scientist Svante Arrhenius in 1896”IPCC AR6 WG1 Ch. 7. In 1938 Callendar
assembled station records and fuel-consumption figures and argued the warming had already begun and was
caused by fossil fuelCallendar 1938, an argument treated at the time as interesting and
probably wrong.
The 1950s: three results that changed the status of the question
Plass worked the radiative transfer through in detail and concluded the effect of doubling CO₂ was large
enough to matter Plass 1956. Revelle and Suess showed that seawater chemistry keeps the
ocean from absorbing industrial CO₂ as fast as had been assumed, and described what was happening globally
as a geophysical experiment on a scale that could not be repeated Revelle & Suess 1957. And in 1958 Keeling
began continuous measurements at Mauna Loa, which turned “how much CO₂ is in the air?”
from an argument into a reading Keeling 1960.
By 1960 the shape of the modern argument was well formed: the gas absorbs infrared, its concentration is rising,
the ocean will not take it all, and the rise is fossil.
1967 to 1979: the number and the report
Manabe and Wetherald built a radiative-convective model that handled the atmosphere’s vertical structure and
water-vapor feedback properly, and produced a warming estimate per doubling that has aged well
Manabe & Wetherald 1967. In 1979 the US National Academy of Sciences convened the Charney panel, which put a
range on climate sensitivity for policymakers National Academy of Sciences. The width of that range changed little in
later assessments. The stability of that range can be read as an early estimate that was well bounded, or as slow progress
in narrowing it; this page treats sensitivity as an open uncertainty.
The 1970s are also the decade of the “scientists predicted an ice age” story, which is
its own card: a real minority literature on aerosol cooling, a real magazine cover,
and a majority of papers in that decade already projecting warming.
1988 onward: more instruments, more people, forecasts that can be graded
In 1988 Hansen and colleagues published model projections that are now old enough to be scored against what
happened, a test against data the modelers did not have; the scoring is in Figure 30Hansen et al. 1988Hausfather et al. 2020. The same year, governments established the Intergovernmental
Panel on Climate Change to assess the published research American Institute of Physics.
What changed after 1988 was less the physics than the measurement. Several of the instruments behind the
evidence chain did not exist then: satellites that measure the energy leaving Earth Loeb et al. 2021; a
global fleet of Argo floats that measures ocean temperature down to 2,000 mSchuckmann et al. 2023; gravity and altimetry satellites that weigh the ice sheets
The IMBIE team 2018Otosaka et al. 2023; atmospheric oxygen measurements precise enough to separate the land
and ocean carbon sinks Keeling et al. 1996; and ice cores that carry the CO₂ record back
806,000 years Bereiter et al. 2015. Methods for attribution, which test how likely the
observed pattern of change is with and without human influence, were developed over the same decades
Allen & Tett 1999Gillett et al. 2021.
The work is spread across many people and fields. The most recent full assessment of the physical science,
AR6 Working Group I, had “234 authors from 66 countries”, drew on more than
“14,000 cited references”, and responded to
“78,007 expert and government review comments”IPCC press release. The
evidence on this page alone comes from spectroscopy, atmospheric chemistry, isotope geochemistry, physical
oceanography, glaciology, satellite remote sensing, paleoclimatology and statistics: fields with different
instruments and methods, whose errors would not be expected to point the same way.
What the oil industry knew
This part is documentary rather than physical, and it is the part most often asserted loosely, so it is
worth being precise about what the published record shows. Franta traces industry awareness of CO₂ and
warming to the 1950s and 1960s, through the industry’s own commissioned work and conference proceedings
Franta 2018. Supran, Rahmstorf and Oreskes took a different approach: they extracted the
quantitative projections from ExxonMobil’s internal documents and graded them the way any other projection
would be graded, finding them consistent with the observed warming that followed Supran et al. 2023.
The second result is the interesting one for this page’s purposes, because it is not a claim about motives.
It is a claim that the internal science was accurate, which is another way of saying the conclusion on
this page was reachable with the data and methods available decades ago, by people with every commercial reason
to reach a different one.
Some of these produced a correction that stuck: the satellite records are better for the arguments about
them, and sensitivity is less certain than a single number suggests. Others did not survive
contact with the data, and the page says which is which rather than treating the whole category as one
thing.
Everything above is a measurement argument. This section is the “so what”, and it rests on less certain
ground than the rest of the page: costs depend on attribution, projections and economics as well as on
instruments.
A reader who accepts every link in the chain can still reasonably ask why it matters. The answer has three
parts: what has already changed and cost something, what is projected and with what confidence, and why the
effects arrive later than the emissions that cause them.
What has already changed, measured rather than modeled
The assessed summary is that
“Human-induced climate change, including more frequent and intense extreme events, has caused widespread adverse impacts and related losses and damages to nature and people, beyond natural climate variability”IPCC AR6 WG2 SPM. The specific changes below are measured on this page or quoted from the studies that
measured them; where a number depends on attribution rather than measurement, the text says so.
Glaciers. The reference glaciers tracked by the World Glacier Monitoring Service have lost
28.1 meters of water equivalent since 1970, which is the
depth of water the lost ice would make if spread over each glacier. The loss is faster now: an average of
950 mm a year over 2016–2025, against
228 mm over 1976–1985 (Figure 9). Mountain glaciers
store water that is released in the dry season, and their melt adds to sea level.
Drought where rainfall has not changed. California’s average water-year precipitation was
22.0 inches in 1896–1960 and 22.2 inches in 1961–2025
(Figure 24), yet drought years have become more frequent. Temperature is the link: warmer air
draws more water from soil, snowpack and plants, so the same shortfall in rain leaves the land drier. In
the state’s records, rain shortfalls were
“more than twice as likely to yield drought years if they occurred when conditions were warm”Diffenbaugh et al. 2015. For the 2012–2014 drought, human-caused warming is estimated to have
“accounted for 8–27% of the observed drought anomaly”; lack of rain remained the larger
cause Williams et al. 2015. Over a longer window and a wider region, tree rings and hydrological
modeling put the recent drought in historical company:
“the 2000-2018 SWNA drought was the second driest 19-year period since 800 CE” in
southwestern North America, with anthropogenic trends estimated to
“account for 47% (model interquartiles of 35 to 105%) of the 2000-2018 drought severity”Williams et al. 2020; the same group reports its rapid intensification since Williams et al. 2022. The
same mechanism is reported worldwide, where the consequences are larger than they are here: increasing
extremes have “exposed millions of people to acute food insecurity” and reduced water
security, with the largest impacts in Africa, Asia, Central and South America, Small Islands and the Arctic
(high confidence) IPCC AR6 WG2 SPM.
Crops. Globally,
“Although overall agricultural productivity has increased, climate change has slowed this growth over the past 50 years globally”
(medium confidence), with the losses mainly in mid- and low-latitude regions IPCC AR6 WG2 SPM. The
estimated effect on specific crops is in the agriculture card.
Wildfire. California’s burned area averaged 0.86 million acres a
year over 2000–2025, against 0.28 million over 1950–1999
(Figure 27). Warming is one cause among several: fire suppression, the fuel it leaves behind,
where people build and what starts fires all matter. Warming’s own contribution to fuel dryness in
western US forests is quoted with that figure Abatzoglou & Williams 2016. California is one case of a pattern the
assessment reports more widely:
“Observed increases in areas burned by wildfires have been attributed to human-induced climate change in some regions”
(medium to high confidence) IPCC AR6 WG2 SPM. The assessment says some regions rather than
everywhere, and attributes a share of the increase rather than the fires themselves.
Energy demand. Fresno County now runs 287 more cooling
degree days and 645 fewer heating degree days a year than in
1895–1924 (Figure 19): less heating in winter, more cooling in summer. Both directions show up
globally, and the assessment records the favorable one too:
“Some positive economic effects have been identified in regions that have benefited from lower energy demand as well as comparative advantages in agricultural markets and tourism”
(high confidence) IPCC AR6 WG2 SPM. Where cooling rather than heating dominates the year, the same
arithmetic runs the other way.
Sea level. The San Francisco tide gauge has risen through its whole record, at
1.52 mm a year (1.31 to 1.73) since 1855
(Figure 28). The global figure is quoted rather than computed here: this page’s
32-year annual satellite series has too little independent information for its own trend to pass the
rule in how this was made, so the assessed value stands in its place —
“Global mean sea level increased by 0.20 [0.15 to 0.25] m between 1901 and 2018”, at a rate
that rose from “1.3 [0.6 to 2.1] mm yr” a year over 1901–1971 to
“1.9 [0.8 to 2.9] mm yr” a year over 1971–2006 IPCC AR6 WG1 SPM.
Warm nights in the Central Valley have increased more than hot days: Fresno County’s nights rose
3.26 °F (2.32 to 4.20 °F; effective sample size 9.0) against
1.83 °F (0.82 to 2.83 °F) for its
days (Figure 17), partly because of the station’s own surroundings, as the
Fresno discussion explains. Ventura County, the coastal county this page also analyzes, runs
the other way: days 4.64 °F
(3.61 to 5.66 °F) against nights
3.30 °F (2.02 to 4.57 °F; effective sample size 7.8). The
day–night split is a local signature, not a global one, and two counties in the same state give opposite
answers. Globally the heat signal comes from attribution rather than from any one place’s record:
“Some recent hot extremes observed over the past decade would have been extremely unlikely to occur without human influence on the climate system”IPCC AR6 WG1 SPM, and in living systems
“Hundreds of local losses of species have been driven by increases in the magnitude of heat extremes”
(high confidence), together with mass mortality events on land and in the ocean IPCC AR6 WG2 SPM.
Stored energy. The ocean has absorbed 440ZJ since 1960, about
4,330 years of total US energy consumption. Warmer
water expands, which is part of the sea-level rise above, and the heat stored in the ocean is why the surface
record understates the total change.
What this page does not do is convert those into a national damage figure. Normalized disaster losses
cannot settle the question in either direction, for reasons this page
sets out: the adjustments for growth in wealth and exposure are large, and how to make them is
contested.
Everything above has already happened and was measured. The consequences people usually argue about
(meters of sea level, ice-sheet collapse, ecosystems failing, “runaway” warming) are projections, and they
belong in a different column of the ledger. The next subsection puts them there, with the confidence the assessments
attach to each, because a projection quoted without its range is the same mistake as a measurement quoted
without its uncertainty.
What is projected, and how confident that is
Projections are a different kind of claim, and the page labels them as such. Nothing below is measured by an
instrument: each item is an assessed expectation with a stated confidence, and this page cannot check any of
them against data the way it checks the chain. The assessed statement about temperature is that
“Global surface temperature will continue to increase until at least mid-century under all emissions scenarios considered”IPCC AR6 WG1 SPM. The phrase “all scenarios” matters: warming over the next few decades differs
little between emission pathways, which diverge later in the century, and that is where the uncertainty
discussed on this page matters most.
The consequences most often named, each at the strength its assessment gives it:
Sea level keeps rising, and how much depends on emissions. It
“is virtually certain that global mean sea level will continue to rise over the 21st century”;
relative to 1995–2014, the likely rise by 2100 is
“0.28–0.55 m under the very low GHG emissions scenario (SSP1-1.9)” and
“0.63–1.01 m under the very high GHG emissions scenario (SSP5-8.5)”IPCC AR6 WG1 SPM.
This is the projection on the firmest footing, because the measured rise (Figure 28) and its
causes (thermal expansion, glaciers, ice sheets) are separately observed.
Heat exposure grows with the warming.“Globally, population exposure to heatwaves will continue to increase with additional warming, with strong geographical differences in heat-related mortality without additional adaptation”
(very high confidence) IPCC AR6 WG2 SPM.
Ecosystems are already losing pieces, and the risk rises with temperature. Some of what has been lost
will not come back:
“Some losses are already irreversible, such as the first species extinctions driven by climate change”
(medium confidence) IPCC AR6 WG2 SPM. “Ecological collapse” as a single global event is not what the
assessments project; what they project is rising risk to particular systems, arriving earlier for coral
reefs and polar ecosystems than for most others.
Tipping points are a real category with uncertain thresholds. Armstrong McKay and colleagues place
several candidate elements (ice sheets, permafrost, ocean circulation) inside or near the range of
warming now in prospect:
“Climate tipping points occur when change in a part of the climate system becomes self-perpetuating beyond a warming threshold, leading to substantial Earth system impacts”Armstrong McKay et al. 2022. The thresholds are uncertain, and crossing one is not a switch that flips
within a year.
“Runaway warming” is not the assessed risk. A Venus-style runaway does not appear in the assessments.
What does appear is a category of outcomes that cannot be dismissed:
“Low-likelihood outcomes, such as ice-sheet collapse, abrupt ocean circulation changes, some compound extreme events, and warming substantially larger than the assessed very likely range of future warming, cannot be ruled out and are part of risk assessment”IPCC AR6 WG1 SPM. Low-likelihood is not no-likelihood, and high-impact is why they are assessed at all;
neither half of that phrase should be dropped when the sentence is repeated.
Why the effects lag the emissions
Three different delays get confused with each other:
Emissions to concentration. Emitting less does not lower the concentration; it slows the rise. The
carbon already airborne and the land and ocean sinks which consume it determine if and how quickly atmospheric CO₂ will fall Friedlingstein et al. 2025IPCC AR6 WG1 Ch. 5. The sinks have so far absorbed roughly half of what is emitted each year, and
whether that share is falling as emissions grow is an open question in the carbon-budget literature
rather than an established one; this page does not compute it Friedlingstein et al. 2025.
Concentration to temperature. The ocean’s heat capacity means the surface temperature lags the forcing. The
imbalance measured in the water, 0.86 W m⁻² averaged
over 2013–2025, is energy already in the system whose surface effect has not finished appearing.
Temperature to the slow parts of the system. Ice sheets and deep-ocean heat respond over centuries.
AR6’s summary states:
“Many changes due to past and future greenhouse gas emissions are irreversible for centuries to millennia, especially changes in the ocean, ice sheets and global sea level”IPCC AR6 WG1 SPM. We will continue to have disruptions for centuries, but stopping now limits the impact.
Those three delays are what the three statements below follow from.
Stopping emissions stops the warming, and fairly promptly. The extra warming that arrives after CO₂ emissions
reach zero is called the zero emissions commitment, and
“the central ZEC estimate was assessed to be zero”IPCC AR6 WG1 Technical Summary: on that central
estimate, surface temperature levels off near where it stood when emissions stopped, rather than climbing for
decades more.
Stopping is not undoing. Levelling off is not cooling. The CO₂ already added stays in the air for
centuries unless it is removed, so the temperature stays near the level it reached; nothing in the measured
record or in the assessments suggests it falls back on its own on any human timescale.
The slow parts keep moving either way. Ocean heat, sea level and the ice sheets go on responding long
after the surface stops warming, which is the third delay above:
“Many changes due to past and future greenhouse gas emissions are irreversible for centuries to millennia, especially changes in the ocean, ice sheets and global sea level”IPCC AR6 WG1 SPM.
So “nothing we do now matters” is wrong, because the level at which warming stops depends on how much more is
emitted before it does. And “it can be reversed within a decade” is wrong, because stopping emissions halts
the rise rather than reversing it, while the slow parts of the system keep changing regardless.
Where this section’s certainty runs out
Everything in the evidence chain rests on instruments. Everything in this section rests on those instruments
plus a projection, and in the economic case plus a model of what people will do and what a dollar of damage
is worth. That is a real step down in confidence, and a reader who trusts the first part of this page is not
obliged to accept this part at the same strength. It is here because “is it real?” and “does it matter?” are
different questions, and answering only the first one would be its own kind of evasion.
This section describes what governments have done and what happened next. It does not argue for any
policy, which is outside the scope of this page.
The section is here because “nothing can be done, so the question is academic” and “the world is
already fixing it” are both factual claims, and the record is checkable.
An example of cooperation: the Montreal Protocol
The Montreal Protocol on Substances that Deplete the Ozone Layer (1987) is the usual example, and it bears
directly on this page. Its parties agreed to phase out the industrial chemicals that destroy stratospheric
ozone; the treaty was “signed in 1987 and entered into force in 1989”UN Environment Programme.
It worked, and the measurement says so. The scientific assessment written for the treaty’s own parties
reports that “Actions taken under the Montreal Protocol continued to decrease atmospheric abundances of controlled ozone-depleting substances (ODSs) and advance the recovery of the stratospheric ozone layer”,
and puts dates on the repair: total column ozone
“is expected to return to 1980 values around 2066 in the Antarctic, around 2045 in the Arctic, and around 2040 for the near-global average (60°N-60°S)”World Meteorological Organization. Those are projections, and the assessment gives them ranges; what has already been
measured is the decline in the controlled chemicals and the first signs of ozone recovery, clearest in the
upper stratosphere and over Antarctica in spring.
That repair is why the ozone contribution to stratospheric cooling fades. Ozone loss is one reason the lower
stratosphere cooled up to the mid-1990s, and AR6 assesses it as the main driver of that early cooling
IPCC AR6 WG1 SPM, which is why link 7 separates the ozone contribution from the greenhouse one.
The separation shows in this page’s own numbers: since 1998, with ozone-depleting substances declining,
the lower-stratosphere trend is −0.054 °C per decade
(−0.098 to −0.009 °C, RSS) and −0.100 °C
(−0.151 to −0.050 °C, UAH), smaller than the same records give over their whole
length:
−0.191 °C (−0.317 to −0.065 °C) and
−0.251 °C (−0.382 to −0.120 °C) per decade since 1979. The
comparison is deliberately made against the full record rather than against a fitted 1979–1997 trend: over
nineteen years these series carry too little independent information for a trend to pass the rule in
how this was made, so this page does not state one. Meanwhile the greenhouse-driven cooling
higher up continues Santer et al. 2023. A treaty changed one term in the energy
budget, and the change is visible in the same instrument record this page uses as evidence.
The comparison has limits. The protocol regulated a small family of industrial chemicals for which
substitutes existed, which is why its success does not transfer directly to fossil fuels.
The framework that now exists
The UN Framework Convention on Climate Change (1992) set up the process. Under the Paris Agreement (2015),
each party sets its own target, a nationally determined contribution, and reports progress against it
UNFCCC Paris Agreement. The pledges are public documents in a registry, so the gap between pledge and
outcome can be checked UNFCCC NDC Registry. The design trades enforcement, of which there is almost
none, for near-universal participation.
How many countries have acted, at four levels of commitment
“Taking measures” covers very different things, and the count depends on which is meant. From the weakest
commitment to the strongest, as recorded by the bodies that track them when this page’s data were fetched:
Joined the treaty.194 parties to the Paris Agreement United Nations Treaty Collection.
Joining obliges a party to set and report a target, not to meet any particular one.
Set a long-term target.137 of the
198 countries Net Zero Tracker assesses have a national net-zero or
similar target, and together they account for 74% of global
emissions Net Zero Tracker. A target is a stated intention; many are not written into law.
Passed laws and policies. Climate Change Laws of the World catalogues over 9,000
climate laws, policies and UN submissions Grantham Research Institute, a count of documents, not of their
effect.
Cut emissions. Of the ten largest national emitters of fossil CO₂ in 2024, which
together produced 69% of the world total,
5 were at least 10% below their own peak, and
4, including China and India, emitted more than in any earlier year
Our World in Data.
Only the fourth level measures an outcome, and the first thing to say about it is the aggregate, because
a count of countries below their own peaks is not the same as a falling total. World CO₂ from fossil fuels
and industry in 2024 was 38.6 billion tonnes, the highest
in the series, and 9% above its 2015 level, the year the
Paris Agreement was signed Our World in Data. The build fails if the latest year stops being the highest,
because that is the year this sentence has to change. Whatever the four levels show, they have not yet
turned the total down.
The count of countries below their peak needs care too. Being below a peak does not say why: a
decline can come from economic collapse or restructuring as well as from policy, and this count does not
separate them. The largest of those below their peak is the clearest case of restructuring. United
States CO₂ peaked in
2005 and is 20% below that peak;
most of the fall is coal, down 66%, while natural gas rose
51% over the same years. Burning gas releases less CO₂ than coal for
the same energy, so the substitution shows up as a decline. Whether that substitution came from policy, from
cheaper gas, or from what the country stopped manufacturing at home is not something these data can separate,
and neither is the methane that leaks before the gas is burned, which this page does not measure.
United States CO₂ is 20% below its 2005 peak, and the fall is mostly coal
United States CO₂ emissions by source, billion tonnes a year, stacked, using the same sources and the same processing as Figure 5, which is the world. The vertical line marks the peak year for fossil and industry emissions.
Between 2005 and 2024, United States fossil and industry CO₂ fell 20%: coal fell 66%, from 2.14 to 0.73 billion tonnes, while natural gas rose 51%, from 1.16 to 1.75 billion tonnes, and oil fell 15%. The build fails if coal stops falling or gas stops rising across that window, because this caption would then be wrong. In 2024 the mix was oil 44%, natural gas 35%, coal 15%, cement, flaring and other industry 5% and land-use change 2%. Burning gas instead of coal releases less CO₂ for the same energy, so substitution shows up here as a fall; what the chart cannot say is how much of that substitution came from policy, from cheaper gas, or from what the country stopped making at home. These are territorial emissions, on the same definitions as the world in Figure 5Our World in DataFriedlingstein et al. 2025.
Data: Our World in Data CO2 dataset: annual CO2 emissions by source and by country [owid/co2-data, master branch CSV], fetched 2026-09-19 UTC. Processing: scripts/process/carbon_sources.py.
Check it yourself: data us_co2_emissions_by_source.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
The emitters at least 10% below their own peak are the United States (peak
2005), Russia (1990), Japan
(2013), South Korea (2018) and Germany
(1979). These are territorial figures: CO₂ released inside each country, not
the emissions embodied in what it imports. The full table is in the
data appendix.
What this section is not
This section is not an argument that any particular policy is wise, affordable or fair. Those are questions about
values and economics. The evidence chain stands or falls on
instruments; what to do about it is a different conversation, held by different means.
Each card below states a claim the way its best advocate would state it, names the part of it that is
true, and then gives the evidence. A claim that is entirely without foundation is rare; most of these
have a real observation at the center and fail at implied implications and recorded evidence. The verdict grades that inference — the
argument as it is used against the conclusion — not the observation it starts from, which the second block
of each card grants. The scale is fixed: wrong, mostly wrong, partly right, right, but it
does not change the conclusion, and right. No card is rated plain “right”, because none of these
arguments, as used, succeeds against the conclusion of the evidence chain; “partly right” is
used wherever an argument survives in part.
Earth’s climate has swung between ice ages and warm periods for millions of years, with no help
from anyone. Sea level has been hundreds of meters lower and tens of meters higher; CO₂ has been
far higher than today. Change is the normal state of this system, so change now is not by itself
evidence of anything unusual.
The kernel of truth
All of that is true and well measured: orbital cycles pace the ice ages Hays et al. 1976, the
last deglaciation moved global temperature by several degrees Shakun et al. 2012, and the
pre-industrial two thousand years contain real regional swings Neukom et al. 2019.
What the evidence shows
The claim answers a question nobody is asking. “The climate changes” does not tell you what is
changing it now, and the mechanisms that drove past changes are measurable today: orbital forcing
is calculable and is currently in a slow cooling phase; solar output is measured and has changed by
0.03 W m⁻²
(−0.01 to 0.07) since 1850–1900, an interval that does
not exclude zero; volcanic forcing cools briefly. What is different is the cause, its speed, and the fingerprints in
link 3 and link 7. In the reconstruction used here, the warmest
decadal-scale value anywhere before 1850 is 0.31 °C relative to
1850–1900, and no pre-1850 value’s 95th percentile exceeds
0.60 °C, against HadCRUT5’s 1.26 °C for
2015–2024. A proxy reconstruction smoothed to decades can understate brief swings that thermometers
would record, which is why the comparison uses that highest upper bound rather than the central value.
The Sun drives the climate. Solar activity rose through the twentieth century, and reconstructions
of total solar irradiance differ enough that a substantially larger solar contribution cannot be
ruled out — one peer-reviewed analysis finds the Sun can account for most of the Northern
Hemisphere temperature change since 1850, depending on which irradiance reconstruction and which
station set you use.
The kernel of truth
Pre-satellite solar irradiance really is a reconstruction, the choice among reconstructions is
disputed, and the Sun is the energy source for the whole system Connolly et al. 2021Coddington et al. 2016.
What the evidence shows
Since 1978 irradiance has been measured, not reconstructed. Its mean across solar cycle 24 was
−0.12 W m⁻² relative to cycle 22,
slightly lower rather than higher, while the surface warmed. The statistical analysis behind
the large-solar-role claim has a published rebuttal Richardson & Benestad 2022, and the
long-term divergence between solar activity and temperature was documented earlier
Lockwood & Fröhlich 2007. The stronger point is the pattern: more sunlight warms the whole
atmospheric column, while the measured change is troposphere warming with stratospheric cooling
(Figure 11). Ozone depletion explains much of the lower-stratosphere cooling up to the
mid-1990s IPCC AR6 WG1 SPM, but it does not warm the troposphere: the opposite signs of the two
layers are what a brighter Sun cannot produce (link 7).
The strong carbon-dioxide absorption bands are already close to fully absorbing in the lower
atmosphere, so adding more CO₂ has a steeply diminishing effect. Line-by-line radiative transfer
through measured absorption lines — the same databases used to design instruments — gives a
warming per doubling of about a degree once the direct radiative effect is isolated, and the
larger figures quoted in assessments depend on a water-vapor amplification that this
calculation does not support. On that reading the remaining warming available from CO₂ is at or
below the bottom of the assessed range arXiv (preprint).
The kernel of truth
Saturation at the band center is real, and so is the diminishing return: the forcing grows roughly
with the logarithm of concentration rather than in proportion to it, which is exactly why the
quantity everyone computes is warming per doublingMyhre et al. 1998Etminan et al. 2016.
What the evidence shows
The saturated part of the band is not where the energy leaves. Radiation escapes to space from the
thin, cold upper atmosphere, and adding CO₂ raises that escape altitude into colder air while widening
the band edges, which is why the effect continues rather than stopping
Pierrehumbert 2010Zhong & Haigh 2013. The line-by-line calculations in the claim above
produce a forcing per doubling in the same range as everyone else’s; the disagreement is about what
follows from it, not about the radiative transfer. The present-day size of the effect is measured, not
inferred: NOAA’s index puts CO₂ at 2.33 W m⁻² relative to 1750 in
2024, and the extra downward infrared at the surface has been observed directly at
the wavelengths CO₂ absorbs Feldman et al. 2015. A saturated band also cannot explain the
stratospheric cooling that accompanies the surface warming (link 7).
Galactic cosmic rays ionise the atmosphere and seed cloud condensation nuclei. A more active Sun
deflects more of them, so cloud cover falls and the planet warms, a solar amplifier that makes the
Sun’s small irradiance changes enough to explain modern warming Svensmark & Friis-Christensen 1997.
The kernel of truth
The microphysics is real and was tested in a purpose-built experiment: CERN’s CLOUD chamber confirmed
that ionisation increases nucleation rates of sulphuric-acid aerosol particles Kirkby et al. 2011.
Dismissing the mechanism outright was never the right answer.
What the evidence shows
Nucleating a particle is not the same as making a cloud droplet. The modeled effect of cosmic-ray
variation on the number of particles that actually reach cloud-condensation size is far too small to
change cloud cover meaningfully Pierce & Adams 2009. The CLOUD experiment’s own global model reaches
the same conclusion: “the relatively weak dependence on ion concentrations indicates that for the processes studied, variations in cosmic ray intensity do not appreciably affect climate through nucleation in the present-day atmosphere”Dunne et al. 2016. Independently of the mechanism, the driver has to
trend for the effect to trend: solar activity and cosmic-ray flux have not moved in the direction
needed since the 1980s while temperature rose Lockwood & Fröhlich 2007, and measured irradiance across
solar cycle24 (2008–2019) was −0.12 W m⁻² relative
to cycle 22 (1986–1996). And a cloud-driven warming would warm the whole atmospheric column, where the
measured pattern is a warming troposphere under a cooling stratosphere (link 7).
CO₂ is 0.04% of the atmosphere. It is implausible that so small a fraction controls the
temperature of the planet, and in any case CO₂ is what plants breathe: higher concentrations make
crops grow faster, which is why greenhouses are enriched with it.
The kernel of truth
Both halves contain something true. CO₂ is a trace gas by volume, and CO₂ enrichment does increase
photosynthesis in many plants, which is measurable from space Zhu et al. 2016.
What the evidence shows
Concentration by volume is not the relevant quantity; infrared absorption is. Nitrogen and oxygen,
which make up nearly all of the atmosphere, are transparent in the infrared, so the trace gases do
nearly all of the absorbing. That absorption is measured, not modeled: CO₂’s absorption lines
are catalogued from laboratory spectroscopy Gordon et al. 2022, and the added downward infrared from
a decade of rising CO₂ has been measured at the surface Feldman et al. 2015 (link 4). What
the trace gases do together is a model experiment, and is labeled as one here: removing CO₂ from a
model atmosphere collapses the greenhouse effect and freezes the planet, which is why it is described
as a control knob Lacis et al. 2010Schmidt et al. 2010. On “plant food”: the fertilisation effect
is real, is
limited by water and nutrients, and comes with measured reductions in the protein, zinc and iron
content of major crops Myers et al. 2014 — see the greening card.
In the ice-core record, Antarctic temperature rises before CO₂ at the end of each glacial period,
by several hundred years. Cause cannot follow effect, so CO₂ is a consequence of warming, not a
driver of it.
The kernel of truth
The lag is real at the start of deglaciations: orbital changes trigger the warming, and the ocean
then releases CO₂ Parrenin et al. 2013.
What the evidence shows
The rest of the deglaciation is the part the claim leaves out. Global temperature — not just
Antarctic — lags the CO₂ rise through most of the transition, which is what you expect if the
orbital trigger is amplified by CO₂ Shakun et al. 2012. The physics does not care which came
first: CO₂ absorbs infrared radiation whether it was released by an ocean or by a power station.
The modern analysis claiming a short-term lag proves CO₂ is not the driver removes the long-term
trend before measuring the lag, which is why it cannot detect one Humlum et al. 2013Richardson 2013Masters & Benestad 2013.
In the 1970s the same field warned of global cooling and a coming ice age, with magazine covers to
match. A discipline that reversed itself within a decade has not earned confidence now.
The kernel of truth
Some papers did project cooling, aerosol pollution was rising fast, and popular coverage amplified
it Rasool & Schneider 1971.
What the evidence shows
A survey of the peer-reviewed literature from 1965 to 1979 found far more papers projecting warming
than cooling: the cooling papers were a minority even then Peterson et al. 2008. One of the most
cited cooling papers used an early model that overestimated aerosol effects and assumed
quadrupling aerosols with constant CO₂ Rasool & Schneider 1971; when projections from that decade are
evaluated against what followed, the warming ones do well (Figure 30).
The aerosol cooling that worried them is real, and it offset part of the greenhouse warming.
15 of 26 past projections warmed at a rate consistent with what followed; 7 ran warm and 4 ran cool
Each projection's warming rate against the observed rate over the same years (°C per decade), before any correction for the difference between assumed and actual forcing. Gray bars are the 95% interval of the observed trend. Values as published by Hausfather et al.; windows end in 2017 at the latest.
"Consistent" here means the 95% interval of the projected-minus-observed rate includes zero. Hansen et al.'s 1988 scenario B projected 0.28 °C per decade for 1988–2017 against 0.19 °C observed (0.14 to 0.23 °C); their scenario C, which assumed emissions were curtailed, projected 0.12 °CHansen et al. 1988. A projection can miss because its physics is wrong or because the emissions and other forcings it assumed did not happen. Hausfather et al. separate the two by comparing warming per unit of forcing, and find the models skilful once that mismatch is accounted for Hausfather et al. 2020. The IPCC AR4 rows cover only about a decade, so their observed intervals are wide and consistency is easy to achieve.
Adjustments are applied by the same institutions that promote the conclusion, and they
systematically cool the past and warm the present. In the US record the effect is large enough
to change the shape of the story: the 1930s cease to be the warmest decade after adjustment,
and a substantial share of the monthly values in the US historical network are estimated from
neighboring stations rather than observed at all, so what is published is in part a computed
field rather than a set of readings.
The kernel of truth
Adjustments are real, they are large in places, and they do change trends. Over land they increase
the warming trend, which is exactly the direction the claim says.
What the evidence shows
The question is whether the adjustments are justified and whether the conclusion depends on them.
Computed here from the raw and adjusted GHCNm files with identical code, the unadjusted global land
trend over 1900–2024 is 0.117 °C per decade and the adjusted trend is
0.140 °C. The raw data show most of the warming before any adjustment
(Figure 31). The reason for adjusting is visible in Fresno’s own record: two station
moves left steps of up to −1.0 °C in the station-minus-county
difference (Figure 18). And the test that avoids the question entirely, a purpose-built
reference network, has differed from the adjusted network by 0.01 °C
on average since 2005 (−0.08 to 0.09 °C; effective sample size 4.2) (Figure 32). Twenty-one
years are too few for this page’s rule to compare the two networks’ rates, so that comparison is not
made here; where nearby station pairs from the two networks were compared directly, adjustments
“make both trends and monthly anomalies from USHCN stations much more similar to those of neighboring USCRN stations”Hausfather et al. 2016.
The US-specific forms of the claim are the strongest ones, and they are also the narrowest. The
contiguous US is a small fraction of the global surface, so how its network is treated cannot
move the global result, which is shown above from the raw data. The infilling objection is
about one historical network; the comparison that answers it is Figure 32, where a
purpose-built network designed to need no adjustment at all is set against the operational one.
Whether the 1930s or the present decade is warmer in the United States is a real question
about one country’s record, and it is not the question this page’s core conclusion turns on.
Unadjusted station data already show 0.117 °C per decade of land warming since 1900; the adjustments raise it to 0.140 °C
Global land mean temperature anomaly (°C, relative to each station's 1961–1990 mean), computed here with identical code from GHCNm v4 unadjusted and adjusted monthly station data. Bottom: adjusted minus unadjusted.
The gridding here is deliberately simple (5° cells weighted by the cosine of latitude, no infilling, no land-fraction weighting), so these values are not NOAA's official land series; running the same code on both files is what isolates the adjustments. Trend of the difference: 1900–2024 0.022 °C per decade (0.019 to 0.025 °C); 1970–2024 0.018 °C. The adjustments come from a pairwise homogenization algorithm that detects and removes steps shared by neighboring stations: station moves, instrument changes, changes in observing time Menne & Williams 2009Menne et al. 2018. Fresno's own record shows that kind of step (Figure 18). Stations with a 1961–1990 climatology: 12,902 unadjusted, 12,395 adjusted. GHCNm's "latest" files are rebuilt daily; the manifest records the exact bytes used here.
Check it yourself: data ghcnm_raw_vs_adjusted_global_land.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Thermometers sit in places that have been built up around them. Cities are measurably warmer than
their surroundings, airports are paved, and the station network has urbanized over the century the
record covers. The warming trend is at least partly an artefact of where the instruments are.
The kernel of truth
Urban heat islands are real and large (several degrees on a calm night), and some stations are
badly sited. Fresno airport is a case in point: its nights warmed
0.22 °C per decade faster than the county around
it (Figure 16).
What the evidence shows
The effect is real at the station and small in the global mean, because the global mean is mostly
ocean and because urban effects are detected and removed. Direct tests: the US Climate Reference
Network, sited to avoid the problem, has differed from the adjusted network by
0.01 °C on average over 2005–2025
(−0.08 to 0.09 °C; effective sample size 4.2), an interval that includes zero. Twenty-one years
are too few for this page’s rule to compare the two networks’ rates, so on its own that comparison
cannot show whether either drifts Diamond et al. 2013; nearby station pairs from the two networks
agree much more closely after adjustment than before Hausfather et al. 2016;
urbanization in the longer US record accounts for a small fraction of the trend
Hausfather et al. 2013; and windy-night versus calm-night comparisons find no urban contamination
in the global land trend Parker 2004. The counter-argument that homogenization spreads urban
warming instead of removing it Katata et al. 2023 is tested against the reference network in
is there credible evidence against it.
Since 2005 the US reference network, sited to avoid urban and siting effects, shows no difference from the adjusted network that can be told from zero in the annual mean (−0.14 to 0.16 °F; effective sample size 4.2)
Contiguous US annual temperature anomalies relative to 1991–2020 (°F): USCRN, built for climate monitoring, and NOAA's homogenized ClimDiv network, which includes urban stations. Bottom: USCRN minus ClimDiv for the daily mean, maximum and minimum.
Mean difference over 2005–2025: Tavg 0.01 °F (−0.14 to 0.16 °F; effective sample size 4.2), Tmax 0.04 °F (−0.32 to 0.40 °F; effective sample size 3.5), Tmin −0.02 °F (−0.05 to 0.01 °F). Every interval includes zero. No trend is fitted to the Tavg or Tmax difference: over twenty-one autocorrelated years the effective sample size falls below this page's own minimum, so no drift is claimed in either direction. The Tmin difference, which does meet the rule, trends 0.00 °F per decade (−0.05 to 0.04 °F). If urban heat or homogenization had inflated ClimDiv's warming, the reference network would read progressively cooler than it. For Tmin, the one element where the rule allows that test, the difference trend cannot be told from zero; for Tavg and Tmax, twenty-one years cannot say either way. This test covers the recent period only; urbanization over the longer US record Hausfather et al. 2013 and homogenization checked against USCRN Hausfather et al. 2016 are the longer-baseline tests, and the network's design is documented by Diamond et al. 2013.
Data: Contiguous U.S. annual anomalies, ClimDiv [NCEI National Temperature Index], fetched 2026-09-14 UTC. Processing: scripts/process/us_ca.py.
Check it yourself: data conus_uscrn_vs_climdiv.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Surface warming stalled for roughly fifteen years after the 1998 El Niño while CO₂ kept rising.
Models projected continued warming through that period and did not reproduce the slowdown, which
means something in the forcing-to-temperature chain is missing.
The kernel of truth
The surface trend really was lower over that window: 0.12 °C per
decade over 1998–2012, against 0.15 °C per decade over the
preceding fifteen years. Papers were written about it because it was real Fyfe et al. 2016.
What the evidence shows
Three things explain most of it, and none of them is missing physics in the greenhouse effect:
starting the window on a record El Niño year, a run of La Niña conditions that moved heat into the
ocean, and a series of small volcanic eruptions plus a solar minimum Medhaug et al. 2017. The two
surface trends are also less different than they look: their intervals,
0.02 to 0.23 °C and 0.02 to 0.28 °C per decade,
overlap almost entirely, and a change-point test allowing for autocorrelation finds
0 breaks in the 1970–2025 record
(Figure 33) Beaulieu et al. 2024, the same test that declines to certify a recent
acceleration. The energy check points the same way: the upper ocean gained
144ZJ over 1998–2012, against
56 ZJ over the preceding fifteen years
(Figure 6). Those are differences between single years, not fitted trends, and the
earlier one is comparable to the pre-Argo uncertainty
(what this page concedes); but moving either window by up to two years never
reverses their order. Part of the apparent slowdown was in the measurements rather than in the
climate: correcting the bias between ship and buoy sea-surface readings raised the recent trend, so
that “the central estimate for the rate of warming during the first 15 years of the 21st century is at least as great as the last half of the 20th century”Karl et al. 2015, a correction later tested against independent instruments
Hausfather et al. 2017, and one the records used here already include.
Short windows can show "cooling" inside a record that warmed 0.203 °C per decade
Global surface temperature (°C relative to 1850–1900, mean of the available records), 1970–2025. The 5 short segments are the longest 7–10-year windows with a negative trend found by a fixed forward search; the single long line is the 1970–2025 trend.
0 of the 47 ten-year windows in 1970–2025 has a negative trend, and every "cooling" window found here is shorter than ten years. A pre-registered change-point test (BIC with autocorrelated errors) selected 0 breaks over 1970–2025: by that test neither the 1998–2012 slowdown nor the recent faster warming is distinguishable from a single straight line Beaulieu et al. 2024. The best single break (2012) did not improve the BIC: the difference was −0.4, where at least 2 is required to prefer the more complex model. Short windows are noisy, not informative: that is the point of the chart, and it applies equally to short windows that look like acceleration.
Data: Berkeley Earth global land+ocean annual summary; global land TMAX/TMIN summaries [Berkeley Earth Land/Ocean (files as published on S3)], fetched 2026-09-14 UTC; GISTEMP total 95% confidence interval, uncertainty model v1.2.1 [v1.2.1 (Lenssen et al. 2019)], fetched 2026-09-14 UTC; GISTEMP v4 global, northern-hemisphere and zonal land-ocean means [GISTEMP v4], fetched 2026-09-14 UTC; HadCRUT5 analysis, global annual summary series [HadCRUT.5.0.2.0], fetched 2026-09-14 UTC; NOAAGlobalTemp global land and ocean annual anomaly [NOAAGlobalTemp v6.0.0], fetched 2026-09-14 UTC. Processing: scripts/process/global_temp.py.
Climate models are tuned, they disagree with each other, some of them run far too hot, and their
projections have repeatedly been higher than what happened. Policy built on them is built on
output, not observation.
The kernel of truth
Some models do run hot: a subset of CMIP6 models has climate sensitivity above the assessed range,
which the modeling community identified and has had to work around Zelinka et al. 2020Hausfather et al. 2022. Individual projections have missed, in both directions.
What the evidence shows
Evaluated against what actually followed, 15 of
26 projections published between 1970 and 2007 warmed at a
rate consistent with observations, 7 ran warm and
4 cool Hausfather et al. 2020 (Figure 30). Much of
the residual mismatch comes from assumed forcings rather than physics: a projection is a
conditional statement, and the condition is the emissions path. The hot-model problem in the
claim above was serious enough that AR6 did not use its ensemble as drawn: projections were
constrained by observed warming and by assessed sensitivity instead of averaging the models,
which is an admission that the raw ensemble was not fit to be averaged Hausfather et al. 2022.
Seven of the eight links in the evidence chain are measurements and hold whatever the
models do. The eighth, formal attribution, divides the observed warming into shares,
and that division does use model simulations, which is stated there and in
where the evidence is weaker.
Water vapor accounts for most of the natural greenhouse effect — far more than CO₂ — and the
amplification that turns a modest CO₂ forcing into a large warming is a water-vapor feedback,
not a measured property of CO₂. That feedback is computed on the assumption that relative
humidity stays roughly constant as the atmosphere warms. It is the assumption, not the
radiative physics, that produces the high end of the projected warming, and it is far less
firmly established than the forcing calculation it is multiplied by.
The kernel of truth
Water vapor is the largest single contributor to the present-day greenhouse effect
Schmidt et al. 2010.
What the evidence shows
Water vapor condenses; CO₂ does not. Atmospheric water vapor has a residence time of about a week
Ent & Tuinenburg 2017, so its concentration is set by temperature rather than by emissions: it
cannot hold a change on its own, and it amplifies changes caused by something else. Water vapor is therefore a
feedback, and it roughly doubles the warming from CO₂ alone Held & Soden 2000. Remove the
non-condensing gases and the water vapor rains out and the planet freezes, which is the sense in
which CO₂ is the control knob Lacis et al. 2010.
The claim’s real point stands and this page concedes it: the constant-relative-humidity
assumption is where the uncertainty lives, and this page processes no humidity data of its
own, so on this one step the reader is being asked to take a cited result rather than check a
computation. That is why climate sensitivity sits in
where the evidence is weaker and why none of the eight links in
the evidence chain depends on the size of the feedback. The chain establishes that the
forcing is real, that it is ours, and that energy is accumulating; how much warming ultimately
follows is the separate and less certain question.
A single large eruption injects vast quantities of CO₂; the world’s volcanoes, including the
submarine ones nobody measures, plausibly emit more than industrial civilisation.
The kernel of truth
Volcanic CO₂ is real, continuous, and was the dominant long-term source of atmospheric CO₂ before
humans; submarine and diffuse degassing is hard to measure.
What the evidence shows
It has been measured anyway, by direct gas sampling, remote sensing of plumes and carbon-budget
accounting: global volcanic emissions are of order a hundred times smaller than fossil-fuel
emissions Gerlach 2011Burton et al. 2013Fischer & Aiuppa 2020. The isotopes settle it
independently: volcanic CO₂ is not depleted in ¹³C the way plant-derived carbon is, and burning
volcanic carbon would not consume atmospheric oxygen, yet both signatures are present
(Figure 4).
The 97% figure comes from a study that classified abstracts, most of which took no position at all;
the 97% is 97% of the minority that did. The number is a marketing device, and it has been
criticized in the peer-reviewed literature.
The kernel of truth
The criticism of that particular study’s methodology is published and is not frivolous
Tol 2016, and most abstracts in any field state no position on an established background
assumption.
What the evidence shows
Independent estimates using different methods (author self-ratings, surveys of publishing
climate scientists, and a later full-text analysis) land in the same range, with agreement rising
with expertise Cook et al. 2016Myers et al. 2021Lynas et al. 2021. More important for a
skeptical reader: consensus is evidence about scientists, not about the atmosphere. Nothing on this
page rests on it. If every survey were withdrawn tomorrow, the isotopes, the ocean heat content and
the stratospheric cooling would be unchanged.
Antarctic sea ice set record highs as recently as 2014, and a NASA-led satellite study found the
ice sheet gaining mass overall. The continent holding most of the world’s ice is not behaving the
way the story requires.
The kernel of truth
Both observations are real. Antarctic sea ice did grow slowly for decades and peaked in 2014
Parkinson 2019, and the altimetry study did report net mass gain, driven by East Antarctic
snowfall Zwally et al. 2015.
What the evidence shows
Sea ice and land ice are different things, and both have moved since. Antarctic sea ice fell
sharply after 2014, at rates exceeding the Arctic’s decline Parkinson 2019; the ice-sheet
question was addressed by a reconciliation exercise combining altimetry, gravimetry and the
input–output method, which finds net loss dominated by West Antarctica and the Peninsula
The IMBIE team 2018Otosaka et al. 2023. Greenland’s loss is larger and less ambiguous. Arctic
September sea ice, a cleaner signal, is down −11.9% per
decade (Figure 8).
Vikings farmed Greenland and England grew wine grapes. The Medieval Warm Period was at least as
warm as today, without any industrial emissions, so today’s warmth is within natural range and the
hockey-stick reconstructions that erase it are suspect.
The kernel of truth
Medieval warmth is real in many records, particularly around the North Atlantic, and
reconstructions of the last two thousand years carry substantial uncertainty.
What the evidence shows
The measured difference is coherence. Warm and cold intervals of the last two thousand years were
regional and not synchronous: the warmest 51-year period of the Medieval era occurs at different
times in different regions, whereas the warmest period of the last two thousand years occurs in the
twentieth century almost everywhere Neukom et al. 2019Neukom et al. 2019. In the reconstruction
used here, the Medieval window itself (950–1250 CE) peaks at
0.21 °C relative to 1850–1900, with a highest 95th percentile of
0.41 °C, against HadCRUT5’s 1.26 °C for 2015–2024. Taking
the most generous pre-1850 value from anywhere in the record rather than from the Medieval period
raises the bound to 0.60 °C, and that value is Roman, not
Medieval: it falls in 61 CE, with the warmest
pre-1850 central value 0.31 °C in
244 CE. Neither bound reaches the present. That comparison
sets a reconstruction smoothed to decades, which can understate brief swings, against a decade of
thermometer data; the 95th percentiles are quoted for that reason, and even they fall short.
There are more cameras, more people in harm’s way and more media incentive to report disasters. The
apparent rise in extreme weather is an artefact of observation and exposure, not a change in the
atmosphere.
The kernel of truth
Exposure (what stands in harm’s way) and reporting (what gets recorded) have both grown, and for several
classes of event the raw counts are dominated by those changes. Normalized economic losses are a
contested measure
Pielke 2020Weinkle et al. 2018.
What the evidence shows
The way through is to use physical records rather than damage reports, and to be specific about
which extreme. Heat extremes have a clear detected signal; heavy precipitation has a weaker but
detected one; drought is regional; tropical cyclone frequency has no detected global trend, while
the proportion of intense storms has increased IPCC AR6 WG1 Ch. 11Knutson et al. 2019Kossin et al. 2020. This page publishes one of those null results itself: continental US hurricane
landfalls show no trend since 1900 (Figure 34), rate ratio per century
0.92
(0.64 to 1.33).
Estimates of climate sensitivity from the observed energy budget are lower than model-based
estimates. If the true value is near the bottom of the range, the warming from a given emissions
path is much smaller than advertised and the urgency evaporates.
The kernel of truth
Energy-budget estimates really do come in lower, and the low end of the assessed range is not
excluded Lewis & Curry 2018Lewis 2022.
What the evidence shows
The gap has a physical explanation that is itself measurable: feedbacks depend on the spatial
pattern of ocean warming, and the historical pattern has not been the equilibrium one, so
historical estimates are biased low for the long run Armour 2017. The multi-line assessment
that combines process evidence, historical warming and paleoclimate gives a likely range of
“2.6–3.9 K”Sherwood et al. 2020. Note what the claim concedes: it accepts CO₂
forcing and argues about the multiplier. Nothing in it disputes the measurements in
the evidence chain, and this page treats the range as a real, unresolved uncertainty in
where the evidence is weaker.
Satellites show the Earth has got greener over the satellite era, and CO₂ fertilisation is a major
cause. More CO₂ grows more plants — a benefit that is rarely mentioned.
The effect is real, is not unlimited, and does not offset the rest. Greening depends on water and
nutrient availability and saturates; land-use change and management explain a large share of the
trend, particularly in China and India Chen et al. 2019Piao et al. 2019. Rising vapor
pressure deficit works against it by increasing water stress Yuan et al. 2019, and crops grown at
elevated CO₂ show reduced protein, zinc and iron Myers et al. 2014. A greener planet with a hotter
growing season and more variable rainfall is not a simple gain, and it says nothing about the
physics of the energy imbalance.
Cold kills more people than heat, frost-free seasons are lengthening, high-latitude land is opening
to cultivation, and CO₂ fertilisation raises yields. Moderate warming is on balance good for food
production.
The kernel of truth
Longer growing seasons at high latitudes and CO₂ fertilisation are both real, and some regions and
crops do gain.
What the evidence shows
Estimated globally, the balance so far is negative. Over 1980–2008, models linking the yields of the
four largest crops to weather indicate that
“global maize and wheat production declined by 3.8 and 5.5%, respectively, relative to a counterfactual without climate trends”,
while “for soybeans and rice, winners and losers largely balanced out”Lobell et al. 2011; a later global analysis finds that anthropogenic climate change has slowed the
growth of agricultural productivity Ortiz-Bobea et al. 2021. Gains at high latitude are limited by
soils and
day length, and nutritional quality declines with CO₂ enrichment Myers et al. 2014. In California
specifically, the constraint is water: the snowpack and precipitation records in the
California section are where that argument has to be decided, not in a global
average.
This section is not a disclaimer. Each item below is a place where the evidence is thinner than
the core conclusion, stated with its numbers and with the claim on this page it limits. Three of the items
are about overstatement by people arguing for action, because that is a failure mode this page has to
avoid as well.
The multi-line assessment gives a likely range for equilibrium climate sensitivity of
“2.6–3.9 K”, with a wider 5–95% range Sherwood et al. 2020; AR6 adopted a
comparable range, and “the best estimate of ECS is 3°C”IPCC AR6 WG1 Ch. 7. Estimates from the historical
energy budget alone are lower Lewis & Curry 2018Lewis 2022, for two reasons that are
themselves uncertain: the strength of the negative aerosol forcing over the twentieth century, and
the fact that feedbacks depend on the pattern of ocean warming, which has not been the
equilibrium pattern Armour 2017. Models also fail to reproduce the observed strengthening
of the tropical Pacific sea-surface temperature gradient, which is part of that pattern
Seager et al. 2019. The top and bottom of the range are different worlds for the same emissions.
What this limits on this page: Every statement about how much warming follows a given emissions path, including any you read
elsewhere. The uncertainty does not touch the measured warming, its cause, or any link in
the evidence chain.
Temperature responds to forcing directly; precipitation responds through circulation, which models
simulate less well and which varies widely from year to year. In California’s own record the
mean has barely moved (22.0 inches in 1896–1960 against
22.2 inches in 1961–2025) while the spread has widened (standard deviation
5.29 to 6.89 inches, Brown–Forsythe p =
0.043). That result comes from a single pre-registered test, close to the
threshold, and sensitive to where the record is split. The physical argument for increasing volatility is
stronger than the local statistics Swain et al. 2025IPCC AR6 WG1 Ch. 8.
What this limits on this page: Any claim about what California's water supply will do. The observations in the
California section stand on their own; what follows from them is the uncertain part.
April 1 snow water equivalent at the high Kings and San Joaquin courses trends by
1.3 percentage points per decade over 1950–2025
(−4.8 to 7.3), and −0.3
(−4.4 to 3.8) over 1930–2025 for the longer-running subset. Both
intervals include zero and are wide. Across the western US, Mote and colleagues report that
“over 90% of snow monitoring sites with long records across the western US now show
declines”Mote et al. 2018; these particular courses sit at
a median of 8,800 ft, where April snow is least
sensitive to warming. The two findings answer different questions, and keeping them
straight is what makes them compatible: most long-record western sites are declining, and these
particular high courses are not.
What this limits on this page: Any statement that Sierra snowpack is already declining measurably at these sites. It does not
license the opposite claim either: the interval is wide enough to contain substantial decline.
Continental US hurricane landfalls show a rate ratio per century of
0.92
(0.64 to 1.33), likelihood-ratio p =
0.66; for major hurricanes
1.05
(0.55 to 1.98). Assessment reviews reach the same
conclusion globally for frequency, while finding better support for increases in the proportion of
intense storms and in storm rainfall Knutson et al. 2019Knutson et al. 2020Kossin et al. 2020.
Detection is hard here because the samples are small and the observing system changed under them.
What this limits on this page: Any claim that storms are becoming more frequent. This page's own hurricane analysis is the null
result in Figure 34.
Losses depend overwhelmingly on what has been built in harm’s way. Normalization methods try to
remove that, and reasonable people get different answers depending on the choices: some analyses
find no trend in normalized US hurricane losses Weinkle et al. 2018Pielke 2020, while
others, using area of total destruction instead of dollar values, report an increase
Grinsted et al. 2019. The disagreement is about method, and it is unresolved.
What this limits on this page: Any argument from the cost of disasters. This page makes none, in either direction.
A statistical analysis of an Atlantic overturning index put a collapse between 2025 and 2095 under
its assumptions Ditlevsen & Ditlevsen 2023; a direct examination of those methods concludes the
uncertainties are too large to predict tipping times at all Ben-Yami et al. 2024. Assessments of
thresholds across the climate system give wide ranges and low confidence for most of them
Armstrong McKay et al. 2022. These are risks with poorly known timing,
not scheduled events.
What this limits on this page: Any statement that names a date or a threshold year for the Atlantic overturning circulation or an
ice sheet.
Event attribution estimates how much more likely or intense an event was made by warming, using
model ensembles and statistical fits. The resulting ratios have wide intervals and depend on how
the event is defined, which is why the methodology protocols emphasize stating both
Philip et al. 2020Otto 2017National Academies 2016. Reporting routinely quotes the central
estimate alone.
What this limits on this page: Any claim on this page or elsewhere that a particular heatwave, fire or storm was caused by climate
change. This page attributes trends, not events.
The published 95% uncertainty on the annual value is ±77ZJ in
1960 against ±6 ZJ in 2025: the early ocean is an estimate from
sparse ship transects with model-informed mapping, not a measurement of the whole basin
Cheng et al. 2024Levitus et al. 2012. For scale, the 1983–1997 window gained
56 ZJ, comparable to that early uncertainty, while
2013–2025 gained 165 ZJ against an uncertainty an order of
magnitude smaller. No trend is fitted to any of those windows: their effective sample sizes fall
below this page’s own minimum. The ocean argument in link 5 is strongest exactly where the
data are best, which is the Argo era.
What this limits on this page: The strength of the ocean-heat argument before roughly 2000. After Argo, the same analysis gives
intervals that exclude zero by a wide margin.
Over 1950–1979, global land daily minima warmed faster than maxima
(0.104 °C against −0.015 °C per decade,
whose own interval −0.087 to 0.057 °C includes zero).
Over 1979–2023 they did not (0.235 °C against
0.305 °C). The reversal is documented in the literature
Vose et al. 2005 and is visible in Figure 11. Aerosol and cloud changes affect the
diurnal range as well as greenhouse gases, which is why the diurnal range is a weaker fingerprint
than stratospheric cooling.
What this limits on this page: Any use of "nights are warming faster than days" as current evidence of greenhouse forcing,
including the Fresno night-time warming in Figure 16, which is partly local.
RCP8.5 was designed as a high-end, low-probability scenario, and for years it was described in
papers and press coverage as the “business as usual” path. Hausfather and Peters set out why that
framing misleads: it assumes a large expansion of coal that current trends do not support, and it
made “business as usual” outcomes look more extreme than the evidence warranted
Hausfather & Peters 2020. Impact studies built on it are still quoted without the caveat.
What this limits on this page: Nothing on this page, which makes no projections. Calling RCP8.5 business as usual is still the most
consequential overstatement in circulation, and a reader who has met it has reason to distrust
projections generally.
Surveys of expert agreement measure what scientists think Cook et al. 2013Cook et al. 2016Lynas et al. 2021; they are not measurements of the atmosphere, and the best-known of them has a
published methodological critique Tol 2016. Presenting “97%” as though it answered a
physical question invites exactly the response it gets from skeptical readers, and it is
unnecessary: the physical evidence is downloadable from the data appendix.
What this limits on this page: The consensus card and anything that leans on agreement rather than
measurement. This page cites no survey as evidence for a physical claim.
A 2023 analysis produced a central estimate in the middle of this century under its stated
assumptions, and the number was widely repeated without them Ditlevsen & Ditlevsen 2023. The published
examination of those methods concludes that the uncertainties are too large to predict tipping
times Ben-Yami et al. 2024. Communicating a wide, assumption-dependent range as a date is the same
error this page criticises in the other direction.
What this limits on this page: Any date-bearing claim about circulation collapse. The underlying risk is real and its timing is
not known.
A chart with no trend in it
The most useful thing a page like this can publish is a result that does not help its argument. Here is
one, computed with a test fixed in advance of looking at the answer.
No trend is detectable in continental US hurricane landfalls since 1900: a null result, published as found, on a record too short and too noisy to rule out a change of a third in either direction
Hurricane impacts on the continental United States per year: all categories (top) and major, category 3–5 (bottom), from NOAA's Hurricane Research Division list.
Pre-registered Poisson regression over 1900–2025: all hurricanes, rate ratio per century 0.92 (0.64 to 1.33), likelihood-ratio p = 0.66; major hurricanes 1.05 (0.55 to 1.98), p = 0.89. Totals over the period: 212 and 71. US landfalls are a small, noisy sample of global tropical-cyclone activity, and basin-wide counts before satellites miss storms that never reached a ship or a coast, which Vecchi and Knutson estimate for 1878–1965 Vecchi & Knutson 2008. Assessments find the evidence stronger for changes in intensity and rainfall than in frequency Knutson et al. 2019Klotzbach et al. 2018Vecchi et al. 2021. This chart says nothing either way about those.
Data: NOAA HRD continental US hurricane impacts/landfalls table, fetched 2026-09-14 UTC. Processing: scripts/process/hurricanes.py.
Check it yourself: data us_hurricane_impacts_annual.csv · the image above and the interactive chart are
drawn from one specification, both inside this page
Continental US hurricane landfalls show no trend since 1900: rate ratio per century
0.92
(0.64 to 1.33), likelihood-ratio p =
0.66; for major hurricanes
1.05
(0.55 to 1.98), p = 0.89.
The snowpack index in Figure 23 is a second one: no trend at those courses, over either
period tested.
Why none of this changes the core conclusion
Every item above is about how much, how fast, or what follows: sensitivity, regional rainfall,
storm frequency, losses, thresholds, single events. The core conclusion rests on the eight links in
the evidence chain, and none of those links depends on any contested item here:
CO₂’s absorption is a laboratory measurement, unaffected by climate sensitivity.
The rise in CO₂ and its fossil origin are measured by isotopes and oxygen, unaffected by regional
rainfall projections.
The ocean’s heat gain is measured by floats, unaffected by hurricane statistics. Its earlier decades
are a model-informed reconstruction, which is why that limit has an entry of its
own above; the Argo era does not depend on it.
The vertical pattern of warming (troposphere up, stratosphere down) is measured by satellites and
distinguishes greenhouse forcing from solar forcing regardless of how sensitive the climate turns out
to be.
The one link that does depend on models is link 8, the formal attribution that divides the
observed warming into shares. Measurements establish that the warming is happening and that greenhouse
forcing is driving it; apportioning it between causes uses model simulations, and this page says so where
it makes that step rather than only here. The seven measured links do not rest on it.
If every uncertainty above resolved at its most favorable end, the measured warming and its cause would
be unchanged; what would change is the projection of what comes next, which is a different claim with
wider error bars and is labeled that way throughout this page.
No number in the prose was typed. Each one is a placeholder that resolved, when this page was built, to a
value computed from a named public dataset, and every citation was fetched and checked at the same time,
with its HTTP status and access date recorded. Three appendices at the end of the page make that
checkable right now.
The data is here. The data appendix carries every processed table in full, with its
baseline, its method, the code that wrote it, and the SHA-256 of every raw file that code read.
The code is here. The code appendix carries those scripts themselves, so “computed by a
named script” can be read line by line instead of taken on trust.
The fetch record is here. The provenance table gives every raw file’s
source URL, the exact request that retrieved it, the HTTP status it returned, when it was fetched, and
its SHA-256.
To check one number end to end, take the ocean’s heat gain. The prose marks it as a computed value.
The data appendix names the table it came from and the script that wrote that table. The provenance
table gives the URL that supplied the raw input and its hash. Fetch that file from the provider, run the
script against it, and compare the result. Whether to trust the provider is then your judgment — which
is why every one of them is named.
What the hashes are for, and what they are not. A SHA-256 here identifies the exact bytes this build
used, so anyone holding that file can confirm they hold the same one. It is not a test you can run
against a fresh download: most of these series are living — the ocean analyses, the station archives and
the CO₂ records are appended to monthly and revised backwards — so a file fetched today will differ, and
differ legitimately. The check that survives is the one that matters anyway: your copy should agree with
this one over the years they share. A few providers also refuse automated requests, so some sources have
to be opened in a browser rather than fetched by a script.
This page needs nothing else. Every chart, the data behind it, the code, the source list and this
explanation are inside the single HTML document you are reading. No server, no fonts, no scripts loaded
from anywhere, nothing that stops working when a link rots. Copy it to a stick, email it, or put it on
any static host; it behaves identically offline.
Datasets and versions
Every dataset used is listed in the source list with its URL, the HTTP status it returned and
the date it was fetched, and in the data appendix with the SHA-256 of each raw file. The main
ones: NOAAGlobalTemp v6 Huang et al. 2024, HadCRUT5 (HadCRUT.5.0.2.0, summary series and
the 200-member ensemble), GISTEMP
v4 with the v1.2.1 uncertainty file, Berkeley Earth land and ocean, GHCNm v4 monthly (unadjusted and
adjusted), NOAA nClimGrid via Climate at a Glance for California and its counties and the National
Temperature Index for the contiguous US NOAA NCEI, raw GHCN-Daily station
files via the NCEI Access service, RCC-ACIS for station metadata, ThreadEx and PRISM values, NOAA GML
greenhouse gases and the Annual Greenhouse Gas Index, the Scripps isotope and oxygen programs, the
Antarctic ice-core CO₂ composite, the IAP ocean heat content analysis, NRLTSI2 solar irradiance as
distributed in NOAA’s climate data record NOAA NCEI, RSS v4.0
and UAH v6.1 satellite temperatures, PSMSL San Francisco and NOAA satellite sea level, the NSIDC Sea Ice
Index, WGMS reference glaciers, the IPCC AR6 SPM.1 data files, the Hausfather et al. (2020) projection
tables, CDEC snow courses, CAL FIRE FRAP fire perimeters and NOAA’s hurricane landfall list.
Baselines
Anomaly baselines differ between providers (NOAA 1901–2000, HadCRUT5 1961–1990, GISTEMP and Berkeley
1951–1980), so every series is re-baselined explicitly and the period is printed on the chart:
Global charts: 1850–1900. HadCRUT5 is re-baselined realization by realization; NOAAGlobalTemp and
Berkeley Earth directly. GISTEMP begins in 1880, so its own 1880–1900 mean is removed and the other
three records’ mean 1880–1900 anomaly (−0.033 °C, spread across the three
0.023 °C) is added Hawkins et al. 2017.
Local and state charts: 1901–2000, the only century-long period the county, state and global series
share.
Satellite layers: 1979–1998; ocean heat content: 2006–2015; sea level: 1993–2012; GHCNm
raw-versus-adjusted: each station’s own 1961–1990 mean.
Trends, changes and intervals
Trend = ordinary least squares on annual values, with a 95% interval widened for autocorrelation by
an AR(1) effective sample size, n_eff = n(1−r₁)/(1+r₁), and t with n_eff − 2 degrees of freedom
Santer et al. 2000. If n_eff falls below 10, no trend is reported. An ARMA(1,1) sensitivity factor
Foster & Rahmstorf 2011 is computed alongside and stored in the processed files.
“Warmed by X since Y” = the difference between two 30-year means, each with an AR(1)-adjusted
standard error, combined in quadrature, with t on the smaller n_eff − 1 degrees of freedom — never a
trend multiplied by a number of years. Inside a 30-year window a steady rise looks like persistence,
which lowers n_eff and widens the interval.
The n_eff floor governs fitted trends only. A short autocorrelated record can turn a few unusual
years into a confident-looking slope, so below 10 no trend is claimed at all. Means and differences of
means are published at any n_eff, because a low n_eff already widens their intervals through the
t-distribution; wherever such an interval rests on an n_eff below 10, the effective sample size is
printed beside it.
n_eff never exceeds n, which matters for a mean of year-to-year differences. Differencing a series
induces negative correlation between neighboring values, and for a negative r₁ the AR(1) formula returns
more effective observations than there are years; the code uses n in that case instead. The consequence
is worth stating plainly: a mean yearly ocean heat gain over a window telescopes to the difference
between its two endpoints, so its interval is not the independent evidence that many observations would
be. It is nonetheless the wider of the two available intervals — propagating the provider’s published
uncertainty on those endpoints gives a narrower one — so the published figure is the conservative one.
Station trends also need a complete record: at least 8 valid years in every ten-year window. A
station that fails is compared with its county across its longest gap (mean after minus mean before)
instead of being given a trend.
“Agree to within X” = the trend of the difference series between two datasets
Santer et al. 2000, because records that share observations also share weather noise, and overlapping
intervals would prove nothing.
Counts (hot days, hurricane landfalls) use Poisson or quasi-Poisson regression with a
likelihood-ratio test, and the Pearson dispersion is reported so over-dispersion is visible.
Missing data and partial years
A monthly mean is computed only if no more than three days are missing; an annual mean only if all twelve
months are valid. Threshold-day counts require zero missing days in the months that can produce the
event (May–September for days at or above 100 °F, June–September for nights at or above 75 °F). Values
that failed NOAA’s quality control are dropped first. The number of years excluded by these rules is
reported on the charts that use them. The partial year 2026 is excluded from every annual series; monthly
series end at the last complete month.
Tests fixed before they were run
Five statistical tests were written down before being computed, so that the result could not be chosen
after the fact: the California precipitation variance test
(Brown–Forsythe, 1896–1960 against 1961–2025), the US hurricane count regression, the change-point search
on the global record, the threshold-day regressions for Fresno, and the snowpack index rule. Two of the
five returned nothing — no trend in snowpack, no trend in hurricane counts — and both are on this page.
What was skipped, and why
CERES top-of-atmosphere radiation was not fetched in this build, so the energy imbalance is
presented through ocean heat content and the published literature rather than as a chart.
Mid- and upper-stratospheric temperatures (SSU) had no public series that validated here, so the
25–50 km cooling is quoted from Santer et al. 2023 instead of plotted.
Snow-versus-rain fraction for the Sierra has no fetched dataset behind it, so Figure 23
shows April 1 snow water equivalent only.
A ppm-equivalent axis for atmospheric oxygen was dropped: the Scripps files state no conversion
factor, and this page does not invent one.
Livneh gridded values after 2011 are excluded from Figure 21 because they depart from
PRISM by more than their earlier offset — by +1.1 to +2.1 °C against a 1981–2011 offset near
−0.4/+1.0 °C, found by the automated validation pass over the raw files.
Every fetch that failed is in the fetch record with its URL, its HTTP status and the
time it was attempted; a file that failed to arrive has no rows in any table that would have used it.
Charts
Each figure is built from a JSON specification generated from the processed CSVs by the figure stage.
That stage is not in the code appendix, and neither are the fetch, page-build and verify stages:
the appendix carries the processing and library modules, which is where the published numbers are
computed. What the figure stage does is select and draw. Almost every series it plots is a column read
straight from a processed table, and each figure’s footer links the tables it used, so the values behind
a line can be read against the line.
Two exceptions are worth naming, because “select and draw” is not quite the whole truth. The shaded
uncertainty band on Figure 6 is the ocean heat content column plus and minus its published
95% column, added at the drawing stage rather than stored; and Figure 3’s deep-time axis is
gas age converted to years before 1950. Both are arithmetic on columns that are in the appendix, so
both can be reproduced from what is here, but neither number is itself in a table. The static image you see with JavaScript disabled and the interactive chart you see with it enabled
are drawn from the same specification, by matplotlib and by this page’s own code respectively; there is
no chart library and nothing is loaded from a network. Colors come from a palette checked for
color-vision separation and contrast.
Three conventions are worth knowing before reading them. A temperature chart carries the same quantity on
both sides: the left axis in one unit and the right axis in the other, each with its own round numbers and
its own title, so the two scales line up in value and not in tick marks — a difference of one degree
Celsius is one of 1.8 degrees Fahrenheit. Where an axis does not start at zero, it is marked with a ≈
at its foot; bars, which are read as lengths, are always drawn from zero. A vertical line inside a plot
marks a dated event, labeled sideways at the line.
Folded away because the evidence chain covers the physics
Most of what is here is said, at more length and with its evidence attached, in
the evidence chain. It is kept because it collects in one place three things the rest of the
page assumes: how this page separates a measurement from a projection, why every temperature chart plots a
departure from an average rather than a temperature, and why the word “forcing” names two different
quantities depending on who is using it — which the glossary entry for
radiative forcing states in more detail.
Why would rising CO₂ matter to global temperature, and why would that be unusual? In brief, carbon
dioxide absorbs infrared radiation and slows down how fast Earth cools off. Laboratories have measured CO₂
absorbance since the nineteenth century Tyndall 1861, and those laboratory measurements are checked
against spectra recorded through the real atmosphere Gordon et al. 2022. The amount of CO₂ in the air has
been measured continuously at Mauna Loa, Hawaii since March 1958, whose first complete calendar year is
1959: 316.0 ppm was measured then, and 427.4 ppm
measured in 2025, which is 129 ppm above the highest value anywhere in
806,000 years of Antarctic ice cores — a record that smooths over decades to
centuries, so a short-lived spike could be missing from it. The added carbon carries a fossil signature: the
ratio of ¹³C to ¹²C in atmospheric CO₂ (δ¹³C) fell by 1.129‰ between
1981 and 2024 while atmospheric oxygen fell by
725per meg, indicating burning organic carbon as the source
and not significant natural sources like outgassing volcanoes or warmer oceans releasing dissolved CO₂.
Earth and its oceans are getting warmer; four groups build global temperature records from partly different
observations with different methods; over 1970–2024 their trends run 0.192 °C to
0.206 °C increased per decade. The upper 2,000 m of the ocean has gained
440zettajoules of heat since 1960, with a published uncertainty of
±77 ZJ on the 1960 estimate. The troposphere warmed while the
stratosphere above it cooled — the pattern greenhouse gases produce, and the opposite of what
a brighter Sun would produce.
Every number so far is a measurement rather than a projection — an instrument reading, or a statistic
computed from instrument readings. Readings from around the world provide the same observation: the planet is
trending warmer. Measurement uncertainties, intervals, and ranges are stated as retrieved from the data
providers. Where this page prints an interval, it is the one it computed; and a value whose interval
includes zero is never printed without it. Where the measurements themselves are disputed, this page takes
the dispute up directly instead of asserting agreement: see the temperature record and
the Sun. Where these temperature and CO₂ numbers are headed is a projection, a claim with
uncertainty, and this page keeps the two apart in all instances.
How do I trust these numbers?
How to check this page details how you can check each number end to end. Where the data came
from, how it was used, and the methods by which the author put this all together. Effort has been made to
present this page through evidence, physical principles, and logical connections which may all be disputed.
How the page is ordered, and why. It defines what climate, weather, and the energy budget are, and then
works through the evidence chain. Counter-arguments, claims that dispute climate change, and examples of
weaker evidence mostly come toward the end, because it is necessary to understand the core conclusion of
anthropogenic climate change before it can be dismantled and overturned. Much of the framing is based on the
measurements which show Earth’s surface temperature warming trend from the 1960s. Through that lens we learn
the physical principles and logical connections used by the evidence chain to come to the core conclusion.
Once we know the whole chain, we take a look at the most populated and third largest by land area US State
as an example, California — what do real numbers say in two counties with different record histories?
After the real local data in California the page turns to the evidence against the core conclusion, which
culminates in “Questions a skeptic asks” and includes extreme weather trends. The primary arguments are
complete by the half-way point, with supplemental information and common dispute claims against human-caused
climate change making up the bulk of the remaining content.
What do we need to measure?
Three quantities carry most of the argument on this page, and each is physically measured by instruments:
Temperature anomalies, not absolute temperatures. Global temperature records use each location’s change
from its own long-term average, rather than its raw temperature. This makes different places comparable: a
valley may be much warmer than a nearby ridge, but both can show the same year-to-year change. That is why
global averages use anomalies and every chart specifies its baseline period.
Gas concentrations, measured directly since 1958 and before that from air trapped in ice.
Energy, measured as ocean heat content and as radiation at the top of the atmosphere. Temperature
is a measure of the average kinetic energy of molecules, and it rises or falls as the balance between
absorbed sunlight and outgoing infrared changes (the energy budget).
Anomalies are used because the planet’s absolute average temperature is known far less precisely than its
change. The planet’s average surface temperature is easier to know but has multiple correct ways to be
defined, so looking at the change in temperature from its average is a precise and correct way to describe
changes. On Berkeley Earth’s published estimate of the absolute level, the global average was about
13.9 °C in 1850–1900 and 15.1 °C in 2015–2024.
A second estimate, which differs only in how it treats sea-ice regions, sits
0.6 °C higher throughout, and shows exactly the same warming. Both are
drawn in Figure 7, in the evidence chain.
The global number most often quoted — warming since 1850–1900 — is a difference between two averages at
specific dates. For 2015–2024, the four records used here give
1.15 °C to 1.33 °C above their 1850–1900
means. The spread between them is not noise to be hidden; it measures how much the choice of method matters.
Global trends average relatively smoothly; the smaller the area you look at, the more it fluctuates. The
reason is that weather moves heat around rather than creating it. A month that runs warm over your town is
usually a month that runs cool somewhere else, and averaging across a wider area lets those offsetting
swings cancel. A global average pools thousands of such regions, so most of the year-to-year noise cancels
and the underlying trend is what remains. A state pools fewer regions, a county fewer still, and a single
town is one draw with nothing to cancel against — so the same trend arrives buried in much larger swings.
The trend is not weaker locally; it is harder to see against the noise, and it takes more years to
establish. Figure 13 and Figure 15, both in the California section, show the same period at
four scales.
Two different quantities are called “forcing” and they should not be directly subtracted. The
2.61 W m⁻² figure is effective radiative forcing
from all human influences, measured relative to 1850–1900: greenhouse gases add warming, while aerosols and
land-use changes offset some of it. NOAA’s index is narrower: it measures stratosphere-adjusted forcing from
long-lived greenhouse gases alone, relative to 1750. There, CO₂ contributes 2.33 W m⁻² of
3.54 W m⁻² NOAA Global Monitoring Laboratory. The difference between these numbers is not “everything
else.” The greenhouse gases alone produce more forcing than the net human total because aerosols and other
effects offset much of that warming.
Each entry was requested while this page was being built; the HTTP status and the date are what the
server returned then. Entries with a DOI were also resolved through https://doi.org/. Newspapers,
advocacy sites, blogs and encyclopedias are not cited as evidence anywhere on this page.
Papers, reports and books
Abatzoglou, J. T., & Williams, A. P. (2016). Impact of anthropogenic climate change on wildfire across western US forests. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1607171113. https://doi.org/10.1073/pnas.1607171113HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
. Accessing NOAA daily temperature and precipitation extremes based on combined/threaded station records. https://ams.confex.com/ams/pdfpapers/100699.pdfHTTP 200, verified url-200, checked 2026-09-13
Armour, K. C. (2017). Energy budget constraints on climate sensitivity in light of inconstant climate feedbacks. Nature Climate Change. doi:10.1038/nclimate3278. https://doi.org/10.1038/nclimate3278HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Armstrong McKay, D. I., Staal, A., Abrams, J. F., Winkelmann, R., Sakschewski, B., Loriani, S., et al. (2022). Exceeding 1.5°C global warming could trigger multiple climate tipping points. Science. doi:10.1126/science.abn7950. https://doi.org/10.1126/science.abn7950HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Arrhenius, S. (1896). XXXI. On the influence of carbonic acid in the air upon the temperature of the ground. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science. doi:10.1080/14786449608620846. https://doi.org/10.1080/14786449608620846HTTP 403, verified doi-registered+metadata+title, checked 2026-09-15
Balch, J. K., Bradley, B. A., Abatzoglou, J. T., Nagy, R. C., Fusco, E. J., & Mahood, A. L. (2017). Human-started wildfires expand the fire niche across the United States. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1617394114. https://doi.org/10.1073/pnas.1617394114HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Beaulieu, C., Gallagher, C., Killick, R., Lund, R., & Shi, X. (2024). A recent surge in global warming is not detectable yet. Communications Earth & Environment. doi:10.1038/s43247-024-01711-1. https://doi.org/10.1038/s43247-024-01711-1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Ben-Yami, M., Morr, A., Bathiany, S., & Boers, N. (2024). Uncertainties too large to predict tipping times of major Earth system components from historical data. Science Advances. doi:10.1126/sciadv.adl4841. https://doi.org/10.1126/sciadv.adl4841HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Bereiter, B., Eggleston, S., Schmitt, J., Nehrbass‐Ahles, C., Stocker, T. F., Fischer, H., et al. (2015). Revision of the EPICA Dome C CO 2 record from 800 to 600 kyr before present. Geophysical Research Letters. doi:10.1002/2014GL061957. https://doi.org/10.1002/2014GL061957HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Bonfils, C., & Lobell, D. (2007). Empirical evidence for a recent slowdown in irrigation-induced cooling. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.0700144104. https://doi.org/10.1073/pnas.0700144104HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Burton, M. R., Sawyer, G. M., & Granieri, D. (2013). Deep Carbon Emissions from Volcanoes. Reviews in Mineralogy and Geochemistry. doi:10.2138/rmg.2013.75.11. https://doi.org/10.2138/rmg.2013.75.11HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Callendar, G. S. (1938). The artificial production of carbon dioxide and its influence on temperature. Quarterly Journal of the Royal Meteorological Society. doi:10.1002/qj.49706427503. https://doi.org/10.1002/qj.49706427503HTTP 403, verified doi-registered+metadata+title, checked 2026-09-15
Chen, C., Park, T., Wang, X., Piao, S., Xu, B., Chaturvedi, R. K., et al. (2019). China and India lead in greening of the world through land-use management. Nature Sustainability. doi:10.1038/s41893-019-0220-7. https://doi.org/10.1038/s41893-019-0220-7HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Cheng, L., Pan, Y., Tan, Z., Zheng, H., Zhu, Y., Wei, W., et al. (2024). IAPv4 ocean temperature and ocean heat content gridded dataset. Earth System Science Data. doi:10.5194/essd-16-3517-2024. https://doi.org/10.5194/essd-16-3517-2024HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Christy, J. R., Norris, W. B., Redmond, K., & Gallo, K. P. (2006). Methodology and Results of Calculating Central California Surface Temperature Trends: Evidence of Human-Induced Climate Change?. Journal of Climate. doi:10.1175/JCLI3627.1. https://doi.org/10.1175/JCLI3627.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Coddington, O., Lean, J. L., Pilewskie, P., Snow, M., & Lindholm, D. (2016). A Solar Irradiance Climate Data Record. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-14-00265.1. https://doi.org/10.1175/BAMS-D-14-00265.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Committee on Extreme Weather Events and Climate Change Attribution, Board on Atmospheric Sciences and Climate, Division on Earth and Life Studies, & National Academies of Sciences, Engineering, and Medicine (2016). Attribution of Extreme Weather Events in the Context of Climate Change. National Academies Press. doi:10.17226/21852. https://doi.org/10.17226/21852HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Connolly, R., Soon, W., Connolly, M., Baliunas, S., Berglund, J., Butler, C. J., et al. (2021). How much has the Sun influenced Northern Hemisphere temperature trends? An ongoing debate. Research in Astronomy and Astrophysics. doi:10.1088/1674-4527/21/6/131. https://doi.org/10.1088/1674-4527/21/6/131HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Cook, J., Nuccitelli, D., Green, S. A., Richardson, M., Winkler, B., Painting, R., et al. (2013). Quantifying the consensus on anthropogenic global warming in the scientific literature. Environmental Research Letters. doi:10.1088/1748-9326/8/2/024024. https://doi.org/10.1088/1748-9326/8/2/024024HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Cook, J., Oreskes, N., Doran, P. T., Anderegg, W. R. L., Verheggen, B., Maibach, E. W., et al. (2016). Consensus on consensus: a synthesis of consensus estimates on human-caused global warming. Environmental Research Letters. doi:10.1088/1748-9326/11/4/048002. https://doi.org/10.1088/1748-9326/11/4/048002HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Daly, C., Halbleib, M., Smith, J. I., Gibson, W. P., Doggett, M. K., Taylor, G. H., et al. (2008). Physiographically sensitive mapping of climatological temperature and precipitation across the conterminous United States. International Journal of Climatology. doi:10.1002/joc.1688. https://doi.org/10.1002/joc.1688HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Diamond, H. J., Karl, T. R., Palecki, M. A., Baker, C. B., Bell, J. E., Leeper, R. D., et al. (2013). U.S. Climate Reference Network after One Decade of Operations: Status and Assessment. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-12-00170.1. https://doi.org/10.1175/BAMS-D-12-00170.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Diffenbaugh, N. S., Swain, D. L., & Touma, D. (2015). Anthropogenic warming has increased drought risk in California. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1422385112. https://doi.org/10.1073/pnas.1422385112HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Ditlevsen, P., & Ditlevsen, S. (2023). Warning of a forthcoming collapse of the Atlantic meridional overturning circulation. Nature Communications. doi:10.1038/s41467-023-39810-w. https://doi.org/10.1038/s41467-023-39810-wHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Dunne, E. M., Gordon, H., Kürten, A., Almeida, J., Duplissy, J., Williamson, C., et al. (2016). Global atmospheric particle formation from CERN CLOUD measurements. Science. doi:10.1126/science.aaf2649. https://doi.org/10.1126/science.aaf2649HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Etminan, M., Myhre, G., Highwood, E. J., & Shine, K. P. (2016). Radiative forcing of carbon dioxide, methane, and nitrous oxide: A significant revision of the methane radiative forcing. Geophysical Research Letters. doi:10.1002/2016GL071930. https://doi.org/10.1002/2016GL071930HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Feldman, D. R., Collins, W. D., Gero, P. J., Torn, M. S., Mlawer, E. J., & Shippert, T. R. (2015). Observational determination of surface radiative forcing by CO2 from 2000 to 2010. Nature. doi:10.1038/nature14240. https://doi.org/10.1038/nature14240HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Fischer, T. P., & Aiuppa, A. (2020). AGU Centennial Grand Challenge: Volcanoes and Deep Carbon Global CO 2 Emissions From Subaerial Volcanism—Recent Progress and Future Challenges. Geochemistry, Geophysics, Geosystems. doi:10.1029/2019GC008690. https://doi.org/10.1029/2019GC008690HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Folland, C. K., & Parker, D. E. (1995). Correction of instrumental biases in historical sea surface temperature data. Quarterly Journal of the Royal Meteorological Society. doi:10.1002/qj.49712152206. https://doi.org/10.1002/qj.49712152206HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Forster, P. M., Smith, C., Walsh, T., Lamb, W. F., Lamboll, R., Cassou, C., et al. (2025). Indicators of Global Climate Change 2024: annual update of key indicators of the state of the climate system and human influence. Earth System Science Data. doi:10.5194/essd-17-2641-2025. https://doi.org/10.5194/essd-17-2641-2025HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Frederikse, T., Landerer, F., Caron, L., Adhikari, S., Parkes, D., Humphrey, V. W., et al. (2020). The causes of sea-level rise since 1900. Nature. doi:10.1038/s41586-020-2591-3. https://doi.org/10.1038/s41586-020-2591-3HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Friedlingstein, P., O'Sullivan, M., Jones, M. W., Andrew, R. M., Hauck, J., Landschützer, P., et al. (2025). Global Carbon Budget 2024. Earth System Science Data. doi:10.5194/essd-17-965-2025. https://doi.org/10.5194/essd-17-965-2025HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Fyfe, J. C., Meehl, G. A., England, M. H., Mann, M. E., Santer, B. D., Flato, G. M., et al. (2016). Making sense of the early-2000s warming slowdown. Nature Climate Change. doi:10.1038/nclimate2938. https://doi.org/10.1038/nclimate2938HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Gerlach, T. (2011). Volcanic versus anthropogenic carbon dioxide. Eos, Transactions American Geophysical Union. doi:10.1029/2011EO240001. https://doi.org/10.1029/2011EO240001HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Gillett, N. P., Kirchmeier-Young, M., Ribes, A., Shiogama, H., Hegerl, G. C., Knutti, R., et al. (2021). Constraining human contributions to observed warming since the pre-industrial period. Nature Climate Change. doi:10.1038/s41558-020-00965-9. https://doi.org/10.1038/s41558-020-00965-9HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Gordon, I. E., Rothman, L. S., Hargreaves, R. J., Hashemi, R., Karlovets, E. V., Skinner, F. M., et al. (2022). The HITRAN2020 molecular spectroscopic database. Journal of Quantitative Spectroscopy and Radiative Transfer. doi:10.1016/j.jqsrt.2021.107949. https://doi.org/10.1016/j.jqsrt.2021.107949HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Graven, H., Keeling, R. F., & Rogelj, J. (2020). Changes to Carbon Isotopes in Atmospheric CO2 Over the Industrial Era and Into the Future. Global Biogeochemical Cycles. doi:10.1029/2019GB006170. https://doi.org/10.1029/2019GB006170HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Grinsted, A., Ditlevsen, P., & Christensen, J. H. (2019). Normalized US hurricane damage estimates using area of total destruction, 1900−2018. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1912277116. https://doi.org/10.1073/pnas.1912277116HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Hansen, J., Fung, I., Lacis, A., Rind, D., Lebedeff, S., Ruedy, R., et al. (1988). Global climate changes as forecast by Goddard Institute for Space Studies three‐dimensional model. Journal of Geophysical Research: Atmospheres. doi:10.1029/JD093iD08p09341. https://doi.org/10.1029/JD093iD08p09341HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Harries, J. E., Brindley, H. E., Sagoo, P. J., & Bantges, R. J. (2001). Increases in greenhouse forcing inferred from the outgoing longwave radiation spectra of the Earth in 1970 and 1997. Nature. doi:10.1038/35066553. https://doi.org/10.1038/35066553HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Hausfather, Z., Cowtan, K., Clarke, D. C., Jacobs, P., Richardson, M., & Rohde, R. (2017). Assessing recent warming using instrumentally homogeneous sea surface temperature records. Science Advances. doi:10.1126/sciadv.1601207. https://doi.org/10.1126/sciadv.1601207HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Hausfather, Z., Cowtan, K., Menne, M. J., & Williams, C. N. (2016). Evaluating the impact of U.S. Historical Climatology Network homogenization using the U.S. Climate Reference Network. Geophysical Research Letters. doi:10.1002/2015GL067640. https://doi.org/10.1002/2015GL067640HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Hausfather, Z., Drake, H. F., Abbott, T., & Schmidt, G. A. (2020). Evaluating the Performance of Past Climate Model Projections. Geophysical Research Letters. doi:10.1029/2019GL085378. https://doi.org/10.1029/2019GL085378HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Hausfather, Z., Marvel, K., Schmidt, G. A., Nielsen-Gammon, J. W., & Zelinka, M. (2022). Climate simulations: recognize the ‘hot model’ problem. Nature. doi:10.1038/d41586-022-01192-2. https://doi.org/10.1038/d41586-022-01192-2HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Hausfather, Z., Menne, M. J., Williams, C. N., Masters, T., Broberg, R., & Jones, D. (2013). Quantifying the effect of urbanization on U.S. Historical Climatology Network temperature records. Journal of Geophysical Research: Atmospheres. doi:10.1029/2012JD018509. https://doi.org/10.1029/2012JD018509HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Hawkins, E., Ortega, P., Suckling, E., Schurer, A., Hegerl, G., Jones, P., et al. (2017). Estimating Changes in Global Temperature since the Preindustrial Period. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-16-0007.1. https://doi.org/10.1175/BAMS-D-16-0007.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Huang, B., Thorne, P. W., Banzon, V. F., Boyer, T., Chepurin, G., Lawrimore, J. H., et al. (2017). Extended Reconstructed Sea Surface Temperature, Version 5 (ERSSTv5): Upgrades, Validations, and Intercomparisons. Journal of Climate. doi:10.1175/JCLI-D-16-0836.1. https://doi.org/10.1175/JCLI-D-16-0836.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Huang, B., Yin, X., Menne, M. J., Vose, R. S., & Zhang, H.-M. (2024). NOAA Global Surface Temperature Dataset (NOAAGlobalTemp), Version 6.0. NOAA National Centers for Environmental Information. doi:10.25921/rzxg-p717. https://doi.org/10.25921/rzxg-p717HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Hugonnet, R., McNabb, R., Berthier, E., Menounos, B., Nuth, C., Girod, L., et al. (2021). Accelerated global glacier mass loss in the early twenty-first century. Nature. doi:10.1038/s41586-021-03436-z. https://doi.org/10.1038/s41586-021-03436-zHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Karl, T. R., Arguez, A., Huang, B., Lawrimore, J. H., McMahon, J. R., Menne, M. J., et al. (2015). Possible artifacts of data biases in the recent global surface warming hiatus. Science. doi:10.1126/science.aaa5632. https://doi.org/10.1126/science.aaa5632HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Katata, G., Connolly, R., & O’Neill, P. (2023). Evidence of Urban Blending in Homogenized Temperature Records in Japan and in the United States: Implications for the Reliability of Global Land Surface Air Temperature Data. Journal of Applied Meteorology and Climatology. doi:10.1175/JAMC-D-22-0122.1. https://doi.org/10.1175/JAMC-D-22-0122.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Keeley, J. E., & Syphard, A. D. (2019). Twenty-first century California, USA, wildfires: fuel-dominated vs. wind-dominated fires. Fire Ecology. doi:10.1186/s42408-019-0041-0. https://doi.org/10.1186/s42408-019-0041-0HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Keeling, C. D. (1960). The Concentration and Isotopic Abundances of Carbon Dioxide in the Atmosphere. Tellus A: Dynamic Meteorology and Oceanography. doi:10.3402/tellusa.v12i2.9366. https://doi.org/10.3402/tellusa.v12i2.9366HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Keeling, C. D., Piper, S. C., Bacastow, R. B., Wahlen, M., Whorf, T. P., Heimann, M., et al. (2005). Atmospheric CO2 and 13CO2 Exchange with the Terrestrial Biosphere and Oceans from 1978 to 2000: Observations and Carbon Cycle Implications. Ecological Studies. doi:10.1007/0-387-27048-5_5. https://doi.org/10.1007/0-387-27048-5_5HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Keeling, R. F., Graven, H. D., Welp, L. R., Resplandy, L., Bi, J., Piper, S. C., et al. (2017). Atmospheric evidence for a global secular increase in carbon isotopic discrimination of land photosynthesis. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1619240114. https://doi.org/10.1073/pnas.1619240114HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Keeling, R. F., Piper, S. C., & Heimann, M. (1996). Global and hemispheric CO2 sinks deduced from changes in atmospheric O2 concentration. Nature. doi:10.1038/381218a0. https://doi.org/10.1038/381218a0HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Kennedy, J. J., Rayner, N. A., Atkinson, C. P., & Killick, R. E. (2019). An Ensemble Data Set of Sea Surface Temperature Change From 1850: The Met Office Hadley Centre HadSST.4.0.0.0 Data Set. Journal of Geophysical Research: Atmospheres. doi:10.1029/2018JD029867. https://doi.org/10.1029/2018JD029867HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Kirkby, J., Curtius, J., Almeida, J., Dunne, E., Duplissy, J., Ehrhart, S., et al. (2011). Role of sulphuric acid, ammonia and galactic cosmic rays in atmospheric aerosol nucleation. Nature. doi:10.1038/nature10343. https://doi.org/10.1038/nature10343HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Klotzbach, P. J., Bowen, S. G., Pielke, R., & Bell, M. (2018). Continental U.S. Hurricane Landfall Frequency and Associated Damage: Observations and Future Risks. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-17-0184.1. https://doi.org/10.1175/BAMS-D-17-0184.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Knutson, T., Camargo, S. J., Chan, J. C. L., Emanuel, K., Ho, C.-H., Kossin, J., et al. (2019). Tropical Cyclones and Climate Change Assessment: Part I: Detection and Attribution. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-18-0189.1. https://doi.org/10.1175/BAMS-D-18-0189.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Knutson, T., Camargo, S. J., Chan, J. C. L., Emanuel, K., Ho, C.-H., Kossin, J., et al. (2020). Tropical Cyclones and Climate Change Assessment: Part II: Projected Response to Anthropogenic Warming. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-18-0194.1. https://doi.org/10.1175/BAMS-D-18-0194.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Kopp, G., & Lean, J. L. (2011). A new, lower value of total solar irradiance: Evidence and climate significance. Geophysical Research Letters. doi:10.1029/2010GL045777. https://doi.org/10.1029/2010GL045777HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Kossin, J. P., Knapp, K. R., Olander, T. L., & Velden, C. S. (2020). Global increase in major tropical cyclone exceedance probability over the past four decades. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1920849117. https://doi.org/10.1073/pnas.1920849117HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Kueppers, L. M., Snyder, M. A., & Sloan, L. C. (2007). Irrigation cooling effect: Regional climate forcing by land‐use change. Geophysical Research Letters. doi:10.1029/2006GL028679. https://doi.org/10.1029/2006GL028679HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Köhler, P., Hauck, J., Völker, C., Wolf-Gladrow, D. A., Butzin, M., Halpern, J. B., et al. (2018). Comment on “ Scrutinizing the carbon cycle and CO 2 residence time in the atmosphere ” by H. Harde. Global and Planetary Change. doi:10.1016/j.gloplacha.2017.09.015. https://doi.org/10.1016/j.gloplacha.2017.09.015HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Lacis, A. A., Schmidt, G. A., Rind, D., & Ruedy, R. A. (2010). Atmospheric CO 2 : Principal Control Knob Governing Earth’s Temperature. Science. doi:10.1126/science.1190653. https://doi.org/10.1126/science.1190653HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Lenssen, N. J. L., Schmidt, G. A., Hansen, J. E., Menne, M. J., Persin, A., Ruedy, R., et al. (2019). Improvements in the GISTEMP Uncertainty Model. Journal of Geophysical Research: Atmospheres. doi:10.1029/2018JD029522. https://doi.org/10.1029/2018JD029522HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Lenssen, N., Schmidt, G. A., Hendrickson, M., Jacobs, P., Menne, M. J., & Ruedy, R. (2024). A NASA GISTEMPv4 Observational Uncertainty Ensemble. Journal of Geophysical Research: Atmospheres. doi:10.1029/2023JD040179. https://doi.org/10.1029/2023JD040179HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Levin, I., Naegler, T., Kromer, B., Diehl, M., Francey, R. J., Gomez-Pelaez, A. J., et al. (2010). Observations and modelling of the global distribution and long-term trend of atmospheric <sup>14</sup>CO<sub>2</sub>. Tellus B: Chemical and Physical Meteorology. doi:10.1111/j.1600-0889.2009.00446.x. https://doi.org/10.1111/j.1600-0889.2009.00446.xHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Levitus, S., Antonov, J. I., Boyer, T. P., Baranova, O. K., Garcia, H. E., Locarnini, R. A., et al. (2012). World ocean heat content and thermosteric sea level change (0–2000 m), 1955–2010. Geophysical Research Letters. doi:10.1029/2012GL051106. https://doi.org/10.1029/2012GL051106HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Lewis, N., & Curry, J. (2018). The Impact of Recent Forcing and Ocean Heat Uptake Data on Estimates of Climate Sensitivity. Journal of Climate. doi:10.1175/JCLI-D-17-0667.1. https://doi.org/10.1175/JCLI-D-17-0667.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Lindzen, R. S., & Choi, Y.-S. (2011). On the observational determination of climate sensitivity and its implications. Asia-Pacific Journal of Atmospheric Sciences. doi:10.1007/s13143-011-0023-x. https://doi.org/10.1007/s13143-011-0023-xHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Livneh, B., Bohn, T. J., Pierce, D. W., Munoz-Arriola, F., Nijssen, B., Vose, R., et al. (2015). A spatially comprehensive, hydrometeorological data set for Mexico, the U.S., and Southern Canada 1950–2013. Scientific Data. doi:10.1038/sdata.2015.42. https://doi.org/10.1038/sdata.2015.42HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Lockwood, M., & Fröhlich, C. (2007). Recent oppositely directed trends in solar climate forcings and the global mean surface air temperature. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences. doi:10.1098/rspa.2007.1880. https://doi.org/10.1098/rspa.2007.1880HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Loeb, N. G., Ham, S.-H., Allan, R. P., Thorsen, T. J., Meyssignac, B., Kato, S., et al. (2024). Observational Assessment of Changes in Earth’s Energy Imbalance Since 2000. Surveys in Geophysics. doi:10.1007/s10712-024-09838-8. https://doi.org/10.1007/s10712-024-09838-8HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Loeb, N. G., Johnson, G. C., Thorsen, T. J., Lyman, J. M., Rose, F. G., & Kato, S. (2021). Satellite and Ocean Data Reveal Marked Increase in Earth’s Heating Rate. Geophysical Research Letters. doi:10.1029/2021GL093047. https://doi.org/10.1029/2021GL093047HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Lynas, M., Houlton, B. Z., & Perry, S. (2021). Greater than 99% consensus on human caused climate change in the peer-reviewed scientific literature. Environmental Research Letters. doi:10.1088/1748-9326/ac2966. https://doi.org/10.1088/1748-9326/ac2966HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Lüthi, D., Le Floch, M., Bereiter, B., Blunier, T., Barnola, J.-M., Siegenthaler, U., et al. (2008). High-resolution carbon dioxide concentration record 650,000–800,000 years before present. Nature. doi:10.1038/nature06949. https://doi.org/10.1038/nature06949HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
MacFarling Meure, C., Etheridge, D., Trudinger, C., Steele, P., Langenfelds, R., van Ommen, T., et al. (2006). Law Dome CO 2 , CH 4 and N 2 O ice core records extended to 2000 years BP. Geophysical Research Letters. doi:10.1029/2006GL026152. https://doi.org/10.1029/2006GL026152HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Manning, A. C., & Keeling, R. F. (2006). Global oceanic and land biotic carbon sinks from the Scripps atmospheric oxygen flask sampling network. Tellus B: Chemical and Physical Meteorology. doi:10.1111/j.1600-0889.2006.00175.x. https://doi.org/10.1111/j.1600-0889.2006.00175.xHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Mauritsen, T., Tsushima, Y., Meyssignac, B., Loeb, N. G., Hakuba, M., Pilewskie, P., et al. (2025). Earth's Energy Imbalance More Than Doubled in Recent Decades. AGU Advances. doi:10.1029/2024AV001636. https://doi.org/10.1029/2024AV001636HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
McKitrick, R., & Christy, J. (2018). A Test of the Tropical 200‐ to 300‐hPa Warming Rate in Climate Models. Earth and Space Science. doi:10.1029/2018EA000401. https://doi.org/10.1029/2018EA000401HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Mears, C. A., & Wentz, F. J. (2017). A Satellite-Derived Lower-Tropospheric Atmospheric Temperature Dataset Using an Optimized Adjustment for Diurnal Effects. Journal of Climate. doi:10.1175/JCLI-D-16-0768.1. https://doi.org/10.1175/JCLI-D-16-0768.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Medhaug, I., Stolpe, M. B., Fischer, E. M., & Knutti, R. (2017). Reconciling controversies about the ‘global warming hiatus’. Nature. doi:10.1038/nature22315. https://doi.org/10.1038/nature22315HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Menne, M. J., & Williams, C. N. (2009). Homogenization of Temperature Series via Pairwise Comparisons. Journal of Climate. doi:10.1175/2008JCLI2263.1. https://doi.org/10.1175/2008JCLI2263.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Menne, M. J., Durre, I., Korzeniewski, B., McNeill, S., Thomas, K., Yin, X., et al. (2012). Global Historical Climatology Network - Daily (GHCN-Daily), Version 3. NOAA National Centers for Environmental Information. doi:10.7289/V5D21VHZ. https://doi.org/10.7289/V5D21VHZHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Menne, M. J., Durre, I., Vose, R. S., Gleason, B. E., & Houston, T. G. (2012). An Overview of the Global Historical Climatology Network-Daily Database. Journal of Atmospheric and Oceanic Technology. doi:10.1175/JTECH-D-11-00103.1. https://doi.org/10.1175/JTECH-D-11-00103.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Menne, M. J., Williams, C. N., Gleason, B. E., Rennie, J. J., & Lawrimore, J. H. (2018). The Global Historical Climatology Network Monthly Temperature Dataset, Version 4. Journal of Climate. doi:10.1175/JCLI-D-18-0094.1. https://doi.org/10.1175/JCLI-D-18-0094.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Morice, C. P., Kennedy, J. J., Rayner, N. A., Winn, J. P., Hogan, E., Killick, R. E., et al. (2021). An Updated Assessment of Near‐Surface Temperature Change From 1850: The HadCRUT5 Data Set. Journal of Geophysical Research: Atmospheres. doi:10.1029/2019JD032361. https://doi.org/10.1029/2019JD032361HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Mote, P. W., Li, S., Lettenmaier, D. P., Xiao, M., & Engel, R. (2018). Dramatic declines in snowpack in the western US. npj Climate and Atmospheric Science. doi:10.1038/s41612-018-0012-1. https://doi.org/10.1038/s41612-018-0012-1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Myers, K. F., Doran, P. T., Cook, J., Kotcher, J. E., & Myers, T. A. (2021). Consensus revisited: quantifying scientific agreement on climate change and climate expertise among Earth scientists 10 years later. Environmental Research Letters. doi:10.1088/1748-9326/ac2774. https://doi.org/10.1088/1748-9326/ac2774HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Myers, S. S., Zanobetti, A., Kloog, I., Huybers, P., Leakey, A. D. B., Bloom, A. J., et al. (2014). Increasing CO2 threatens human nutrition. Nature. doi:10.1038/nature13179. https://doi.org/10.1038/nature13179HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Myhre, G., Highwood, E. J., Shine, K. P., & Stordal, F. (1998). New estimates of radiative forcing due to well mixed greenhouse gases. Geophysical Research Letters. doi:10.1029/98GL01908. https://doi.org/10.1029/98GL01908HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Nerem, R. S., Beckley, B. D., Fasullo, J. T., Hamlington, B. D., Masters, D., & Mitchum, G. T. (2018). Climate-change–driven accelerated sea-level rise detected in the altimeter era. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1717312115. https://doi.org/10.1073/pnas.1717312115HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Neukom, R., Steiger, N., Gómez-Navarro, J. J., Wang, J., & Werner, J. P. (2019). No evidence for globally coherent warm and cold periods over the preindustrial Common Era. Nature. doi:10.1038/s41586-019-1401-2. https://doi.org/10.1038/s41586-019-1401-2HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Ortiz-Bobea, A., Ault, T. R., Carrillo, C. M., Chambers, R. G., & Lobell, D. B. (2021). Anthropogenic climate change has slowed global agricultural productivity growth. Nature Climate Change. doi:10.1038/s41558-021-01000-1. https://doi.org/10.1038/s41558-021-01000-1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Osman, M. B., Tierney, J. E., Zhu, J., Tardif, R., Hakim, G. J., King, J., et al. (2021). Globally resolved surface temperatures since the Last Glacial Maximum. Nature. doi:10.1038/s41586-021-03984-4. https://doi.org/10.1038/s41586-021-03984-4HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Otosaka, I. N., Shepherd, A., Ivins, E. R., Schlegel, N.-J., Amory, C., van den Broeke, M. R., et al. (2023). Mass balance of the Greenland and Antarctic ice sheets from 1992 to 2020. Earth System Science Data. doi:10.5194/essd-15-1597-2023. https://doi.org/10.5194/essd-15-1597-2023HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
PAGES 2k Consortium, Neukom, R., Barboza, L. A., Erb, M. P., Shi, F., Emile-Geay, J., et al. (2019). Consistent multidecadal variability in global temperature reconstructions and simulations over the Common Era. Nature Geoscience. doi:10.1038/s41561-019-0400-0. https://doi.org/10.1038/s41561-019-0400-0HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Pan, Y., Cheng, L., Abraham, J., Trenberth, K. E., Reagan, J., Du, J., et al. (2026). Ocean Heat Content Sets Another Record in 2025. Advances in Atmospheric Sciences. doi:10.1007/s00376-026-5876-0. https://doi.org/10.1007/s00376-026-5876-0HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Parkinson, C. L. (2019). A 40-y record reveals gradual Antarctic sea ice increases followed by decreases at rates far exceeding the rates seen in the Arctic. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1906556116. https://doi.org/10.1073/pnas.1906556116HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Parrenin, F., Masson-Delmotte, V., Köhler, P., Raynaud, D., Paillard, D., Schwander, J., et al. (2013). Synchronous Change of Atmospheric CO 2 and Antarctic Temperature During the Last Deglacial Warming. Science. doi:10.1126/science.1226368. https://doi.org/10.1126/science.1226368HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Peterson, T. C., Connolley, W. M., & Fleck, J. (2008). THE MYTH OF THE 1970s GLOBAL COOLING SCIENTIFIC CONSENSUS. Bulletin of the American Meteorological Society. doi:10.1175/2008BAMS2370.1. https://doi.org/10.1175/2008BAMS2370.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Philip, S., Kew, S., van Oldenborgh, G. J., Otto, F., Vautard, R., van der Wiel, K., et al. (2020). A protocol for probabilistic extreme event attribution analyses. Advances in Statistical Climatology, Meteorology and Oceanography. doi:10.5194/ascmo-6-177-2020. https://doi.org/10.5194/ascmo-6-177-2020HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Piao, S., Wang, X., Park, T., Chen, C., Lian, X., He, Y., et al. (2019). Characteristics, drivers and feedbacks of global greening. Nature Reviews Earth & Environment. doi:10.1038/s43017-019-0001-x. https://doi.org/10.1038/s43017-019-0001-xHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Pierce, J. R., & Adams, P. J. (2009). Can cosmic rays affect cloud condensation nuclei by altering new particle formation rates?. Geophysical Research Letters. doi:10.1029/2009GL037946. https://doi.org/10.1029/2009GL037946HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Rantanen, M., Karpechko, A. Y., Lipponen, A., Nordling, K., Hyvärinen, O., Ruosteenoja, K., et al. (2022). The Arctic has warmed nearly four times faster than the globe since 1979. Communications Earth & Environment. doi:10.1038/s43247-022-00498-3. https://doi.org/10.1038/s43247-022-00498-3HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Revelle, R., & Suess, H. E. (1957). Carbon Dioxide Exchange Between Atmosphere and Ocean and the Question of an Increase of Atmospheric CO<sub>2</sub> during the Past Decades. Tellus A: Dynamic Meteorology and Oceanography. doi:10.3402/tellusa.v9i1.9075. https://doi.org/10.3402/tellusa.v9i1.9075HTTP 200, verified doi-registered+metadata+title, checked 2026-09-15
Richardson, M. T., & Benestad, R. E. (2022). Erroneous use of Statistics behind Claims of a Major Solar Role in Recent Warming. Research in Astronomy and Astrophysics. doi:10.1088/1674-4527/ac981c. https://doi.org/10.1088/1674-4527/ac981cHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Santer, B. D., Fyfe, J. C., Pallotta, G., Flato, G. M., Meehl, G. A., England, M. H., et al. (2017). Causes of differences in model and satellite tropospheric warming rates. Nature Geoscience. doi:10.1038/ngeo2973. https://doi.org/10.1038/ngeo2973HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Santer, B. D., Painter, J. F., Bonfils, C., Mears, C. A., Solomon, S., Wigley, T. M. L., et al. (2013). Human and natural influences on the changing thermal structure of the atmosphere. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.1305332110. https://doi.org/10.1073/pnas.1305332110HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Santer, B. D., Po-Chedley, S., Zhao, L., Zou, C.-Z., Fu, Q., Solomon, S., et al. (2023). Exceptional stratospheric contribution to human fingerprints on atmospheric temperature. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.2300758120. https://doi.org/10.1073/pnas.2300758120HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Santer, B. D., Wigley, T. M. L., Boyle, J. S., Gaffen, D. J., Hnilo, J. J., Nychka, D., et al. (2000). Statistical significance of trends and trend differences in layer‐average atmospheric temperature time series. Journal of Geophysical Research: Atmospheres. doi:10.1029/1999JD901105. https://doi.org/10.1029/1999JD901105HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Schmidt, G. A., Ruedy, R. A., Miller, R. L., & Lacis, A. A. (2010). Attribution of the present‐day total greenhouse effect. Journal of Geophysical Research: Atmospheres. doi:10.1029/2010JD014287. https://doi.org/10.1029/2010JD014287HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Seager, R., Cane, M., Henderson, N., Lee, D.-E., Abernathey, R., & Zhang, H. (2019). Strengthening tropical Pacific zonal sea surface temperature gradient consistent with rising greenhouse gases. Nature Climate Change. doi:10.1038/s41558-019-0505-x. https://doi.org/10.1038/s41558-019-0505-xHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Shakun, J. D., Clark, P. U., He, F., Marcott, S. A., Mix, A. C., Liu, Z., et al. (2012). Global warming preceded by increasing carbon dioxide concentrations during the last deglaciation. Nature. doi:10.1038/nature10915. https://doi.org/10.1038/nature10915HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Sheffield, J., Wood, E. F., & Roderick, M. L. (2012). Little change in global drought over the past 60 years. Nature. doi:10.1038/nature11575. https://doi.org/10.1038/nature11575HTTP 200, verified doi-registered+metadata+title, checked 2026-10-06
Sherwood, S. C., Webb, M. J., Annan, J. D., Armour, K. C., Forster, P. M., Hargreaves, J. C., et al. (2020). An Assessment of Earth's Climate Sensitivity Using Multiple Lines of Evidence. Reviews of Geophysics. doi:10.1029/2019RG000678. https://doi.org/10.1029/2019RG000678HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Smith, C., Walsh, T., Gillett, N., Hauser, M., Krummel, P., Lamb, W., et al. (2025). Indicators of Global Climate Change 2024. Zenodo. doi:10.5281/zenodo.15639576. https://doi.org/10.5281/zenodo.15639576HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Spencer, R. W., Christy, J. R., & Braswell, W. D. (2017). UAH Version 6 global satellite temperature products: Methodology and results. Asia-Pacific Journal of Atmospheric Sciences. doi:10.1007/s13143-017-0010-y. https://doi.org/10.1007/s13143-017-0010-yHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Svensmark, H., & Friis-Christensen, E. (1997). Variation of cosmic ray flux and global cloud coverage—a missing link in solar-climate relationships. Journal of Atmospheric and Solar-Terrestrial Physics. doi:10.1016/S1364-6826(97)00001-1. https://doi.org/10.1016/S1364-6826(97)00001-1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Swain, D. L., Langenbrunner, B., Neelin, J. D., & Hall, A. (2018). Increasing precipitation volatility in twenty-first-century California. Nature Climate Change. doi:10.1038/s41558-018-0140-y. https://doi.org/10.1038/s41558-018-0140-yHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Swain, D. L., Prein, A. F., Abatzoglou, J. T., Albano, C. M., Brunner, M., Diffenbaugh, N. S., et al. (2025). Hydroclimate volatility on a warming Earth. Nature Reviews Earth & Environment. doi:10.1038/s43017-024-00624-z. https://doi.org/10.1038/s43017-024-00624-zHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Thoning, K. W., Tans, P. P., & Komhyr, W. D. (1989). Atmospheric carbon dioxide at Mauna Loa Observatory: 2. Analysis of the NOAA GMCC data, 1974–1985. Journal of Geophysical Research: Atmospheres. doi:10.1029/JD094iD06p08549. https://doi.org/10.1029/JD094iD06p08549HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Tierney, J. E., Zhu, J., King, J., Malevich, S. B., Hakim, G. J., & Poulsen, C. J. (2020). Glacial cooling and climate sensitivity revisited. Nature. doi:10.1038/s41586-020-2617-x. https://doi.org/10.1038/s41586-020-2617-xHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Trenberth, K. E., Dai, A., van der Schrier, G., Jones, P. D., Barichivich, J., Briffa, K. R., et al. (2013). Global warming and changes in drought. Nature Climate Change. doi:10.1038/nclimate2067. https://doi.org/10.1038/nclimate2067HTTP 200, verified doi-registered+metadata+title, checked 2026-10-06
Turco, M., Abatzoglou, J. T., Herrera, S., Zhuang, Y., Jerez, S., Lucas, D. D., et al. (2023). Anthropogenic climate change impacts exacerbate summer forest fires in California. Proceedings of the National Academy of Sciences. doi:10.1073/pnas.2213815120. https://doi.org/10.1073/pnas.2213815120HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Tyndall, J. (1861). I. The Bakerian Lecture.—On the absorption and radiation of heat by gases and vapours, and on the physical connexion of radiation, absorption, and conduction. Philosophical Transactions of the Royal Society of London. doi:10.1098/rstl.1861.0001. https://doi.org/10.1098/rstl.1861.0001HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
van der Ent, R. J., & Tuinenburg, O. A. (2017). The residence time of water in the atmosphere revisited. Hydrology and Earth System Sciences. doi:10.5194/hess-21-779-2017. https://doi.org/10.5194/hess-21-779-2017HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Vecchi, G. A., & Knutson, T. R. (2008). On Estimates of Historical North Atlantic Tropical Cyclone Activity*. Journal of Climate. doi:10.1175/2008JCLI2178.1. https://doi.org/10.1175/2008JCLI2178.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Vecchi, G. A., Landsea, C., Zhang, W., Villarini, G., & Knutson, T. (2021). Changes in Atlantic major hurricane frequency since the late-19th century. Nature Communications. doi:10.1038/s41467-021-24268-5. https://doi.org/10.1038/s41467-021-24268-5HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
von Schuckmann, K., Minière, A., Gues, F., Cuesta-Valero, F. J., Kirchengast, G., Adusumilli, S., et al. (2023). Heat stored in the Earth system 1960–2020: where does the energy go?. Earth System Science Data. doi:10.5194/essd-15-1675-2023. https://doi.org/10.5194/essd-15-1675-2023HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Vose, R. S., Applequist, S., Squires, M., Durre, I., Menne, M. J., Williams, C. N., et al. (2014). Improved Historical Temperature and Precipitation Time Series for U.S. Climate Divisions. Journal of Applied Meteorology and Climatology. doi:10.1175/JAMC-D-13-0248.1. https://doi.org/10.1175/JAMC-D-13-0248.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Vose, R. S., Easterling, D. R., & Gleason, B. (2005). Maximum and minimum temperature trends for the globe: An update through 2004. Geophysical Research Letters. doi:10.1029/2005GL024379. https://doi.org/10.1029/2005GL024379HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Vose, R. S., Huang, B., Yin, X., Arndt, D., Easterling, D. R., Lawrimore, J. H., et al. (2021). Implementing Full Spatial Coverage in NOAA’s Global Temperature Analysis. Geophysical Research Letters. doi:10.1029/2020GL090873. https://doi.org/10.1029/2020GL090873HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Vose, R., Applequist, S., Squires, M., Durre, I., Menne, M. J., Williams, C. N., et al. (2015). NOAA Monthly U.S. Climate Gridded Dataset (NClimGrid). NOAA National Centers for Environmental Information. doi:10.7289/V5SX6B56. https://doi.org/10.7289/V5SX6B56HTTP 503, verified doi-registered+metadata+title, checked 2026-09-13
Weinkle, J., Landsea, C., Collins, D., Musulin, R., Crompton, R. P., Klotzbach, P. J., et al. (2018). Normalized hurricane damage in the continental United States 1900–2017. Nature Sustainability. doi:10.1038/s41893-018-0165-2. https://doi.org/10.1038/s41893-018-0165-2HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Williams, A. P., Abatzoglou, J. T., Gershunov, A., Guzman‐Morales, J., Bishop, D. A., Balch, J. K., et al. (2019). Observed Impacts of Anthropogenic Climate Change on Wildfire in California. Earth's Future. doi:10.1029/2019EF001210. https://doi.org/10.1029/2019EF001210HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Williams, A. P., Cook, B. I., & Smerdon, J. E. (2022). Rapid intensification of the emerging southwestern North American megadrought in 2020–2021. Nature Climate Change. doi:10.1038/s41558-022-01290-z. https://doi.org/10.1038/s41558-022-01290-zHTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Williams, A. P., Cook, E. R., Smerdon, J. E., Cook, B. I., Abatzoglou, J. T., Bolles, K., et al. (2020). Large contribution from anthropogenic warming to an emerging North American megadrought. Science. doi:10.1126/science.aaz9600. https://doi.org/10.1126/science.aaz9600HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Williams, A. P., Seager, R., Abatzoglou, J. T., Cook, B. I., Smerdon, J. E., & Cook, E. R. (2015). Contribution of anthropogenic warming to California drought during 2012–2014. Geophysical Research Letters. doi:10.1002/2015GL064924. https://doi.org/10.1002/2015GL064924HTTP 403, verified doi-registered+metadata+title, checked 2026-09-19
Yin, X., Huang, B., Menne, M., Vose, R., Zhang, H.-M., Adeyeye, A., et al. (2024). NOAAGlobalTemp Version 6: An AI-Based Global Surface Temperature Dataset. Bulletin of the American Meteorological Society. doi:10.1175/BAMS-D-24-0012.1. https://doi.org/10.1175/BAMS-D-24-0012.1HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Yuan, W., Zheng, Y., Piao, S., Ciais, P., Lombardozzi, D., Wang, Y., et al. (2019). Increased atmospheric vapor pressure deficit reduces global vegetation growth. Science Advances. doi:10.1126/sciadv.aax1396. https://doi.org/10.1126/sciadv.aax1396HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Zelinka, M. D., Myers, T. A., McCoy, D. T., Po‐Chedley, S., Caldwell, P. M., Ceppi, P., et al. (2020). Causes of Higher Climate Sensitivity in CMIP6 Models. Geophysical Research Letters. doi:10.1029/2019GL085782. https://doi.org/10.1029/2019GL085782HTTP 403, verified doi-registered+metadata+title, checked 2026-09-13
Zemp, M., Huss, M., Thibert, E., Eckert, N., McNabb, R., Huber, J., et al. (2019). Global glacier mass changes and their contributions to sea-level rise from 1961 to 2016. Nature. doi:10.1038/s41586-019-1071-0. https://doi.org/10.1038/s41586-019-1071-0HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Zhu, Z., Piao, S., Myneni, R. B., Huang, M., Zeng, Z., Canadell, J. G., et al. (2016). Greening of the Earth and its drivers. Nature Climate Change. doi:10.1038/nclimate3004. https://doi.org/10.1038/nclimate3004HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
Zwally, H. J., Li, J., Robbins, J. W., Saba, J. L., Yi, D., & Brenner, A. C. (2015). Mass gains of the Antarctic ice sheet exceed losses. Journal of Glaciology. doi:10.3189/2015JoG15J071. https://doi.org/10.3189/2015JoG15J071HTTP 200, verified doi-registered+metadata+title, checked 2026-09-13
. Data on CO2 and Greenhouse Gas Emissions by Our World in Data. https://github.com/owid/co2-dataHTTP 200, verified url-200, checked 2026-09-19
. Dependence of Earth's Thermal Radiation on Five Most Abundant Greenhouse Gases. https://arxiv.org/abs/2006.03098HTTP 200, verified url-200, checked 2026-09-15
. Government: The View from Washington, DC (The Discovery of Global Warming). https://history.aip.org/climate/Govt.htmHTTP 200, verified url-200, checked 2026-09-19
. Net Zero Tracker (Energy and Climate Intelligence Unit, Data-Driven EnviroLab, NewClimate Institute, Oxford Net Zero). https://zerotracker.net/HTTP 200, verified url-200, checked 2026-09-19
The range that would contain the estimated quantity in 95% of repetitions of the same procedure. On this page intervals are widened for autocorrelation; where an interval includes zero, the page says the analysis found no trend rather than reporting the central value alone.
Absorption band
A range of infrared wavelengths a gas absorbs strongly, fixed by the vibrations and rotations its molecules can take up. Carbon dioxide's main band lies near 15 µm, in the middle of the wavelengths a surface at Earth's temperature radiates, which is why a trace gas matters at all. A band is not a single wavelength but thousands of narrow lines, measured in the laboratory and tabulated Gordon et al. 2022. At the center of the band the lower atmosphere already absorbs nearly everything, so adding CO₂ changes little there; it acts at the band's edges, and it raises the altitude from which radiation finally escapes to space, where the air is colder and radiates less. Satellites see the same bands deepening between passes decades apart Harries et al. 2001.
Anomaly
A value expressed as a departure from a reference average rather than in absolute terms. Anomalies are used for temperature because they are far more coherent over distance than absolute readings: two stations 50 km apart can differ by several degrees in absolute temperature while their year-to-year anomalies move almost identically.
Argo
An array of autonomous profiling floats that drift, dive to 2,000 m and report temperature and salinity profiles. It reached near-global coverage in the mid-2000s and is why ocean heat content since then is far better constrained than before.
Autocorrelation and AR(1)
Consecutive years in a climate series are not independent: a warm year tends to follow a warm year. An AR(1) model treats each year as a fraction r₁ of the previous year plus noise; the effective sample size n(1−r₁)/(1+r₁) is what this page uses in place of the number of years when computing confidence intervals.
Baseline (reference period)
The period whose average an anomaly is measured against. Different providers use different baselines (1901–2000, 1951–1980, 1961–1990), so series must be re-baselined before being compared. Every chart here names its baseline.
Brown–Forsythe test
A test for equal variance between two samples that uses deviations from the median, making it robust to non-normal data. This page uses it for the pre-registered California precipitation variance test.
Carbon-14 (¹⁴C)
The radioactive isotope of carbon, with a half-life of about 5,700 years. It is made continuously in the upper atmosphere, where cosmic rays knock neutrons out of air molecules and those neutrons strike nitrogen-14, converting it to ¹⁴C; the new atoms oxidise to CO₂ and mix into the air, the ocean and everything living. Production and decay roughly balance, so the atmosphere holds a small steady trace. Anything cut off from that exchange loses its ¹⁴C by decay, which is what dates archaeological material, and what makes fossil fuels, buried for millions of years, contain none at all. Adding their carbon therefore dilutes atmospheric radiocarbon: the Suess effect. Atmospheric weapons testing in the 1950s and 1960s roughly doubled atmospheric ¹⁴C, so the dilution is read against that spike rather than against a flat background.
Change point and BIC
A change point is a year where the trend changes. Candidate models (one line, one break, two breaks) are compared with the Bayesian Information Criterion, which penalises extra parameters; a break is accepted here only if it improves BIC by at least 2, with autocorrelated errors.
Climate
The statistics of weather over a long period, conventionally thirty years, for a given place or for the planet: not only average temperature and rainfall but their spread, their seasonal shape and the frequency of extremes. Weather is a single draw; climate is the distribution drawn from. That distinction is why no individual hot day or cold snap establishes a change in climate, and why the evidence on this page is trends, distributions and intervals rather than events.
CMIP6
The sixth Coupled Model Intercomparison Project: the coordinated set of climate model experiments that AR6 assessed. A subset of CMIP6 models has climate sensitivity above the assessed range, which is why model output is not treated as observation anywhere on this page.
Core conclusion
Shorthand for the two claims this page's evidence chain supports, and the ones it equips you to attack: that the observed warming is real, and that the dominant cause of it since the mid-twentieth century is human emission of greenhouse gases. A reader attacking this conclusion should know which claim, or both, they are disputing. The eight links establish them in order, and what would overturn it states what evidence would break the conclusion rather than merely dent it.
Degree days
The sum over a year of how far each day's mean temperature sits below (heating degree days) or above (cooling degree days) a base temperature, here 65 °F. A standard proxy for heating and cooling energy demand.
Detection and attribution
Detection asks whether an observed change is larger than internal variability; attribution asks which combination of forcings best explains its pattern in space and time, usually by regressing observations on simulated response patterns.
Diurnal temperature range
The difference between the daily maximum and daily minimum temperature. A falling range (nights warming faster than days) was one of the early greenhouse fingerprints; a falling range is not visible in global land data since 1979.
Effective radiative forcing (ERF)
The change in Earth's net energy flux at the top of the atmosphere caused by an imposed change (more CO₂, more aerosols, a brighter Sun) after fast atmospheric adjustments but before the surface warms. Measured in watts per square meter (W m⁻²).
Effective sample size (n_eff)
How many genuinely independent observations a run of correlated ones is worth. Annual climate values are autocorrelated, because a warm year tends to follow a warm year, so twenty-one years do not carry twenty-one years of independent information about a mean or a trend. Using the lag-one correlation r₁, n_eff = n(1−r₁)/(1+r₁), and intervals on this page are widened accordingly. A small n_eff beside a wide interval is the honest reading: the record is long but repetitive. Where n_eff falls below ten, this page declines to claim a trend at all.
Equilibrium climate sensitivity (ECS)
The global mean surface warming that eventually results from doubling atmospheric CO₂, after the system has come back into energy balance. Distinct from the transient response, which is what you see while the forcing is still increasing.
Feedback
A process that responds to warming and then changes the warming: water vapor (amplifying), surface albedo as ice retreats (amplifying), the increase in emitted radiation with temperature (damping), and clouds (uncertain in magnitude and sign of the net effect).
Fingerprint
A pattern of change that distinguishes one cause from another rather than measuring the size of the change: stratospheric cooling with tropospheric warming, Arctic amplification, or the isotopic composition of added CO₂.
Forcing versus feedback
A forcing is imposed from outside the fast climate system (emissions, volcanic aerosols, solar changes); a feedback responds to the resulting temperature change. CO₂ is a forcing because its concentration is set by emissions and slow carbon-cycle processes; water vapor is a feedback because its concentration is set by temperature.
Fossil fuels
Coal, oil and natural gas: carbon that living things pulled out of the atmosphere and that was then buried for millions of years. Burning them returns it. Because of where that carbon has been, it arrives in the air carrying three marks that distinguish it from carbon released by volcanoes or by a warming ocean, so its contribution is measured rather than assumed. It is isotopically light, since photosynthesis takes up ¹²C in preference to ¹³C, so adding it lowers atmospheric δ¹³C. It holds no ¹⁴C, which decays away in far less time than the fuels have been buried, so adding it dilutes atmospheric radiocarbon, the Suess effect. And burning consumes oxygen in a fixed ratio to the carbon released, so atmospheric O₂ falls as CO₂ rises. All three are measured, and all three move the way burning fossil carbon would move them. The first two are plotted in Figure 4; the radiocarbon dilution is cited rather than computed here.
GHCN-Daily and GHCNm
The Global Historical Climatology Network archives: daily station observations (GHCN-Daily) and monthly means (GHCNm), the latter published in both unadjusted (qcu) and homogenized (qcf) form.
Homogenization
Detecting and removing non-climatic steps in a station record (relocations, instrument changes, changes in observation time), usually by comparing a station against its neighbors (the "pairwise" algorithm). Removing a step changes the trend, which is why the raw-versus-adjusted comparison in Figure 31 exists.
Industrial Revolution
In the IPCC's definition, “A period of rapid industrial growth with far-reaching social and economic consequences, beginning in Britain during the second half of the 18th century”, which “marks the beginning of a strong increase in the use of fossil fuels, initially coal”IPCC AR6 WG1 Glossary. The emissions record shows the steps. World fossil CO₂ emissions were about 9 million tonnes in 1750. During the second industrial revolution, usually dated 1870–1914 Joel Mokyr, they grew 6-fold, from 536 to 3,198 million tonnes a year, as oil and natural gas joined coal Our World in Data. The largest growth came later: 88% of all fossil CO₂ emitted since 1750 was emitted from 1950 onward, and 2024 emissions were 38,599 million tonnes. The "1700s" ice-core level this page compares against, 278 ppm, is the concentration before any of this.
LOWESS
Locally weighted regression: a smooth curve fitted from nearby points only, with no assumed functional form. Used on station charts to show the shape of a record without implying a linear trend.
Mauna Loa Observatory (MLO)
NOAA's atmospheric baseline observatory at about 3,400 m on the flank of Mauna Loa, Hawai'i, where Charles David Keeling began measuring atmospheric CO₂ continuously in March 1958, the longest direct record of the gas. Its altitude and mid-ocean position keep it above nearby vegetation and populated land, so its air is close to well-mixed background air, and readings carrying the volcano's own vented CO₂ are screened out by the standard selection procedure. The 2022 eruption cut power to the site and measurements continued from nearby Mauna Kea, which is the site flag carried in the processed monthly file. Background CO₂ here tracks the global average from NOAA's wider network.
nClimGrid
NOAA's 5 km gridded analysis of quality-controlled, homogenized US station data, and the source of every county and statewide series on this page. A gridded analysis is an interpolation of station observations, not an observation at a point.
Ocean heat content
The heat stored in a layer of the ocean relative to a reference, usually quoted for 0–700 m or 0–2,000 m in zettajoules. Ocean heat content is the closest thing to a direct measurement of Earth's energy imbalance, because most of the excess energy ends up there.
Per meg (O₂/N₂)
The unit for changes in the atmospheric oxygen-to-nitrogen ratio: one per meg is a change of one part per million in the ratio relative to a reference. The Scripps oxygen files state no conversion to ppm of O₂, so this page plots per meg and does not convert.
Poisson and quasi-Poisson regression
Regression for counts. The Poisson model assumes the variance equals the mean; when counts are more variable than that (over-dispersed), the quasi-Poisson version widens the intervals by the measured dispersion, which is what this page does for hot days and hurricane landfalls.
PRISM and Livneh
Gridded analyses of observed climate that interpolate station data using elevation and other predictors (PRISM) or produce a hydrology-oriented daily grid (Livneh). Both are interpolations of largely the same station network, so agreement between them is not independent confirmation.
Radiative forcing
An imposed change in Earth's energy budget, measured as a change in the net energy flow at the top of the atmosphere in watts per square meter (W m⁻²). Watts per square meter is power spread over an area, like a lightbulb's rating spread over a field. Positive means more energy arriving than leaving, so the planet must warm until outgoing radiation balances it again. More CO₂, a brighter Sun and volcanic aerosols are all forcings. Because Earth's surface is so large, a forcing of 1 W m⁻² over the whole planet is about 158 times the rate at which the United States uses energy U.S. Energy Information Administration. Two versions of the quantity are in use, and this page keeps them apart. **Radiative forcing** is measured at the tropopause after the stratosphere adjusts; NOAA's index is of that kind, and puts CO₂ alone at 2.33 W m⁻² relative to 1750 in 2024. **Effective radiative forcing** also lets the clouds and the rest of the atmosphere adjust, and is what assessments total across every human influence. The two are not interchangeable and are never differenced on this page. The figure for a given gas comes from line-by-line radiative transfer through measured absorption lines, not from a projection of the future, though computing it does require an assumed profile of temperature, humidity and cloud.
RAWS
Remote Automated Weather Stations, run for fire-weather forecasting. Often ridgetop, not sited or maintained to climate-reference standards, and not homogenized: usable for fire behavior, not for climate trends.
Snow water equivalent (SWE)
The depth of water you would get by melting the snowpack in place, which is the quantity that matters for water supply and what a snow course measures.
Solar cycle
The Sun's activity rises and falls over about eleven years, tracked by sunspot number and by total solar irradiance. Cycles are numbered consecutively from the first one recorded in the eighteenth century, and each runs from one sunspot minimum to the next: cycle 22 covers 1986–1996 here and cycle 24 covers 2008–2019. Irradiance swings within a cycle are larger than the difference between one cycle and the next, so this page compares whole-cycle means rather than single years.
Stefan–Boltzmann law
The power radiated per unit area by a body rises with the fourth power of its absolute temperature. Two consequences matter here. A body that is made colder radiates much less, which is why raising the altitude of the layer that emits to space, and so lowering its temperature, reduces the energy Earth loses. And the same steepness is what closes the gap again: a small rise in surface temperature increases emission enough to restore balance, which is why a forcing produces a bounded warming unless the feedbacks it sets off are strong enough to outrun it. On Earth they are not; on Venus, where water vapor became the feedback, they were.
Stratosphere
The layer above the troposphere, roughly 16–50 km, where temperature increases with height because ozone absorbs ultraviolet radiation. Satellite product TLS covers its lower part. Greenhouse forcing cools it; increased solar output warms it.
Suess effect
The dilution of atmospheric radiocarbon (¹⁴C) by fossil carbon, which is old enough that all of its ¹⁴C has decayed. Identified in 1955 and one of the four fingerprints of fossil-fuel CO₂.
Temperature anomaly
Each place's temperature written as its departure from its own long-term average over a stated baseline period, rather than as a reading in degrees. Every global temperature record on this page is built from these, for two reasons. They are comparable where readings are not: a valley and the ridge above it differ by several degrees in absolute temperature while their year-to-year departures move almost identically, so averaging departures across a region means something that averaging readings would not. And the change is far better determined than the level: the absolute global average is ambiguous by 0.6 °C between two defensible treatments of sea-ice regions, an offset that is nearly constant and so leaves both treatments with the same warming, while the four records' 1970–2024 trends differ by 0.014 °C per decade, about 0.08 °C accumulated over that period. An anomaly means nothing without the baseline it is measured from, which is why every anomaly chart here names one.
The four surface temperature records
HadCRUT5, built by the Met Office Hadley Center with the Climatic Research Unit at the University of East Anglia in the UK Morice et al. 2021; NOAAGlobalTemp, built by NOAA in the US Yin et al. 2024; GISTEMP v4, built by NASA's Goddard Institute for Space Studies Lenssen et al. 2024; and Berkeley Earth, built by an independent non-profit set up expressly to rebuild the record from raw station data Rohde & Hausfather 2020. Four groups, in two countries, under different funding and different management, using different station selections, different sea-surface datasets and different ways of estimating regions with no stations in them. The disagreements between them are real, technical and published: how to treat the poorly sampled Arctic, how to correct the shift from bucket to engine-intake ocean measurements, how much weight sparse early years can carry. Those choices are worth arguing about, and they move the numbers, which is why this page plots all four and shows the spread instead of averaging it away (Figure 1). What none of the four produces, whatever choices it makes, is a record without the warming in it.
ThreadEx
A product that threads a city's successive station records into one long series using a documented method. Useful for extremes; the splice points must be disclosed, because station moves leave steps.
Transient climate response (TCR)
The global mean warming at the time of CO₂ doubling under a steady 1% per year increase. TCR is the quantity most relevant to warming over the next several decades, and is better constrained than ECS.
Troposphere
The lowest layer of the atmosphere, where weather happens, extending to about 10–16 km. Satellite products for this layer are labeled TLT (lower troposphere), TMT (mid troposphere) and TTT (a combination that removes stratospheric influence).
USCRN and ClimDiv
USCRN is a US reference network built from 2000 onward at rural sites, with triple-redundant instruments, designed so that no homogenization is needed. ClimDiv is NOAA's operational homogenized network product. Comparing them tests the adjustments against a standard that does not use them.
Vapor pressure deficit (VPD)
The difference between how much moisture the air could hold and how much it does hold, which is the atmosphere's drying power. It rises steeply with temperature and is the mechanism linking warming to fuel dryness and plant water stress.
Water year
October through September, labeled by the calendar year it ends in. Used for precipitation in the western US because it keeps a single wet season in one accounting year.
Zettajoule (ZJ)
10²¹ joules. Two comparisons make the size concrete, and both are computed here from the named datasets. The United States used 0.102 ZJ of primary energy, from every source, in 2025U.S. Energy Information Administration. The upper 2,000 m of the ocean gained 440 ZJ between 1960 and 2025, about 4,330 years of US energy use, and over 2013–2025 it took up heat at about 136 times the rate the US uses energy. The same uptake equals the energy of about 7 Hiroshima bombs every second, or 601,000 a day, taking that bomb's yield as 15 kilotons of TNT U.S. Department of Energy. The comparison is of energy only: the heat is spread through the ocean, not released in bursts.
δ¹³C
The ratio of carbon-13 to carbon-12 in a sample, relative to a standard, in parts per thousand (‰). Photosynthesis discriminates against ¹³C, so plant-derived carbon, including fossil fuel, is isotopically light, and adding it lowers the atmosphere's δ¹³C.
Every processed table used by a chart on this page is below, in full, with the script that wrote it, the
baseline and method it records, and the SHA-256 of every raw file it was built from. With JavaScript
enabled each one also offers a download button; with JavaScript disabled the text is still here to read,
select and copy.
aggi_forcing.csv46 rows
Radiative forcing by long-lived greenhouse gases computed by NOAA from measured concentrations (AGGI).
Baseline: radiative forcing relative to 1750 (NOAA AGGI).
Method: see the script.
Written by scripts/process/ghg.py. Units: aggi_1990_1 (index), cfc_major (W m-2), ch4 (W m-2), change_pct (%), co2 (W m-2), co2eq_ppm (ppm), hcfc (W m-2), hfc_minor (W m-2), n2o (W m-2), total_wm2 (W m-2), year (year).
Built from: data/raw/noaa_gml/AGGI_Table.csvsha256 5ee37d48728dc131…
Arctic September sea-ice extent and area, NSIDC Sea Ice Index v4.0. Source dataset changes from NSIDC-0051 (to 2024) to NSIDC-0803 (2025).
Baseline: not applicable.
Method: see the script.
Written by scripts/process/sealevel_ice.py. Units: area (million km2), extent (million km2), source_dataset (id), year (year).
Built from: data/raw/nsidc/N_09_extent_v4.0.csvsha256 bdeb4dea8b52f6dc…
IPCC AR6 WG1 Figure SPM.1b data: observed global surface temperature change and CMIP6 simulations with human and natural forcings or natural forcings only (ranges as published: 5–95% over the ensemble). Model values end in 2019; observations in 2020.
Baseline: 1850-1900 (AR6).
Method: see the script.
Written by scripts/process/attribution_models.py. Units: human_and_natural (degC), human_and_natural_high (degC), human_and_natural_low (degC), natural_only (degC), natural_only_high (degC), natural_only_low (degC), observed (degC), year (year).
Built from: data/raw/ar6_spm1/panel_b_gmst_changes_model_and_obs.csvsha256 04c31c43094f1221…
Berkeley Earth global land TMAX and TMIN anomalies and their difference (diurnal range anomaly).
Baseline: Jan 1951-Dec 1980 (Berkeley Earth).
Method: see the script.
Written by scripts/process/global_temp.py. Units: dtr (degC), tmax (degC), tmin (degC), year (year).
Built from: data/raw/berkeley/Complete_TMAX_summary.txtsha256 40be15068cf079cb… data/raw/berkeley/Complete_TMIN_summary.txtsha256 9e7dfd9b36701a55…
California area burned per year in CAL FIRE's fire perimeter database (all agencies), 1950–2025, with statewide April–October Tmax anomaly. CAL FIRE warns the perimeter database should be used carefully for statistics (missing perimeters, lost records, minimum-size cutoffs, duplicates). Fire is multi-causal: ignitions (mostly human), fuels and suppression history, wind events and development all matter alongside warming.
Baseline: Tmax anomaly vs 1901–2000.
Method: see the script.
Written by scripts/process/hydro_fire_snow.py. Units: acres (acres), fires_mapped (count), tmax_apr_oct_anomaly_f (degF), year (year).
Built from: data/raw/calfire_frap/acres_by_year.jsonsha256 14e042a57a20cc43… data/raw/calfire_frap/layer_metadata.jsonsha256 1ed42c91954cd7d4… data/processed/california_warm_season_tmax.csva processed table; see its own entry
Water-year (October–September) precipitation for each of California's seven climate divisions, as published by NOAA. Division names are NOAA's. They are ordered north to south in the trend table so that a north–south gradient, if there were one, would read as one.
Baseline: not applicable: totals, not anomalies.
Method: Values as published. The year is the calendar year the water year ends in, which is how Climate at a Glance keys them..
Written by scripts/process/california_drought.py. Units: division (division number), division_name (name), precip_in (inches), year (year).
OLS trend in water-year precipitation for each California climate division, with AR(1)-adjusted 95% intervals, expressed as a percent of that division's own long-term mean so that divisions of very different wetness compare. Rows are ordered north to south, not by division number. A trend whose interval includes zero is plotted but never quoted as a trend. Seven divisions means seven variance tests, so about one in three runs of this set would produce a p below 0.05 by chance alone. Every division's p is reported here and on the page; none is selected for being small.
Baseline: not applicable (trends).
Method: OLS on water-year totals; interval widened by the AR(1) effective sample size. `excludes_zero` is the test this page uses for claiming a trend at all. `bf_p` is the Brown–Forsythe test for equal spread, 1896–1960 against 1961–2025, the same pre-registered split the statewide series uses..
Written by scripts/process/california_drought.py. Units: bf_p (p-value), ci_high_pct (% of division mean per decade), ci_low_pct (% of division mean per decade), division (division number), division_name (name), excludes_zero (boolean), first_year (year), last_year (year), mean_in (inches), n_eff (count), sd_early_in (inches), sd_late_in (inches), trend_pct_per_decade (% of division mean per decade).
California statewide Palmer drought indices summarised by calendar year, with the drought flag each figure uses. The three indices are not independent: one water-balance model, one set of precipitation and temperature inputs, three different time-integrations of its output. Agreement between them is not corroboration. NOAA states the category boundaries for PDSI and PHDI. The same -2.0 line is applied to the Z-Index here for comparability, which is a choice made in this repository and not a NOAA category. annual_mean is carried so a reader can apply a different rule — comparing the year's mean index with the threshold instead of counting months — without refetching anything. That rule returns no Z-Index drought years at all, which is why it is not the rule used here.
Baseline: not applicable: the Palmer indices are calibrated by NOAA on 1931–1990 and are published as index values, not as anomalies against a baseline chosen here.
Method: For each year and index, the number of its twelve months at or below -2.0 — NOAA's own boundary for moderate drought — and the year's mean index value. A year is flagged as a drought year for that index when at least 6 of its months are at or below that line. Years without all twelve months are dropped..
Written by scripts/process/california_drought.py. Units: annual_mean (index value), drought_year (boolean), index (index id), kind (drought type), months_at_or_below_threshold (months), year (year).
Built from: data/raw/noaa_cag/CA_pdsi_monthly_1895-2026.csvsha256 f293957d2aecbeef… data/raw/noaa_cag/CA_phdi_monthly_1895-2026.csvsha256 4ed9d93acae48fac… data/raw/noaa_cag/CA_zndx_monthly_1895-2026.csvsha256 4b8532fb1fca10d7…
California statewide mean temperature for each calendar month (nClimGrid via Climate at a Glance), with December–February and June–August means. The first year has no DJF value because it has no preceding December. Values are absolute monthly means as published, not anomalies, except where a column says anomaly.
Baseline: anomaly columns vs 1901–2000.
Method: DJF uses the previous calendar year's December; anomalies are against the same months' 1901–2000 mean..
Written by scripts/process/seasonality.py. Units: m01 (degF), m02 (degF), m03 (degF), m04 (degF), m05 (degF), m06 (degF), m07 (degF), m08 (degF), m09 (degF), m10 (degF), m11 (degF), m12 (degF), summer_anomaly_f (degF), summer_jja_f (degF), winter_anomaly_f (degF), winter_djf_f (degF), year (year).
Per-calendar-month OLS trend in California statewide mean temperature, 1970–2025, with AR(1)-adjusted 95% intervals. A month whose `claimed` is false is plotted with its interval but never quoted in prose.
Baseline: not applicable (trends).
Method: OLS on annual values for that month; interval widened by the AR(1) effective sample size. `claimed` is false where n_eff falls below that minimum, and those trends are not registered as numbers..
Written by scripts/process/seasonality.py. Units: ci_high_f (degF/decade), ci_low_f (degF/decade), claimed (boolean), month (month number), month_name (name), n_eff (count), trend_f_per_decade (degF/decade).
California statewide October–September precipitation with trailing 30-year standard deviation, mean and coefficient of variation (descriptive).
Baseline: not applicable.
Method: Rolling window = the 30 water years ending in the row's year..
Written by scripts/process/us_ca.py. Units: pcp_in (inches), rolling30_cv (dimensionless), rolling30_mean_in (inches), rolling30_sd_in (inches), year (year (water year ending September)).
Built from: data/raw/noaa_cag/CA_pcp_oct-sep_1896-2025.csvsha256 ce5570ce256a0857…
California statewide annual mean temperature (nClimGrid) with anomaly and fitted OLS trend. NCEI publishes no uncertainty estimate for statewide values; the trend CI (numbers registry) is statistical, not measurement uncertainty.
Baseline: 1901-2000 for anomalies.
Method: OLS trend line over 1895–2025..
Written by scripts/process/us_ca.py. Units: anomaly_c (degC), anomaly_f (degF), tavg_f (degF), trend_f (degF), year (year).
Built from: data/raw/noaa_cag/CA_tavg_ann_1895-2025.csvsha256 58fd103b3891d6c3…
The ten warmest complete years in California's statewide nClimGrid record, 1895–2025.
Baseline: 1901-2000 for anomaly_f.
Method: see the script.
Written by scripts/process/us_ca.py. Units: anomaly_f (degF), rank (rank), tavg_f (degF), year (year).
Built from: data/raw/noaa_cag/CA_tavg_ann_1895-2025.csvsha256 58fd103b3891d6c3…
California statewide April–October mean maximum temperature (nClimGrid), the fire-season heat index available from NCEI. This is temperature, not vapor pressure deficit or fuel aridity; no VPD series was obtained from a primary source in this build.
Baseline: 1901-2000 for anomaly.
Method: see the script.
Written by scripts/process/us_ca.py. Units: anomaly_f (degF), tmax_apr_oct_f (degF), year (year).
Built from: data/raw/noaa_cag/CA_tmax_apr-oct_1895-2025.csvsha256 3b155b8e856211f7…
World CO₂ emissions by source, from the Global Carbon Budget as republished by Our World in Data: coal, oil, gas, industry (cement, flaring and other), and land-use change. Land-use change estimates start in 1850, so the table starts there. Industry is cement production, gas flaring and other industrial processes; the fuel components are checked to add up to the fossil total within 1% every year.
Baseline: not applicable (annual emissions).
Method: Million tonnes converted to billion tonnes (Gt). `stack_*` columns are running sums in the plotted order, for drawing the stacked areas..
Written by scripts/process/carbon_sources.py. Units: coal (GtCO2/yr), fossil (GtCO2/yr), gas (GtCO2/yr), industry (GtCO2/yr), land_use (GtCO2/yr), oil (GtCO2/yr), stack_coal (GtCO2/yr), stack_gas (GtCO2/yr), stack_industry (GtCO2/yr), stack_land_use (GtCO2/yr), stack_oil (GtCO2/yr), total (GtCO2/yr), year (year).
Built from: data/raw/owid/owid-co2-data.csvsha256 7f78e2b218ce4bb8…
Antarctic composite ice-core CO₂, 805,669 BP to 2001 CE (Bereiter et al. 2015 compilation). Gas-age resolution ranges from decades in the youngest (Law Dome) section to centuries in the oldest (Dome C). Samples from 1850 CE onward overlap the instrumental record and are excluded from the pre-industrial range.
Baseline: not applicable.
Method: see the script.
Written by scripts/process/ghg.py. Units: age_gas_calBP (years before 1950), co2_1s_ppm (ppm (1 sigma)), co2_ppm (ppm), pre_1850 (boolean), year_ce (year CE).
Built from: data/raw/ncei_paleo/antarctica2015co2composite.txtsha256 de57b3967758725b…
The 10 largest national emitters of fossil and industry CO₂ in 2024, with each one's peak year and how far its latest emissions sit below that peak. Territorial emissions: CO₂ emitted inside the country, not the emissions embodied in what it imports. Land-use change is not included in these national figures.
Baseline: each country's own peak year.
Method: Countries only (regional and income aggregates excluded). `well_below_peak` is at least 10% below the country's own maximum..
Written by scripts/process/carbon_sources.py. Units: co2_latest_mt (MtCO2/yr), co2_peak_mt (MtCO2/yr), country (name), pct_below_peak (%), peak_year (year), well_below_peak (boolean).
Built from: data/raw/owid/owid-co2-data.csvsha256 7f78e2b218ce4bb8…
country,co2_latest_mt,peak_year,co2_peak_mt,pct_below_peak,well_below_peak
China,12289.037,2024,12289.037,0,False
United States,4904.12,2005,6126.903,19.95760338,True
India,3193.478,2024,3193.478,0,False
Russia,1780.524,1990,2536.284,29.79792484,True
Japan,961.867,2013,1311.876,26.68003683,True
Indonesia,812.22,2024,812.22,0,False
Iran,792.631,2024,792.631,0,False
Saudi Arabia,692.133,2019,708.335,2.287335795,False
South Korea,583.679,2018,670.169,12.90569991,True
Germany,572.319,1979,1117.745,48.79699753,True
co2_mauna_loa_monthly.csv822 rows
Monthly mean CO₂ at Mauna Loa (Scripps before May 1974, NOAA after), dry-air mole fraction. no_daily_observations marks months whose provider value has no daily-count information (interpolated for NOAA data; unknown for Scripps-era months). maunakea_site marks December 2022–July 2023, when observations came from Maunakea after the Mauna Loa eruption (provider header).
Baseline: not applicable.
Method: see the script.
Written by scripts/process/ghg.py. Units: co2_deseasonalized_ppm (ppm), co2_ppm (ppm), decimal_date (year), maunakea_site (boolean), month (month), no_daily_observations (boolean), year (year).
Built from: data/raw/noaa_gml/co2_mm_mlo.txtsha256 c9a91a170d09d16a…
Effective radiative forcing by source (IGCC 2024): how far each driver has pushed the top-of-atmosphere energy balance since 1850–1900. 'aerosol' is the archive's aggregate of aerosol-radiation and aerosol-cloud interactions, which are one physical effect reported in two columns. The percentile members are not independent per source: the archive's uncertainty is dominated by a scaling common to every year, so differencing them this way gives a band on the change close to the band on the recent level. No band is published for volcanic: differencing the percentile members returns them the wrong way round, which is what an episodic forcing does to an assumption that both period means move together.
Baseline: change from the 1850–1900 mean to the 2015–2024 mean.
Method: Per-source columns of the archive's aggregates file, differenced between the two period means; the 5th and 95th percentile members are differenced the same way, and erf_2024 is the archive's own 2024 value relative to 1750. The human rows sum to the archive's anthropogenic aggregate and all rows to its total, checked at build time..
Written by scripts/process/forcing_breakdown.py. Units: change (W m-2), change_p05 (W m-2), change_p95 (W m-2), erf_2024 (W m-2), kind (category), source (category).
Built from: data/raw/igcc/ClimateIndicator-data-v2025.06.11.zipsha256 edb9442fc6f859c2…
Monthly seasonally adjusted CO₂ (Mauna Loa), δ¹³C of CO₂ (Mauna Loa, South Pole) and atmospheric O₂/N₂ (La Jolla, Alert, Cape Grim). A falling δ¹³C and falling O₂ are what burning organic carbon produces — fossil or biospheric; the O₂ budget shows the land biosphere has been a net sink (Manning & Keeling 2006), which leaves fossil carbon as the source.
Baseline: not applicable.
Method: Measured, seasonally adjusted columns only; provider spline fits and gap-filled values are not used..
Written by scripts/process/ghg.py. Units: c13_mlo_sa (per mil (VPDB, Scripps scale)), c13_spo_sa (per mil (VPDB, Scripps scale)), co2_deseasonalized_ppm (ppm), decimal_date (year), month (month), o2_alt_sa (per meg (SIO2023 scale)), o2_cgo_sa (per meg (SIO2023 scale)), o2_ljo_sa (per meg (SIO2023 scale)), year (year).
FRESNO YOSEMITE INT'L (USW00093193) annual mean Tmax, Tmin and Tavg from raw GHCN-Daily, with LOWESS smooths and differences from homogenized Fresno County nClimGrid. Raw station data, not homogenized. One relocation in the station's own history (0.5 mi WSW, 1995-09-01, NCEI HOMR). Station-minus-county differences show local effects (urban growth, irrigation, siting, instruments) relative to the county-wide gridded analysis.
Days per year with Tmax ≥ 100 °F and nights with Tmin ≥ 75 °F at Fresno airport.
Baseline: not applicable.
Method: A year counts only with zero missing days in May–September (Tmax) or June–September (Tmin)..
Written by scripts/process/stations.py. Units: days_tmax_ge_100 (days), missing_jun_sep_tmin (days), missing_may_sep_tmax (days), nights_tmin_ge_75 (nights), year (year).
Decadal means of the Fresno airport threshold counts (decades with ≥ 8 complete years).
Baseline: not applicable.
Method: see the script.
Written by scripts/process/stations.py. Units: decade (year), mean (days (or nights) per year), n (years), series (name).
Fresno County annual cooling and heating degree days (nClimGrid-derived, NCEI Climate at a Glance). Degree days are a temperature index of heating/cooling demand, not measured energy use.
Baseline: not applicable.
Method: see the script.
Written by scripts/process/us_ca.py. Units: cdd (degF-days (base 65 degF)), hdd (degF-days (base 65 degF)), year (year).
Built from: data/raw/noaa_cag/CA-019_cdd_ann_1895-2025.csvsha256 3f354899d72e12d1… data/raw/noaa_cag/CA-019_hdd_ann_1895-2025.csvsha256 e562e128586b0568…
Dated station changes drawn on the Fresno charts: relocations recorded in NCEI HOMR and the two ThreadEx splice dates, both found by the automated validation pass over the raw files.
Baseline: not applicable.
Method: see the script.
Written by scripts/process/stations.py. Units: date (date), decimal_year (year), kind (name), label (text), source (path), station (id).
Built from: data/raw/acis/threadex_FATthr_daily.jsonsha256 d1bd2141f8257eca… data/raw/homr/USW00093193_search.jsonsha256 be66d17ddf191124…
station,date,kind,label,source,decimal_year
USW00093193,1995-09-01,relocation,Moved 0.5 mi WSW (1995-09-01),homr/USW00093193_search.json,1995.665753
FATthr,1939-07-01,splice,Splice (1939-07-01),acis/threadex_FATthr_daily.json,1939.49589
FATthr,1949-08-21,splice,Splice (1949-08-21),acis/threadex_FATthr_daily.json,1949.635616
fresno_threadex_annual.csv139 rows
ACIS ThreadEx 'Fresno Area' annual means and 100 °F day counts, 1888–2025, with the contributing station for each year and differences from Fresno County nClimGrid. Station changes on 1939-07-01 (downtown → Chandler) and 1949-08-21 (Chandler → airport). No trend is fitted across a splice. The 598 days of 1948-01-01 to 1949-08-20 appear under both the Chandler and airport ids with identical values, so no independent overlap exists at the 1949 splice.
Baseline: not applicable.
Method: Missing-data rules; contributing station from the id ACIS attaches to each daily value..
Written by scripts/process/stations.py. Units: days_tmax_ge_100 (days), station_ids (WBAN/GHCN ids), tavg_f (degF), tavg_minus_county_f (degF), tmax_f (degF), tmax_minus_county_f (degF), tmin_f (degF), tmin_minus_county_f (degF), year (year).
Built from: data/raw/acis/threadex_FATthr_daily.jsonsha256 d1bd2141f8257eca… data/raw/noaa_cag/CA-019_tavg_ann_1895-2025.csvsha256 e2e1bee7fbe4fa48… data/raw/noaa_cag/CA-019_tmax_ann_1895-2025.csvsha256 849caade695d320c… data/raw/noaa_cag/CA-019_tmin_ann_1895-2025.csvsha256 e6ab96bb130cbba5…
Global land mean temperature anomaly computed identically from GHCNm v4 unadjusted and adjusted station data. Not a replacement for official land series: no land-fraction weighting, no infilling. Stations with at least one 1961–1990 monthly climatology: 12902 unadjusted, 12395 adjusted. GHCNm 'latest' files are revised daily; the manifest records the exact bytes used.
Baseline: 1961-1990 (per station and calendar month).
Method: Common anomaly method (1961–1990, ≥ 20 years), 5°×5° cells, cos(latitude) weights, annual means from 12 months, QC-flagged values dropped..
Written by scripts/process/ghcnm_adjustments.py. Units: adjusted (degC), adjusted_minus_unadjusted (degC), unadjusted (degC), year (year).
Built from: data/raw/ghcnm/ghcnm.tavg.latest.qcf.tar.gzsha256 3a6a77ed84f3f2db… data/raw/ghcnm/ghcnm.tavg.latest.qcu.tar.gzsha256 8e386e64aba1b989…
Annual mean CO₂ (Mauna Loa and global marine surface), CH₄ and N₂O (global), NOAA GML.
Baseline: not applicable.
Method: see the script.
Written by scripts/process/ghg.py. Units: ch4_global_ppb (ppb), co2_global_ppm (ppm), co2_mlo_ppm (ppm), n2o_global_ppb (ppb), year (year).
Built from: data/raw/noaa_gml/ch4_annmean_gl.txtsha256 82d9c67d52ddd861… data/raw/noaa_gml/co2_annmean_gl.txtsha256 e0b1f499baad55c7… data/raw/noaa_gml/co2_annmean_mlo.txtsha256 3eea72f254116cd4… data/raw/noaa_gml/n2o_annmean_gl.txtsha256 024e9e7475c1970d…
GISTEMP v4 northern-hemisphere winter (DJF, labelled by January's year) and summer (JJA) anomalies.
Baseline: 1951-1980 (GISTEMP).
Method: see the script.
Written by scripts/process/global_temp.py. Units: nh_annual (degC), nh_djf (degC), nh_jja (degC), year (year).
Built from: data/raw/gistemp/NH.Ts+dSST.csvsha256 478319f2ae822f1a…
GISTEMP v4 zonal annual anomalies; Antarctic band masked before 1957 (no coverage).
Baseline: 1951-1980 (GISTEMP).
Method: see the script.
Written by scripts/process/global_temp.py. Units: antarctic_90s_64s (degC), arctic_64n_90n (degC), global (degC), tropics_24s_24n (degC), year (year).
Built from: data/raw/gistemp/ZonAnn.Ts+dSST.csvsha256 58051a827e90800a…
Global mean surface temperature in absolute terms: the mean of the records available in on Berkeley Earth's two published estimates of the 1951–1980 absolute level. Three records cover 1850–1879 and four cover 1880 onward, because GISTEMP begins in 1880. The two levels differ only in how sea-ice regions are measured (air above the ice or water below it). Each estimate's stated uncertainty is far smaller than the gap between them. The mean runs to the last year any record reports; Berkeley's own series ends in 2024.
Baseline: 1951-1980 (the period Berkeley Earth's absolute estimates describe).
Method: The anomaly is re-baselined to its own 1951–1980 mean, then each published 1951–1980 level is added. The two absolute columns therefore differ by a constant..
Written by scripts/process/absolute_temp.py. Units: absolute_air_over_ice_c (degC), absolute_water_under_ice_c (degC), anomaly_vs_1951_1980_c (degC), year (year).
Built from: data/raw/berkeley/Land_and_Ocean_summary.txtsha256 8f4b3f37846f0aac… data/processed/global_temperature_annual.csva processed table; see its own entry
Global annual mean energy flows at the top of the atmosphere for the present-day climate, read from Table 1 of Wild (2020). The paper gives two to four independent reference estimates per row; this table takes one of them throughout rather than mixing them, so that the flows add up. Checked at build time: arriving minus reflected equals absorbed, absorbed is within 2 W m-2 of emitted, and the arriving figure is within 2 W m-2 of the one this project computes independently from total solar irradiance.
Baseline: not applicable: these are flows, not anomalies.
Method: Parsed from the paper's full-text XML; reference estimate (b) throughout, which is Wild et al. (2015, 2019). Reflection by clouds and air is the top-of-atmosphere reflection minus the surface's. Magnitudes: the table signs fluxes by direction..
Written by scripts/process/energy_flows.py. Units: description (text), flow (category), w_per_m2 (W m-2).
Built from: data/raw/wild2020/pmc7366598.xmlsha256 7220869cc64dee86…
flow,w_per_m2,description
sunlight_in,340,"Sunlight arriving at the top of the atmosphere, averaged over the whole surface of the turning planet"
reflected_atmosphere,75,"Sunlight reflected back by clouds and the air, which is what is reflected at the top of the atmosphere and not at the surface"
reflected_surface,25,"Sunlight reflected back by the surface itself — ice, desert, cloudless ocean, everything the ground does"
reflected_total,100,"Sunlight reflected straight back to space, by everything"
absorbed,240,Sunlight the Earth system keeps
infrared_out,239,Infrared radiation emitted back to space
global_escalator_segments.csv6 rows
Short windows (7–10 years) with a negative OLS trend inside 1970–2025, found by a forward greedy search, plus the full-record trend.
Baseline: 1850-1900.
Method: From 1970, take the longest 7–10 year window with a negative OLS slope; otherwise advance one year. Fitted value = intercept + (slope_per_decade / 10) × year..
Written by scripts/process/global_temp.py. Units: end (year), intercept (degC), kind (name), slope_per_decade (degC/decade), start (year).
Annual global surface temperature anomalies from four reconstructions on a common 1850–1900 baseline, with the uncertainty each provider publishes. 2026 excluded (partial year). Berkeley Earth ends 2024. HadCRUT5 2025 is provisional: coverage σ 0.068 °C vs 0.004 °C in 2024. Shared inputs: GISTEMP and NOAAGlobalTemp use GHCNm v4 land and ERSSTv5 ocean data; HadCRUT5 and Berkeley Earth use HadSST4.
Baseline: 1850-1900 (all datasets; see method).
Method: HadCRUT5: each of 200 realizations re-baselined, central = ensemble mean, 95% = ±1.96·sqrt(ensemble variance + coverage σ²); NOAAGlobalTemp (CAG) and Berkeley Earth re-baselined directly, Berkeley envelope = published 95% (baseline uncertainty not propagated); GISTEMP: own 1880–1900 mean removed, then the other three datasets' mean 1880–1900 anomaly (-0.033 °C) added; GISTEMP envelope = v1.2.1 95% half-widths, ending 2016 (later years repeat). NOAAGlobalTemp v6 publishes no usable uncertainty..
Written by scripts/process/global_temp.py. Units: berkeley (degC), berkeley_hi (degC), berkeley_lo (degC), gistemp (degC), gistemp_hi (degC), gistemp_lo (degC), hadcrut5 (degC), hadcrut5_hi (degC), hadcrut5_lo (degC), mean_available (degC), n_datasets (count), noaaglobaltemp (degC), year (year).
First and last 30-year mean anomalies (1895–1924, 1996–2025) for the globe, California, Fresno County and Ventura County.
Baseline: 1901-2000 (each series relative to its own 1901–2000 mean).
Method: Mean of annual anomalies; 95% interval uses the AR(1) effective sample size and t with n_eff − 1 degrees of freedom..
Written by scripts/process/us_ca.py. Units: ci_high_c (degC), ci_high_f (degF), ci_low_c (degC), ci_low_f (degF), mean_c (degC), mean_f (degF), n_eff (years (AR(1) effective)), n_years (years), period_end (year), period_start (year), series (name).
Built from: data/raw/noaa_cag/CA-019_tavg_ann_1895-2025.csvsha256 e2e1bee7fbe4fa48… data/raw/noaa_cag/CA-111_tavg_ann_1895-2025.csvsha256 f02a7b313779ebe4… data/raw/noaa_cag/CA_tavg_ann_1895-2025.csvsha256 58fd103b3891d6c3… data/raw/noaa_cag/global_land_ocean_12mo_dec_1850-2025.csvsha256 8661bcd48bce5b84…
Annual mean temperature anomalies: globe (NOAAGlobalTemp), California, Fresno County and Ventura County (nClimGrid). County and state series are nClimGrid gridded analyses, not single stations. V1 uses a 1850–1900 baseline for the globe; this table uses 1901–2000 so local and global share one period.
Baseline: 1901-2000 (each series relative to its own 1901–2000 mean).
Method: Anomaly = annual value − own 1901–2000 mean; °C = °F anomaly / 1.8 (no offset for differences)..
Written by scripts/process/us_ca.py. Units: california_c (degC), california_f (degF), fresno_county_c (degC), fresno_county_f (degF), globe_c (degC), ventura_county_c (degC), ventura_county_f (degF), year (year).
Built from: data/raw/noaa_cag/CA-019_tavg_ann_1895-2025.csvsha256 e2e1bee7fbe4fa48… data/raw/noaa_cag/CA-111_tavg_ann_1895-2025.csvsha256 f02a7b313779ebe4… data/raw/noaa_cag/CA_tavg_ann_1895-2025.csvsha256 58fd103b3891d6c3… data/raw/noaa_cag/global_land_ocean_12mo_dec_1850-2025.csvsha256 8661bcd48bce5b84…
Projected vs observed warming rates for climate models published 1970–2007 over each model's evaluation window, from the tables Hausfather et al. (2020) published with their paper. These are the raw, time-based comparisons. The paper's forcing-adjusted (implied TCR) comparison is summarised by the skill score column. Evaluation windows end in 2017 (the paper's data); they are not extended here.
Baseline: not applicable.
Method: Rows as published by the authors (data/interim); trends converted from °C/yr to °C/decade. 'consistent_time_based' = model-minus-observation 95% interval includes zero..
Written by scripts/process/attribution_models.py. Units: consistent_time_based (boolean), diff_high (degC/decade), diff_low (degC/decade), diff_per_decade (degC/decade), end (year), model (id), model_trend_per_decade (degC/decade), obs_trend_high (degC/decade), obs_trend_low (degC/decade), obs_trend_per_decade (degC/decade), start (year), tcr_skill_median (skill score).
Built from: data/raw/oldmodels/model_obs_time_diffs.csvsha256 831851d6797656a8… data/raw/oldmodels/model_tcr_skill_scores.csvsha256 6bdac44f254e7647… data/raw/oldmodels/obs_time_trends.csvsha256 3004e58ef47dc76c… data/raw/oldmodels/single_model_trends.csvsha256 a19f2d9b17059a4a…
Annual global ocean heat content (IAPv4.2, 0–700 m, 0–2000 m, 2000–6000 m) from 1955, with the multi-dataset surface temperature mean. Provider: records reliable only after 1955; mapping uses CMIP5-informed covariances (Cheng et al. 2024). Argo floats give near-global 0–2000 m coverage from about 2005; earlier values rest on sparser ship data.
Baseline: OHC: 2006-2015 (IAP); surface: 1850-1900.
Method: Annual mean of 12 monthly values; 10^22 J × 10 = ZJ; error column = mean of the monthly 95% half-widths (monthly errors are correlated, so this is not reduced by averaging)..
Written by scripts/process/ocean_solar.py. Units: argo_era (boolean), ohc_0_2000_err95_zj (ZJ), ohc_0_2000_zj (ZJ), ohc_0_700_zj (ZJ), ohc_2000_6000_zj (ZJ), surface_mean_available_c (degC), year (year).
Built from: data/processed/global_temperature_annual.csva processed table; see its own entry data/raw/iap/IAPv4.2_OHC_estimate_update.txtsha256 a9ac01b9d802666e…
Heat added to the upper 2,000 m of the ocean each year (IAPv4.2), its 10-year running mean, and NOAA's global sea surface temperature anomaly. Year-to-year gains inherit the uncertainty of both years' estimates, which is large before Argo (about 2005); the running mean and the period means carry the claim, not single bars. Sea surface temperature describes the top few metres; the heat content describes the whole upper 2,000 m.
Baseline: heat gain: change from the previous year; sea surface: 1901-2000.
Method: Gain is each year's annual-mean heat content minus the previous year's; the running mean is centred and needs all 10 years..
Written by scripts/process/ocean_solar.py. Units: gain_10yr_mean_zj (ZJ/yr), gain_zj (ZJ/yr), sea_surface_anomaly_c (degC), year (year).
Built from: data/raw/iap/IAPv4.2_OHC_estimate_update.txtsha256 a9ac01b9d802666e… data/raw/noaa_cag/global_ocean_12mo_dec_1850-2025.csvsha256 5cad4ef7b11eb981…
Global surface temperature reconstruction for years 5–1995 CE (decadal smoothing), PAGES 2k Consortium 2019 as plotted in AR6 SPM.1a.
Baseline: 1850-1900 (AR6).
Method: see the script.
Written by scripts/process/attribution_models.py. Units: p05 (degC), p95 (degC), reconstruction (degC), year (year CE).
Built from: data/raw/ar6_spm1/panel_a_SPM1_1-2000_recon.csvsha256 289f2d70c682cb1e…
Every raw file this page was built from: the request that fetched it, its SHA-256, and the processed tables that read it. Re-fetch a row's url, hash the bytes, and compare with sha256 to confirm the input has not changed since fetched_at. A row with an empty used_by was fetched and validated but feeds no table on this page; it was read for a single number, a quotation, or a cross-check. request_body is filled only for the rows fetched with POST, whose URL alone does not identify the data returned.
Baseline: not applicable.
Method: Written from data/raw/MANIFEST.json; used_by resolved from the other processed tables' recorded inputs..
Written by scripts/process/provenance.py. Units: bytes (bytes), dataset (name), fetched_at (UTC timestamp), http_status (HTTP status), method (HTTP method), raw_file (path relative to data/raw/), request_body (JSON request body (POST only)), sha256 (hex digest), url (URL), used_by (processed tables, semicolon-separated).
Built from: data/raw/MANIFEST.jsonsha256 01fe364816028d1f…
Monthly global-mean atmospheric layer temperatures from RSS v4.0 and UAH v6.1. TTT combines TMT and TLS to remove stratospheric influence from the mid-troposphere channel. Lower-stratosphere cooling 1979–mid-1990s is mostly ozone depletion (AR6 SPM A.1.3); volcanic eruptions in 1982 and 1991 warm it briefly.
Baseline: 1979-1998 (all series re-baselined).
Method: RSS TMT/TTT/TLS use 82.5°S–82.5°N; RSS TLT uses 70°S–82.5°N (widest band published); UAH uses its global column..
Written by scripts/process/satellite.py. Units: decimal_year (year), rss_tls (degC), rss_tlt (degC), rss_tmt (degC), rss_ttt (degC), uah_ls (degC), uah_lt (degC), uah_mt (degC).
Annual mean relative sea level at San Francisco (PSMSL station 10) and satellite global mean sea level (NOAA LSA, 66°S–66°N). A tide gauge measures sea level relative to the land it sits on (vertical land motion included); the satellite series is a global ocean mean. They are not expected to match. NOAA LSA series ends early 2025; no glacial isostatic adjustment applied (provider).
Baseline: 1993-2012 (both series).
Method: Tide gauge: PSMSL Revised Local Reference annual means. Satellite: mean of all altimetry points in a year (years with ≥ 30 points)..
Written by scripts/process/sealevel_ice.py. Units: satellite_gmsl_mm (mm), sf_tide_gauge_mm (mm), year (year).
Built from: data/raw/noaa_star/slr_sla_gbl_free_all_66.csvsha256 5158a989a5832056… data/raw/psmsl/10_annual.rlrdatasha256 23ed53ed7eebfa82…
April 1 snow water equivalent index for manual snow courses in the Kings and San Joaquin basins (CDEC): mean across courses of each course's April value as a percent of its 1951–2000 mean. April 1 values are nominal; survey dates usually fall in the preceding weeks. Courses in these basins sit at about 6,000–11,500 ft; high-elevation Sierra snowpack is expected to respond more slowly to warming than lower sites.
Baseline: each course's own 1951–2000 April mean.
Method: Courses kept if they report April values in ≥ 90% of the index years; a year counts if ≥ 75% of kept courses report..
Written by scripts/process/hydro_fire_snow.py. Units: courses_1930_set (courses), courses_1950_set (courses), index_pct_1930_set (% of 1951–2000 mean), index_pct_1950_set (% of 1951–2000 mean), year (year).
CDEC snow courses in the Kings and San Joaquin basins and whether each meets the coverage rule.
Baseline: not applicable.
Method: see the script.
Written by scripts/process/hydro_fire_snow.py. Units: april_values_1950_2025 (years), basin (name), course (id), elev_ft (feet), in_1930_set (boolean), in_1950_set (boolean), name (name).
Built from: data/raw/cdec/station_search_kings_river.htmlsha256 51bbb271daba21eb… data/raw/cdec/station_search_san_joaquin_river.htmlsha256 d21fe4651f64cd24…
Effective radiative forcing from solar, volcanic and anthropogenic drivers (IGCC 2024), total solar irradiance (NRLTSI2), and surface temperature. TSI before the satellite era (1978) is a proxy-based reconstruction (Coddington et al. 2016); other reconstructions differ (Connolly et al. 2021; Richardson & Benestad 2022). NRLTSI2 uncertainty grows sharply for 2021–2023 (provisional).
Baseline: ERF relative to 1750 (IGCC); TSI absolute; surface 1850-1900.
Method: 11-year centred running means; ERF and TSI are not converted into each other here..
Written by scripts/process/ocean_solar.py. Units: anthro_erf (W m-2), anthro_erf_11yr (W m-2), solar_erf (W m-2), solar_erf_11yr (W m-2), surface_mean_available_c (degC), total_erf (W m-2), total_erf_11yr (W m-2), tsi (W m-2), tsi_11yr (W m-2), volcanic_erf (W m-2), volcanic_erf_11yr (W m-2), year (year).
Built from: data/processed/global_temperature_annual.csva processed table; see its own entry data/raw/igcc/ClimateIndicator-data-v2025.06.11.zipsha256 edb9442fc6f859c2… data/raw/lisird/nrl2_tsi_P1Y.csvsha256 48bada9d40d3a86d…
United States CO₂ emissions by source, on the same definitions as the world table: coal, oil, gas, industry (cement, flaring and other), and land-use change. Same source and same processing as the world table, so the two figures compare. Land-use change for a single country is the least certain column here.
Baseline: not applicable (annual emissions).
Method: Million tonnes converted to billion tonnes (Gt); `stack_*` columns are running sums in the plotted order. Territorial emissions: CO₂ released inside the United States, not the emissions embodied in what it imports..
Written by scripts/process/carbon_sources.py. Units: coal (GtCO2/yr), fossil (GtCO2/yr), gas (GtCO2/yr), industry (GtCO2/yr), land_use (GtCO2/yr), oil (GtCO2/yr), stack_coal (GtCO2/yr), stack_gas (GtCO2/yr), stack_industry (GtCO2/yr), stack_land_use (GtCO2/yr), stack_oil (GtCO2/yr), total (GtCO2/yr), year (year).
Built from: data/raw/owid/owid-co2-data.csvsha256 7f78e2b218ce4bb8…
Continental US hurricane impacts per year (category ≥ 1 and ≥ 3 in at least one state), NOAA AOML Hurricane Research Division, 1900–2025. Includes storms that brought hurricane-force winds without a US landfall (*), Mexican landfalls with hurricane winds in Texas (#), and landfalls whose strongest winds stayed offshore (&) when a category is given. HRD notes records are incomplete for some coastlines before 1900; the analysis starts in 1900.
Baseline: not applicable.
Method: Highest category derived from the per-state Saffir–Simpson codes on each line; lines marked tropical-storm conditions only are excluded..
Written by scripts/process/hurricanes.py. Units: hurricanes (count), major_hurricanes (count), year (year).
Built from: data/raw/noaa_hrd/All_U.S._Hurricanes.htmlsha256 1346126db919c2e5…
Ventura County nClimGrid, nearby station annual means, short RAWS records, and gridded PRISM/Livneh values at the Thousand Oaks and Simi Valley coordinates. No station in Thousand Oaks or Simi Valley has a record long enough for a climate trend; RAWS rows are shown only as short segments. A station trend needs at least 8 valid years in every ten-year window; a record that fails is compared with the county across its longest gap instead. PRISM and Livneh are interpolations of largely the same station network, not independent evidence, and get no trend. Livneh 2012–2013 excluded: Tmax departs from PRISM by +1.1 to +2.1 °C against a 1981–2011 offset near −0.4/+1.0 °C, found by the automated validation pass over the raw files.
Baseline: anomaly_f: each series' own 1951–2010 mean (only where ≥ 20 valid years exist in 1951–2010).
Method: Station annual means use the missing-data rule; PRISM via ACIS grid 21 (1981–2025); Livneh (Cal-Adapt) converted °C→°F, 1950–2011 only..
Written by scripts/process/stations.py. Units: anomaly_f (degF), element (name), series (id), value_f (degF), year (year).
Built from: data/raw/acis/prism_simi_valley_annual_1981-2025.jsonsha256 8ccc911e2c5bd8a5… data/raw/acis/prism_thousand_oaks_annual_1981-2025.jsonsha256 9fc883f27d8052e5… data/raw/acis/stnmeta_ventura_westla.jsonsha256 43012de118733a2e… data/raw/caladapt/livneh_tasmax_year_simi_valley.jsonsha256 1c3dd5ba7f342d96… data/raw/caladapt/livneh_tasmax_year_thousand_oaks.jsonsha256 bf58bd1f01d16674… data/raw/caladapt/livneh_tasmin_year_simi_valley.jsonsha256 f0e4525a2134ce81… data/raw/caladapt/livneh_tasmin_year_thousand_oaks.jsonsha256 fa19b181bf522d0d… data/raw/ghcnd/USC00046399sha256 c1c117aca545d451… over 13 files data/raw/ghcnd/USC00048904sha256 a59a4f49ba7d7189… over 1 files data/raw/ghcnd/USC00049785sha256 c8d199e97364ff85… over 8 files data/raw/ghcnd/USR0000CSIVsha256 3efba6b05d2e9a8b… over 1 files data/raw/ghcnd/USR0000CTHSsha256 e8cefe23854ae5fb… over 1 files data/raw/ghcnd/USW00023136sha256 fe7baf8f0ce39d93… over 8 files data/raw/noaa_cag/CA-111_tavg_ann_1895-2025.csvsha256 f02a7b313779ebe4…
Ventura County, California: mean temperature for the month of October in every year of the nClimGrid record, with a LOWESS smooth. One month of one county is about as noisy as this page's data gets. That is why the figure shows the scatter rather than only the fit. A partial October is never published, so the last row is always a complete month.
Baseline: not applicable: absolute monthly means, not anomalies.
Method: Values as published by Climate at a Glance for the county (a gridded analysis of homogenized station data, not a single station). The smooth is LOWESS with a 0.3 span, drawn to guide the eye and never used for a quoted number..
Written by scripts/process/seasonality.py. Units: decade (year), lowess_f (degF), tavg_f (degF), year (year).
Built from: data/raw/noaa_cag/CA-111_tavg_oct_1895-2026.csvsha256 5bb9b89891084689…
WGMS reference-glacier annual mass balance (regional averages) and cumulative change relative to 1970. The number of glaciers averaged grows from 4–5 in the early 1950s to about 60 today.
Baseline: not applicable.
Method: see the script.
Written by scripts/process/sealevel_ice.py. Units: cum_mm_we_rel_1970 (mm w.e.), cumulative_m_we_since_1970 (m w.e.), mb_mm_we (mm w.e.), n_glaciers (count), year (year).
Built from: data/raw/wgms/mb_ref_2026-02-10.csvsha256 24d8c49221993601…
The page above says each number was computed by a named script from a named public dataset. The scripts
are below, in full, so that “named” does not have to be taken on trust. Each one is collapsed to a single
line; open it to read the code, or use the download button to save it and run it.
These are the modules that turn raw data into the processed tables and the numbers in the prose: the
processing steps and the shared library of readers and statistics they call. Together with the
data appendix — which gives every processed table, the raw file behind it, and that file’s
SHA-256 — and the provenance table, which gives the exact request that
fetched each raw file, they are what a reader needs to start from the providers’ own data and arrive at
the same numbers.
Two things to know before running them. They expect the raw files in data/raw/, laid out as the
raw_file column of the provenance table names them, and they are written for Python 3.14 with
numpy, pandas, scipy, matplotlib and PyYAML. And they are the working copies with the comments taken out: the
code is unchanged and was checked to confirm it, but the explanations that sat beside it are not here.
What each table’s method was is stated in the data appendix instead, where it is recorded as
data rather than as a comment.
26 files, 249 KB. Comments and docstrings have been removed from these copies; the code is otherwise unchanged, and each file was checked against the original to confirm that removing them changed nothing it does.
scripts/lib/figtext.py101 lines
from __future__ import annotations
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
FIGURES_MD = ROOT / 'site' / 'src' / 'figures.md'
PROSE_FIELDS = ('title', 'subtitle', 'alt', 'caption', 'baseline_note')
REQUIRED_PROSE = ('title', 'subtitle', 'alt', 'caption')
REQUIRED_META = ('tier', 'section', 'inputs')
FIGURE_HEADING = re.compile('^##[ \\t]+([A-Za-z0-9_]+)[ \\t]*$')
FIELD_HEADING = re.compile('^###[ \\t]+(\\S+)[ \\t]*$')
META_LINE = re.compile('^-[ \\t]+([a-z_]+):[ \\t]*(.*)$')
def _fold(lines: list[str], where: str) -> str:
text = ' '.join((' '.join(line.split()) for line in lines if line.strip()))
if not text:
raise ValueError(f'{where}: this block is empty')
return text
def _meta(key: str, value: str, where: str):
if key == 'tier':
if value not in ('1', '2', '3'):
raise ValueError(f'{where}: tier must be 1, 2 or 3, not {value!r}')
return int(value)
if key == 'inputs':
names = [part.strip() for part in value.split(',') if part.strip()]
if not names:
raise ValueError(f'{where}: inputs must name at least one processed table')
return names
if key == 'section':
if not value:
raise ValueError(f'{where}: section must not be empty')
return value
raise ValueError(f'{where}: unknown metadata key {key!r}; expected one of {REQUIRED_META}')
def parse(text: str, name: str='figures.md') -> list[dict]:
figures: list[dict] = []
current: dict | None = None
field: str | None = None
block: list[str] = []
def close_block() -> None:
nonlocal field, block
if field is not None:
current[field] = _fold(block, f"{name}: {current['id']} / {field}")
field, block = (None, [])
for number, line in enumerate(text.splitlines(), start=1):
where = f'{name}:{number}'
heading = FIGURE_HEADING.match(line)
if heading:
if current is not None:
close_block()
figures.append(current)
current = {'id': heading.group(1)}
field, block = (None, [])
continue
if current is None:
continue
field_heading = FIELD_HEADING.match(line)
if field_heading:
close_block()
field = field_heading.group(1)
if field not in PROSE_FIELDS:
raise ValueError(f'{where}: unknown figure field {field!r}; expected one of {PROSE_FIELDS}')
if field in current:
raise ValueError(f"{where}: {current['id']} has more than one {field} block")
continue
if field is not None:
block.append(line)
continue
meta = META_LINE.match(line)
if meta:
key, value = (meta.group(1), meta.group(2).strip())
if key in current:
raise ValueError(f"{where}: {current['id']} already has {key}")
current[key] = _meta(key, value, where)
continue
if line.strip():
raise ValueError(f"{where}: expected '- key: value', a '###' field heading or a blank line, got {line.strip()[:60]!r}")
if current is not None:
close_block()
figures.append(current)
seen: set[str] = set()
for entry in figures:
fid = entry['id']
if fid in seen:
raise ValueError(f'{name}: two figures share the id {fid!r}')
seen.add(fid)
missing = [k for k in REQUIRED_META + REQUIRED_PROSE if k not in entry]
if missing:
raise ValueError(f"{name}: figure {fid} is missing {', '.join(missing)}")
if not figures:
raise ValueError(f"{name}: no figures found; a figure starts with a '## <id>' heading")
return figures
def load(path: Path | None=None) -> list[dict]:
path = path or FIGURES_MD
return parse(path.read_text(encoding='utf-8'), path.name)
def by_id(path: Path | None=None) -> dict[str, dict]:
return {entry['id']: entry for entry in load(path)}
scripts/lib/http.py107 lines
from __future__ import annotations
import datetime as dt
import hashlib
import json
import time
import urllib.error
import urllib.request
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
RAW = ROOT / 'data' / 'raw'
MANIFEST = RAW / 'MANIFEST.json'
USER_AGENT = 'Mozilla/5.0 (compatible; climate-evidence-build/0.1; reproducible research pipeline)'
BROWSER_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36'
RETRY_STATUSES = {429, 500, 502, 503, 504}
class FetchError(RuntimeError):
pass
def sha256_bytes(data: bytes) -> str:
return hashlib.sha256(data).hexdigest()
def sha256_file(path: Path) -> str:
digest = hashlib.sha256()
with path.open('rb') as handle:
for chunk in iter(lambda: handle.read(1 << 20), b''):
digest.update(chunk)
return digest.hexdigest()
def now_utc() -> str:
return dt.datetime.now(dt.timezone.utc).replace(microsecond=0).isoformat().replace('+00:00', 'Z')
def load_manifest() -> dict:
if MANIFEST.exists():
manifest = json.loads(MANIFEST.read_text(encoding='utf-8'))
manifest.setdefault('files', {})
manifest.setdefault('failures', {})
return manifest
return {'files': {}, 'failures': {}}
def save_manifest(manifest: dict) -> None:
MANIFEST.parent.mkdir(parents=True, exist_ok=True)
text = json.dumps(manifest, indent=2, sort_keys=True, ensure_ascii=False) + '\n'
MANIFEST.write_text(text, encoding='utf-8', newline='\n')
def http_request(url: str, *, method: str='GET', body: bytes | None=None, content_type: str | None=None, timeout: int=180, retries: int=3, browser: bool=False) -> tuple[int, bytes, str]:
headers = {'User-Agent': BROWSER_UA if browser else USER_AGENT, 'Accept': '*/*'}
if content_type:
headers['Content-Type'] = content_type
error = ''
for attempt in range(retries + 1):
req = urllib.request.Request(url, data=body, method=method, headers=headers)
try:
with urllib.request.urlopen(req, timeout=timeout) as resp:
return (resp.status, resp.read(), '')
except urllib.error.HTTPError as exc:
if exc.code in RETRY_STATUSES and attempt < retries:
time.sleep(5 * (attempt + 1))
continue
try:
detail = exc.read()[:300].decode('utf-8', errors='replace')
except Exception:
detail = ''
return (exc.code, b'', f'HTTP {exc.code} {detail}'.strip())
except Exception as exc:
error = f'{type(exc).__name__}: {exc}'
if attempt < retries:
time.sleep(5 * (attempt + 1))
continue
return (0, b'', error)
def download(manifest: dict, *, dataset: str, url: str, dest: str, method: str='GET', json_body: dict | None=None, refresh: bool=False, expect_contains: list[str] | None=None, reject_contains: list[str] | None=None, min_bytes: int=1, allow_empty: bool=False, browser: bool=False) -> dict:
path = RAW / dest
previous = manifest['files'].get(dest)
if not refresh and previous and path.exists() and (previous.get('url') == url) and (previous.get('request_body') == json_body) and (sha256_file(path) == previous.get('sha256')):
return {**previous, 'cache': 'hit'}
body = json.dumps(json_body, sort_keys=True).encode('utf-8') if json_body is not None else None
status, data, error = http_request(url, method=method, body=body, browser=browser, content_type='application/json' if body else None)
problem = ''
if status != 200:
problem = error or f'HTTP {status}'
elif allow_empty and (not data):
problem = ''
elif len(data) < min_bytes:
problem = f'response too small ({len(data)} bytes < {min_bytes})'
else:
head = data[:262144]
missing = [s for s in expect_contains or [] if s.encode('utf-8') not in head]
rejected = [s for s in reject_contains or [] if s.encode('utf-8') in head]
if missing:
problem = f'content check failed: expected text not found {missing}'
elif rejected:
problem = f'content check failed: error marker present {rejected}'
if problem:
manifest['failures'][dest] = {'dataset': dataset, 'url': url, 'method': method, 'request_body': json_body, 'http_status': status, 'error': problem, 'attempted_at': now_utc()}
raise FetchError(f'{dataset}: {problem} <{url}>')
path.parent.mkdir(parents=True, exist_ok=True)
partial = path.with_name(path.name + '.part')
partial.write_bytes(data)
partial.replace(path)
record = {'dataset': dataset, 'url': url, 'method': method, 'request_body': json_body, 'http_status': status, 'bytes': len(data), 'sha256': sha256_bytes(data), 'fetched_at': now_utc()}
if previous and previous.get('sha256') and (previous['sha256'] != record['sha256']):
record['previous_sha256'] = previous['sha256']
record['upstream_changed'] = True
manifest['files'][dest] = record
manifest['failures'].pop(dest, None)
return {**record, 'cache': 'miss'}
scripts/lib/io.py114 lines
from __future__ import annotations
import hashlib
import json
import math
import time
from pathlib import Path
import pandas as pd
ROOT = Path(__file__).resolve().parents[2]
RAW = ROOT / 'data' / 'raw'
PROCESSED = ROOT / 'data' / 'processed'
NUMBERS_DIR = PROCESSED / 'numbers'
FLOAT_FORMAT = '%.10g'
def retrying(action, *, what: str, attempts: int=6, delay: float=0.3):
failure = None
for attempt in range(attempts):
try:
return action()
except OSError as exc:
failure = exc
if attempt + 1 < attempts:
print(f' retrying write of {what} after {type(exc).__name__}: {exc}')
time.sleep(delay * (attempt + 1))
raise failure
def _manifest() -> dict:
path = RAW / 'MANIFEST.json'
return json.loads(path.read_text(encoding='utf-8'))['files'] if path.exists() else {}
def input_record(rel: str) -> dict:
manifest = _manifest()
if rel == 'MANIFEST.json':
return {'path': 'data/raw/MANIFEST.json', 'sha256': hashlib.sha256((RAW / 'MANIFEST.json').read_bytes()).hexdigest()}
if rel in manifest:
return {'path': f'data/raw/{rel}', 'sha256': manifest[rel]['sha256']}
members = sorted(((key, entry['sha256']) for key, entry in manifest.items() if key.startswith(rel + '/')))
if members:
digest = hashlib.sha256(''.join((f'{k}:{h}\n' for k, h in members)).encode()).hexdigest()
return {'path': f'data/raw/{rel}', 'sha256': digest, 'members': len(members), 'note': 'directory: sha256 over the sorted member hashes recorded in MANIFEST.json'}
if rel.startswith('data/processed/'):
return {'path': rel, 'sha256': None}
raise KeyError(f'input {rel} is neither in data/raw/MANIFEST.json nor a processed file')
def _json_default(value):
if isinstance(value, float) and (not math.isfinite(value)):
return None
if hasattr(value, 'item'):
return value.item()
raise TypeError(f'not JSON serializable: {type(value)}')
def dump_json(obj, path: Path) -> None:
path.parent.mkdir(parents=True, exist_ok=True)
text = json.dumps(obj, indent=2, sort_keys=True, ensure_ascii=False, default=_json_default, allow_nan=False)
path.write_text(text + '\n', encoding='utf-8', newline='\n')
def clean_floats(obj):
if isinstance(obj, dict):
return {k: clean_floats(v) for k, v in obj.items()}
if isinstance(obj, (list, tuple)):
return [clean_floats(v) for v in obj]
if isinstance(obj, float) and (not math.isfinite(obj)):
return None
return obj
def write_table(df: pd.DataFrame, name: str, *, script: str, inputs: list[str], units: dict[str, str], description: str, baseline: str | None=None, method: str | None=None, notes: list[str] | None=None) -> Path:
path = PROCESSED / f'{name}.csv'
path.parent.mkdir(parents=True, exist_ok=True)
missing_units = [c for c in df.columns if c not in units]
if missing_units:
raise ValueError(f'{name}: units not declared for columns {missing_units}')
df.to_csv(path, index=False, float_format=FLOAT_FORMAT, lineterminator='\n')
meta = {'file': f'data/processed/{name}.csv', 'script': script, 'description': description, 'inputs': [input_record(i) for i in sorted(set(inputs))], 'units': units, 'baseline': baseline, 'method': method, 'notes': notes or [], 'rows': int(len(df)), 'columns': list(df.columns)}
dump_json(clean_floats(meta), PROCESSED / f'{name}.meta.json')
return path
class Numbers:
def __init__(self, section: str, script: str):
self.section, self.script, self.items = (section, script, {})
self.skipped: list[dict] = []
def add_trend_result(self, key: str, result: dict, *, units: str, decimals: int, description: str, inputs: list[str], kind: str='delta_temp', scale: float=10, refusal: str | None=None) -> dict | None:
reason = refusal or ('n_eff below the minimum for a claimed trend' if result['insufficient'] else None)
if reason:
self.skipped.append({'key': f'{self.section}.{key}', 'reason': reason, 'n': result['n'], 'n_eff': round(float(result['n_eff']), 2), 'slope_not_claimed': round(scale * float(result['slope']), decimals), 'description': description})
return None
self.add(key, scale * result['slope'], units=units, decimals=decimals, kind=kind, ci=(scale * result['ci_low'], scale * result['ci_high']), inputs=inputs, description=description)
return result
def add(self, key: str, value, *, units: str, decimals: int, description: str, inputs: list[str], kind: str='value', ci: tuple | None=None, n_eff: float | None=None) -> None:
full = f'{self.section}.{key}'
if full in self.items:
raise KeyError(f'duplicate number key {full}')
if value is None or (isinstance(value, float) and (not math.isfinite(value))):
raise ValueError(f'{full}: refusing to register a missing value')
item = {'value': round(float(value), decimals) if kind != 'year' else int(value), 'units': units, 'decimals': decimals, 'kind': kind, 'description': description, 'script': self.script, 'inputs': sorted(set(inputs))}
if ci is not None:
item['ci95'] = [round(float(ci[0]), decimals), round(float(ci[1]), decimals)]
if n_eff is not None:
item['n_eff'] = round(float(n_eff), 1)
self.items[full] = item
def save(self) -> Path:
path = NUMBERS_DIR / f'{self.section}.json'
dump_json(self.items, path)
skips = NUMBERS_DIR / 'skipped' / f'{self.section}.json'
if self.skipped:
dump_json({'skipped_trends': self.skipped}, skips)
for item in self.skipped:
print(f" {item['key']} not claimed ({item['reason']}): n={item['n']}, n_eff={item['n_eff']}")
elif skips.exists():
skips.unlink()
return path
scripts/lib/readers.py373 lines
from __future__ import annotations
import csv
import datetime as dt
import html
import io
import json
import re
from collections import Counter
from dataclasses import dataclass, field
from pathlib import Path
import numpy as np
import pandas as pd
RAW = Path(__file__).resolve().parents[2] / 'data' / 'raw'
@dataclass
class Table:
df: pd.DataFrame
units: str
meta: dict = field(default_factory=dict)
def _lines(path: Path) -> list[str]:
return Path(path).read_text(encoding='utf-8-sig', errors='replace').splitlines()
def _num(text: str, missing: tuple[float, ...]=()) -> float:
try:
value = float(text)
except (TypeError, ValueError):
return np.nan
return np.nan if value in missing or np.isnan(value) else value
def cag(path: Path) -> Table:
meta: dict = {}
rows = []
for line in _lines(path):
if line.startswith('#'):
body = html.unescape(line.lstrip('#').strip())
low = body.lower()
if low.startswith('units:'):
meta['units'] = body.split(':', 1)[1].strip()
elif low.startswith('base period:'):
meta['base_period'] = body.split(':', 1)[1].strip()
elif low.startswith('title:'):
meta['title'] = body.split(':', 1)[1].strip().strip('"')
elif body and 'title' not in meta:
meta['title'] = body.strip('"')
continue
if not line[:1].isdigit():
continue
key, value = line.split(',')[:2]
end_month = int(key[4:6]) if len(key) >= 6 else 12
rows.append((int(key[:4]), end_month, _num(value, (-99.0, -99.9, -99.99, -999.0, -9999.0))))
units = meta.get('units') or ('degree days, base 65°F (from title)' if 'Degree Days' in meta.get('title', '') else 'not stated')
return Table(pd.DataFrame(rows, columns=['year', 'end_month', 'value']), units, meta)
def noaa_globaltemp_annual(path: Path) -> Table:
rows = []
for line in _lines(path):
parts = line.split()
if len(parts) >= 6 and parts[0].isdigit():
rows.append([int(parts[0])] + [_num(p, (-999.0,)) for p in parts[1:6]])
cols = ['year', 'anomaly', 'total_err_var', 'hf_err_var', 'lf_err_var', 'bias_err_var']
return Table(pd.DataFrame(rows, columns=cols), 'K (anomaly); K**2 (error variances)', {'source_of_columns': '00_Readme_timeseries.txt', 'base_period': 'not stated in file'})
def nti(path: Path) -> Table:
lines = _lines(path)
df = pd.read_csv(io.StringIO('\n'.join(lines[1:])))
df = df.rename(columns={'Date': 'year', 'ClimDiv': 'climdiv', 'USCRN': 'uscrn'})
df = df.replace(-99.99, np.nan)
units = 'degrees F (anomaly)' if 'degrees F' in lines[0] else 'not stated'
return Table(df, units, {'title': lines[0].strip()})
def ncei_daily(station_dir: Path) -> Table:
frames = [pd.read_csv(f, dtype=str, keep_default_na=False) for f in sorted(Path(station_dir).glob('*.csv')) if f.stat().st_size > 0]
frames = [f for f in frames if len(f)]
if not frames:
raise ValueError(f'no observations in any chunk under {station_dir} (header-only responses)')
raw = pd.concat(frames, ignore_index=True)
if raw['DATE'].duplicated().any():
raise ValueError(f'duplicate dates across chunks in {station_dir}')
out = pd.DataFrame({'date': pd.to_datetime(raw['DATE'])})
qc = {}
for element in ('TMAX', 'TMIN', 'PRCP'):
if element not in raw:
continue
values = pd.to_numeric(raw[element].str.strip(), errors='coerce')
attrs = raw.get(f'{element}_ATTRIBUTES', pd.Series([''] * len(raw)))
qflag = attrs.str.split(',').str[1].fillna('').str.strip()
failed = values.notna() & (qflag != '')
qc[element] = {'reported': int(values.notna().sum()), 'qc_failed_removed': int(failed.sum()), 'quality_flags': dict(Counter(qflag[failed]))}
out[element] = values.where(~failed)
out = out.sort_values('date').reset_index(drop=True)
return Table(out, 'TMAX/TMIN whole degrees F; PRCP inches (NCEI Access units=standard)', {'station': raw['STATION'].iloc[0], 'qc': qc})
def hadcrut5_summary(path: Path) -> Table:
df = pd.read_csv(path)
header = list(df.columns)
df.columns = ['year', 'anomaly', 'lower95', 'upper95']
return Table(df, 'deg C (from header)', {'header': header, 'base_period': '1961-1990 (stated in Morice et al. 2021 abstract; not in file)'})
def hadcrut5_ensemble(path: Path) -> Table:
df = pd.read_csv(path).rename(columns={'Time': 'year', 'Fraction of area represented': 'coverage_fraction', 'Coverage uncertainty (1 sigma)': 'coverage_sigma'})
members = [c for c in df.columns if c.startswith('Realization')]
return Table(df, 'deg C; coverage uncertainty is 1 sigma (from header)', {'n_realizations': len(members), 'base_period': '1961-1990 (Morice et al. 2021; not in file)'})
def gistemp_table(path: Path) -> Table:
lines = _lines(path)
start = next((i for i, line in enumerate(lines) if line.startswith('Year,')))
df = pd.read_csv(io.StringIO('\n'.join(lines[start:])), na_values=['***', '****', '*****'])
return Table(df.rename(columns={'Year': 'year'}), 'deg C (GISTEMP documentation; not in file)', {'title': lines[0].strip() if start else '', 'base_period': '1951-1980 (GISTEMP documentation; not in file)'})
def gistemp_ci(path: Path) -> Table:
return Table(pd.read_csv(path), 'deg C (95% half-width)', {'source': 'GISTEMP uncertainty model v1.2.1 (Lenssen et al. 2019)'})
def berkeley_summary(path: Path) -> Table:
lines = _lines(path)
header = [line[1:].strip() for line in lines if line.startswith('%')]
rows = [line.split() for line in lines if line.strip() and (not line.startswith('%'))]
if len(rows[0]) == 9:
cols = ['year', 'anomaly', 'unc95', 'anomaly_5yr', 'unc95_5yr', 'anomaly_seaice_water', 'unc95_seaice_water', 'anomaly_5yr_seaice_water', 'unc95_5yr_seaice_water']
else:
cols = ['year', 'anomaly', 'unc95', 'anomaly_5yr', 'unc95_5yr']
df = pd.DataFrame([[_num(x) for x in r] for r in rows], columns=cols)
df['year'] = df['year'].astype(int)
text = ' '.join(header)
base = re.search('relative to the\\s+(Jan \\d{4}\\s*-\\s*Dec \\d{4})', text)
run = re.search('analysis was run on ([^%]+?)(?:\\s{2,}|$)', text)
return Table(df, 'deg C (stated in header)', {'base_period': base.group(1) if base else 'not found in header', 'uncertainty': '95% confidence interval (stated in header)' if '95%' in text else 'not stated', 'run_date': run.group(1).strip() if run else None, 'variant_order': 'first columns: air temperature over sea ice; later columns: water temperature under sea ice' if len(cols) == 9 else None})
def gml_text(path: Path, columns: list[str]) -> Table:
lines = _lines(path)
rows = [line.split() for line in lines if line.strip() and (not line.startswith('#'))]
df = pd.DataFrame([[_num(x) for x in r[:len(columns)]] for r in rows], columns=columns)
for col in columns:
if col in ('year', 'month'):
df[col] = df[col].astype(int)
elif col != 'decimal_date':
df.loc[df[col] < 0, col] = np.nan
comments = [line for line in lines if line.startswith('#')]
unit = 'ppm' if any(('ppm' in c for c in comments)) else 'ppb' if any(('ppb' in c for c in comments)) else 'see header'
return Table(df, unit, {'header_lines': len(comments)})
CO2_MONTHLY_COLUMNS = ['year', 'month', 'decimal_date', 'average', 'deseasonalized', 'ndays', 'sdev', 'unc']
ANNUAL_MEAN_COLUMNS = ['year', 'mean', 'unc']
def aggi(path: Path) -> Table:
df = pd.read_csv(path)
df.columns = ['year', 'co2', 'ch4', 'n2o', 'cfc_major', 'hcfc', 'hfc_minor', 'total_wm2', 'co2eq_ppm', 'aggi_1990_1', 'change_pct']
return Table(df, 'W m-2 (radiative forcing, NOAA AGGI table); co2eq_ppm in ppm', {'note': 'column meanings from the AGGI web page'})
def scripps_monthly(path: Path) -> Table:
lines = _lines(path)
comments = [line.strip().strip('"').strip() for line in lines if line.startswith('"')]
unit_row = next((line for line in lines if 'per-mil' in line or 'per meg' in line.lower() or 'per-meg' in line.lower()), '')
rows = []
for line in lines:
parts = [p.strip() for p in line.split(',')]
if line.startswith('"') or not parts[0].isdigit() or len(parts) < 10:
continue
rows.append([int(parts[0]), int(parts[1])] + [_num(p, (-99.99,)) for p in parts[2:10]])
cols = ['year', 'month', 'excel_date', 'decimal_date', 'value', 'value_sa', 'fit', 'fit_sa', 'value_filled', 'value_sa_filled']
units = 'per mil' if 'per-mil' in unit_row else 'per meg' if unit_row else 'not found'
if units == 'not found' and any(('per-meg' in c.lower() for c in comments)):
units = 'per meg (from comment block)'
return Table(pd.DataFrame(rows, columns=cols), units, {'comment_lines': comments})
def ncei_paleo_tab(path: Path) -> Table:
lines = [line for line in _lines(path) if line.strip() and (not line.startswith('#'))]
header = lines[0].split('\t')
rows = [[_num(x) for x in line.split('\t')] for line in lines[1:]]
df = pd.DataFrame(rows, columns=[h.strip() for h in header])
return Table(df, 'ppm (co2_ppm); years BP = before 1950 (age_gas_calBP)', {'columns': header})
IAP_COLUMNS = ['year', 'month', 'ohc_0_700', 'ohc_0_700_smooth', 'ohc_0_700_err', 'ohc_700_2000', 'ohc_700_2000_smooth', 'ohc_700_2000_err', 'ohc_0_2000', 'ohc_0_2000_smooth', 'ohc_0_2000_err', 'ohc_2000_6000', 'ohc_2000_6000_smooth', 'ohc_2000_6000_err']
def iap_ohc(path: Path) -> Table:
lines = _lines(path)
header = next((line for line in lines if line.startswith('[year]')))
expected = '[year] [month] [OHC0-700m] [Smoothed OHC0-700m] [Error, 95% CI is OHC+/-Error]'
if not header.startswith(expected):
raise ValueError(f'IAP column header changed: {header[:120]}')
rows = [[_num(x) for x in line.split()] for line in lines if line.strip()[:1].isdigit()]
df = pd.DataFrame(rows, columns=IAP_COLUMNS)
df[['year', 'month']] = df[['year', 'month']].astype(int)
comments = ' '.join((line.strip('% ') for line in lines if line.startswith('%')))
base = re.search('Baseline:\\s*(\\d{4}-\\d{4})', comments)
return Table(df, "10^22 J (stated: 'unit of OHC: *10^22 Joules'); error = 95% CI half-width", {'base_period': base.group(1) if base else None, 'reliability_note': 'Reliable records are after 1955' if 'after 1955' in comments else None})
def lisird_tsi(path: Path) -> Table:
df = pd.read_csv(path)
df.columns = ['days_since_1610', 'tsi', 'unc']
df['date'] = pd.Timestamp('1610-01-01') + pd.to_timedelta(df['days_since_1610'], unit='D')
df['year'] = df['date'].dt.year
return Table(df, 'W m-2 (from header)', {})
def uah(path: Path) -> Table:
lines = _lines(path)
names, region = ([], '')
for token in lines[0].split():
if token in ('Land', 'Ocean'):
names.append(f'{region}_{token.lower()}')
else:
region = token.lower()
names.append(region)
rows = [line.split() for line in lines[1:] if re.match('^\\s*\\d{4}\\s+\\d{1,2}\\s', line)]
df = pd.DataFrame([[_num(x) for x in r[:len(names)]] for r in rows], columns=names)
df = df.rename(columns={'mo': 'month'})
df[['year', 'month']] = df[['year', 'month']].astype(int)
return Table(df, 'deg C anomaly (UAH documentation; not in file)', {'columns': names})
def rss(path: Path) -> Table:
lines = _lines(path)
top, bottom = (lines[0].split()[2:], lines[1].split())
bands = [(a + b).replace('//', '/').rstrip('/').replace('Cont.USA', 'conus') for a, b in zip(top, bottom)]
rows = [line.split() for line in lines if re.match('^\\s*\\d{4}\\s+\\d{1,2}\\s', line)]
df = pd.DataFrame([[_num(x, (-99.9, -99.99, -9999.0)) for x in r[:2 + len(bands)]] for r in rows], columns=['year', 'month'] + bands)
df[['year', 'month']] = df[['year', 'month']].astype(int)
return Table(df, 'K anomaly (RSS documentation; not in file)', {'bands': bands})
def psmsl_rlr(path: Path) -> Table:
rows = []
for line in _lines(path):
parts = [p.strip() for p in line.split(';')]
if len(parts) >= 4 and parts[0]:
rows.append((float(parts[0]), _num(parts[1], (-99999.0,)), parts[2], parts[3]))
df = pd.DataFrame(rows, columns=['time', 'mm', 'flag_a', 'flag_b'])
return Table(df, "mm relative to the station's Revised Local Reference datum (PSMSL)", {})
def star_gmsl(path: Path) -> Table:
lines = _lines(path)
comments = [line.lstrip('#').strip() for line in lines if line.startswith('#')]
df = pd.read_csv(io.StringIO('\n'.join((line for line in lines if not line.startswith('#')))))
long = df.melt(id_vars='year', var_name='mission', value_name='mm').dropna()
long = long.rename(columns={'year': 'time'}).sort_values('time').reset_index(drop=True)
trend = next((c for c in comments if c.startswith('trend')), None)
return Table(long, 'mm (NOAA LSA; annual signals removed, no GIA correction per header)', {'comments': comments, 'stated_trend': trend})
def nsidc_extent(path: Path) -> Table:
df = pd.read_csv(path, skipinitialspace=True)
df.columns = [c.strip() for c in df.columns]
df = df.rename(columns={'mo': 'month'}).replace(-9999, np.nan)
return Table(df, '10^6 km^2 (NSIDC Sea Ice Index documentation)', {})
def wgms_ref(path: Path) -> Table:
df = pd.read_csv(path)
df.columns = ['year', 'n_glaciers', 'mb_mm_we', 'cum_mm_we_rel_1970']
return Table(df, 'mm water equivalent (WGMS)', {})
def _acis_value(entry) -> float:
value = entry[0] if isinstance(entry, list) else entry
match = re.fullmatch('\\s*(-?\\d+(?:\\.\\d+)?)[A-Z]?\\s*', str(value))
return float(match.group(1)) if match else np.nan
def acis_threadex(path: Path) -> Table:
data = json.loads(Path(path).read_text(encoding='utf-8'))
rows = []
for date, maxt, mint in data['data']:
rows.append((date, _acis_value(maxt), maxt[1] if isinstance(maxt, list) else '', _acis_value(mint), mint[1] if isinstance(mint, list) else ''))
df = pd.DataFrame(rows, columns=['date', 'maxt', 'maxt_sid', 'mint', 'mint_sid'])
df['date'] = pd.to_datetime(df['date'])
return Table(df, 'whole degrees F (ACIS default units)', {'meta': data.get('meta', {})})
def acis_grid_annual(path: Path) -> Table:
data = json.loads(Path(path).read_text(encoding='utf-8'))
if 'error' in data:
raise ValueError(data['error'])
df = pd.DataFrame(data['data'], columns=['year', 'avgt', 'maxt', 'mint'])
df['year'] = df['year'].astype(int)
for col in ('avgt', 'maxt', 'mint'):
df[col] = pd.to_numeric(df[col], errors='coerce').replace(-999, np.nan)
return Table(df, 'degrees F (ACIS default units)', {})
def acis_stnmeta(path: Path) -> Table:
stations = json.loads(Path(path).read_text(encoding='utf-8'))['meta']
rows = []
for s in stations:
ranges = s.get('valid_daterange') or [[]]
maxt = ranges[0] if ranges and len(ranges[0]) == 2 else [None, None]
ll = s.get('ll') or [None, None]
rows.append({'name': s.get('name'), 'sids': ' '.join(s.get('sids', [])), 'lon': ll[0], 'lat': ll[1], 'elev_ft': s.get('elev'), 'maxt_start': maxt[0], 'maxt_end': maxt[1]})
return Table(pd.DataFrame(rows), 'elev in feet; ll = [lon, lat]', {})
def caladapt_events(path: Path) -> Table:
data = json.loads(Path(path).read_text(encoding='utf-8'))
df = pd.DataFrame({'year': pd.to_datetime(data['index']).year, 'value': data['data']})
return Table(df, 'not stated in events response (see series metadata)', {'name': data.get('name')})
def cdec_station_search(path: Path) -> list[dict]:
text = Path(path).read_text(encoding='utf-8', errors='replace')
rows = []
for row in re.findall('<tr[^>]*>(.*?)</tr>', text, flags=re.S | re.I):
cells = [html.unescape(re.sub('<[^>]+>', '', c)).strip() for c in re.findall('<td[^>]*>(.*?)</td>', row, flags=re.S | re.I)]
if len(cells) >= 8 and re.fullmatch('[A-Z0-9]{3}', cells[0]):
rows.append({'id': cells[0], 'name': cells[1], 'basin': cells[2], 'county': cells[3], 'lon': float(cells[4]), 'lat': float(cells[5]), 'elev_ft': float(cells[6].replace(',', '')), 'operator': cells[7]})
return rows
def cdec_monthly(path: Path) -> Table:
raw = pd.read_csv(path, dtype=str, keep_default_na=False)
df = pd.DataFrame({'station': raw['STATION_ID'], 'nominal': pd.to_datetime(raw['DATE TIME'].str[:8], format='%Y%m%d', errors='coerce'), 'observed': pd.to_datetime(raw['OBS DATE'].str[:8], format='%Y%m%d', errors='coerce'), 'value': pd.to_numeric(raw['VALUE'], errors='coerce'), 'flag': raw['DATA_FLAG'].str.strip()})
units = sorted(set(raw['UNITS'].str.strip()) - {''})
return Table(df, ', '.join(units) or 'not stated', {'sensor': sorted(set(raw['SENSOR_TYPE']))})
def frap_by_year(path: Path) -> Table:
data = json.loads(Path(path).read_text(encoding='utf-8'))
rows = [(f['attributes'].get('YEAR_'), f['attributes']['acres'], f['attributes']['n_fires']) for f in data['features']]
df = pd.DataFrame(rows, columns=['year', 'acres', 'n_fires'])
return Table(df, 'acres (GIS_ACRES summed by YEAR_)', {})
def frap_fires(path: Path) -> Table:
data = json.loads(Path(path).read_text(encoding='utf-8'))
df = pd.DataFrame([f['attributes'] for f in data['features']])
for col in ('ALARM_DATE', 'CONT_DATE'):
if col in df:
df[col] = pd.to_datetime(df[col], unit='ms', utc=True).dt.date
return Table(df, 'acres (GIS_ACRES)', {})
MONTHS = '(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec|Sp-Oc|Jl-Au)'
def hrd_us_hurricanes(path: Path) -> Table:
text = Path(path).read_text(encoding='utf-8', errors='replace')
text = re.sub('(?i)</t[dh]>', '\t', text)
text = re.sub('(?i)</tr>|<br\\s*/?>', '\n', text)
text = html.unescape(re.sub('<[^>]+>', '', text))
rows = []
for line in text.splitlines():
match = re.match(f'^\\s*(\\d{{4}})\\s+(None|{MONTHS})\\b\\s*(.*)$', line)
if not match:
continue
year, month, rest = (int(match.group(1)), match.group(2), match.group(3))
if month == 'None':
rows.append((year, None, '', np.nan, ''))
continue
states = rest.split('\t')[0].strip()
cats = [int(c) for c in re.findall('(?:,\\s*|[NSCEW])([1-5])(?!\\d)', states)]
flag = next((ch for ch in '*#&' if ch in states[:3]), '')
rows.append((year, month, states, float(max(cats)) if cats else np.nan, flag))
df = pd.DataFrame(rows, columns=['year', 'month', 'states', 'max_category', 'flag'])
return Table(df, 'Saffir-Simpson category (1-5)', {'title_found': 'Hurricane Impacts/Landfalls' in text})
def badc_csv(path: Path) -> Table:
lines = _lines(path)
i_data = next((i for i, line in enumerate(lines) if line.split(',')[0].strip().lower() == 'data'))
names, units, glob = ({}, {}, {})
for parts in csv.reader(lines[:i_data]):
if len(parts) >= 3 and parts[0] == 'long_name':
names[parts[1]] = parts[2]
units[parts[1]] = parts[3] if len(parts) > 3 else ''
elif len(parts) >= 3 and parts[1] == 'G':
glob.setdefault(parts[0], []).append(parts[2])
col_ids = [c for c in lines[i_data + 1].split(',') if c.strip()]
rows = []
for line in lines[i_data + 2:]:
if line.startswith('end_data'):
break
parts = line.split(',')[:len(col_ids)]
rows.append([_num(p, (1e+20,)) for p in parts])
df = pd.DataFrame(rows, columns=[names.get(c, f'col{c}') for c in col_ids])
first = df.columns[0]
df[first] = df[first].astype(int)
return Table(df.sort_values(first).reset_index(drop=True), '; '.join(sorted({u for u in units.values() if u})) or 'not stated', {'global': glob, 'column_units': {names.get(k, k): v for k, v in units.items()}})
def zip_member_csv(path: Path, suffix: str, **read_kw) -> Table:
import zipfile
with zipfile.ZipFile(path) as archive:
name = next((n for n in archive.namelist() if n.endswith(suffix)))
with archive.open(name) as handle:
df = pd.read_csv(handle, **read_kw)
meta_name = name.rsplit('.', 1)[0] + '.metadata.yml'
meta_text = archive.read(meta_name).decode('utf-8') if meta_name in archive.namelist() else ''
return Table(df, 'see metadata', {'member': name, 'metadata_yml': meta_text})
def homr_station(path: Path) -> dict:
return json.loads(Path(path).read_text(encoding='utf-8'))['stationCollection']['stations'][0]
def oldmodels_csv(path: Path) -> Table:
return Table(pd.read_csv(path, index_col=0), 'deg C per year (trends) / dimensionless (skill)', {'source': 'hausfath/OldModels data/interim'})
scripts/lib/stats.py197 lines
from __future__ import annotations
import itertools
import math
import numpy as np
from scipy import stats as sps
from scipy.special import gammaln
MIN_N_EFF = 10
MIN_VALID_PER_DECADE = 8
def _clean(x, y) -> tuple[np.ndarray, np.ndarray]:
x, y = (np.asarray(x, dtype=float), np.asarray(y, dtype=float))
keep = np.isfinite(x) & np.isfinite(y)
return (x[keep], y[keep])
def lag_autocorr(e: np.ndarray, lag: int=1) -> float:
e = np.asarray(e, dtype=float) - np.mean(e)
denom = float(np.sum(e * e))
return float(np.sum(e[lag:] * e[:-lag]) / denom) if denom > 0 and len(e) > lag else 0.0
def ols_trend(x, y) -> dict:
x, y = _clean(x, y)
n = len(x)
if n < 3:
raise ValueError('need at least 3 points for a trend')
xm = x - x.mean()
sxx = float(np.sum(xm * xm))
slope = float(np.sum(xm * (y - y.mean())) / sxx)
intercept = float(y.mean() - slope * x.mean())
resid = y - (intercept + slope * x)
sse = float(np.sum(resid * resid))
se_ols = math.sqrt(sse / (n - 2) / sxx)
r1 = lag_autocorr(resid, 1)
n_eff = n * (1 - r1) / (1 + r1) if r1 > 0 else float(n)
out = {'slope': slope, 'intercept': intercept, 'n': n, 'x_start': float(x.min()), 'x_end': float(x.max()), 'se_ols': se_ols, 'r1': r1, 'n_eff': n_eff, 'insufficient': n_eff < MIN_N_EFF}
if n_eff > 2:
se_ar1 = math.sqrt(sse / (n_eff - 2) / sxx)
tcrit = float(sps.t.ppf(0.975, n_eff - 2))
out.update(se_ar1=se_ar1, ci_low=slope - tcrit * se_ar1, ci_high=slope + tcrit * se_ar1, p_ar1=float(2 * sps.t.sf(abs(slope / se_ar1), n_eff - 2)))
else:
out.update(se_ar1=math.nan, ci_low=math.nan, ci_high=math.nan, p_ar1=math.nan)
r2 = lag_autocorr(resid, 2)
phi = r2 / r1 if r1 > 0 else math.nan
nu = 1 + 2 * r1 / (1 - phi) if r1 > 0 and np.isfinite(phi) and (-1 < phi < 1) else math.nan
if np.isfinite(nu):
se_arma = se_ols * math.sqrt(nu)
tcrit = float(sps.t.ppf(0.975, n - 2))
out.update(arma_nu=nu, ci_low_arma=slope - tcrit * se_arma, ci_high_arma=slope + tcrit * se_arma)
else:
out.update(arma_nu=math.nan, ci_low_arma=math.nan, ci_high_arma=math.nan)
return out
def trend_difference(x, y1, y2) -> dict:
x, y1, y2 = (np.asarray(v, dtype=float) for v in (x, y1, y2))
return ols_trend(x, y1 - y2)
def mean_with_se(y) -> tuple[float, float, float]:
y = np.asarray(y, dtype=float)
y = y[np.isfinite(y)]
r1 = lag_autocorr(y - y.mean(), 1)
n_eff = len(y) * (1 - r1) / (1 + r1) if r1 > 0 else float(len(y))
return (float(y.mean()), float(y.std(ddof=1) / math.sqrt(n_eff)), n_eff)
def mean_ci(y, level: float=0.95) -> dict:
mean, se, n_eff = mean_with_se(y)
tcrit = float(sps.t.ppf(0.5 + level / 2, max(n_eff - 1, 1)))
n = int(np.isfinite(np.asarray(y, dtype=float)).sum())
return {'mean': mean, 'ci_low': mean - tcrit * se, 'ci_high': mean + tcrit * se, 'n': n, 'n_eff': n_eff}
def period_mean_difference(x, y, first: tuple[int, int], last: tuple[int, int]) -> dict:
x, y = _clean(x, y)
a = y[(x >= first[0]) & (x <= first[1])]
b = y[(x >= last[0]) & (x <= last[1])]
ma, sa, na = mean_with_se(a)
mb, sb, nb = mean_with_se(b)
se = math.sqrt(sa * sa + sb * sb)
tcrit = float(sps.t.ppf(0.975, max(min(na, nb) - 1, 1)))
diff = mb - ma
return {'difference': diff, 'ci_low': diff - tcrit * se, 'ci_high': diff + tcrit * se, 'first_mean': ma, 'last_mean': mb, 'first_n': int(len(a)), 'last_n': int(len(b)), 'first_n_eff': na, 'last_n_eff': nb, 'n_eff': min(na, nb), 'first_period': list(first), 'last_period': list(last)}
def lowess(x, y, frac: float=0.3, iterations: int=3) -> np.ndarray:
x, y = (np.asarray(x, dtype=float), np.asarray(y, dtype=float))
n = len(x)
k = max(3, int(math.ceil(frac * n)))
fitted = np.zeros(n)
robust = np.ones(n)
for _ in range(iterations + 1):
for i in range(n):
dist = np.abs(x - x[i])
h = np.sort(dist)[k - 1]
w = np.clip(1 - (dist / h) ** 3, 0, None) ** 3 if h > 0 else (dist == 0).astype(float)
w = w * robust
sw = w.sum()
xm, ym = ((w * x).sum() / sw, (w * y).sum() / sw)
sxx = (w * (x - xm) ** 2).sum()
beta = (w * (x - xm) * (y - ym)).sum() / sxx if sxx > 0 else 0.0
fitted[i] = ym + beta * (x[i] - xm)
resid = y - fitted
s = np.median(np.abs(resid))
if s == 0:
break
u = resid / (6 * s)
robust = np.clip(1 - u * u, 0, None) ** 2
return fitted
def decadal_means(years, values, min_count: int=8) -> list[dict]:
years, values = _clean(years, values)
out = []
for start in range(int(years.min() // 10 * 10), int(years.max()) + 1, 10):
sel = values[(years >= start) & (years < start + 10)]
if len(sel) >= min_count:
out.append({'decade': start, 'mean': float(sel.mean()), 'n': int(len(sel))})
return out
def sparsest_decade(years) -> tuple[int, int]:
present = sorted({int(y) for y in np.asarray(years, dtype=float) if np.isfinite(y)})
if not present:
return (0, 0)
first, last = (present[0], present[-1])
if last - first < 9:
return (len(present), first)
have = set(present)
return min(((sum((y in have for y in range(start, start + 10))), start) for start in range(first, last - 8)))
def poisson_trend(x, counts) -> dict:
x, c = _clean(x, counts)
X = np.column_stack([np.ones_like(x), x - x.mean()])
beta = np.array([math.log(max(c.mean(), 1e-09)), 0.0])
for _ in range(100):
mu = np.exp(X @ beta)
z = X @ beta + (c - mu) / mu
W = mu
new = np.linalg.solve(X.T @ (W[:, None] * X), X.T @ (W * z))
if np.max(np.abs(new - beta)) < 1e-12:
beta = new
break
beta = new
mu = np.exp(X @ beta)
cov = np.linalg.inv(X.T @ (mu[:, None] * X))
se = math.sqrt(cov[1, 1])
def loglik(m):
return float(np.sum(c * np.log(np.where(m > 0, m, 1e-300)) - m - gammaln(c + 1)))
lr = 2 * (loglik(mu) - loglik(np.full_like(c, c.mean())))
dispersion = float(np.sum((c - mu) ** 2 / mu) / (len(c) - 2))
b = float(beta[1])
qse = se * math.sqrt(max(dispersion, 1.0))
return {'slope_log': b, 'se': se, 'lr_stat': lr, 'p_lr': float(sps.chi2.sf(lr, 1)), 'dispersion': dispersion, 'n': int(len(c)), 'mean_count': float(c.mean()), 'rate_ratio_per_unit': math.exp(b), 'rate_ratio_per_100': math.exp(100 * b), 'rr100_ci_low': math.exp(100 * (b - 1.96 * se)), 'rr100_ci_high': math.exp(100 * (b + 1.96 * se)), 'rr10_quasi': math.exp(10 * b), 'rr10_quasi_ci_low': math.exp(10 * (b - 1.96 * qse)), 'rr10_quasi_ci_high': math.exp(10 * (b + 1.96 * qse))}
def brown_forsythe(a, b) -> dict:
a, b = (np.asarray(a, dtype=float), np.asarray(b, dtype=float))
a, b = (a[np.isfinite(a)], b[np.isfinite(b)])
stat, p = sps.levene(a, b, center='median')
return {'statistic': float(stat), 'p': float(p), 'sd_a': float(a.std(ddof=1)), 'sd_b': float(b.std(ddof=1)), 'cv_a': float(a.std(ddof=1) / a.mean()), 'cv_b': float(b.std(ddof=1) / b.mean()), 'mean_a': float(a.mean()), 'mean_b': float(b.mean()), 'n_a': int(len(a)), 'n_b': int(len(b))}
def _hinge_design(x: np.ndarray, breaks: tuple[float, ...]) -> np.ndarray:
cols = [np.ones_like(x), x - x.mean()] + [np.clip(x - b, 0, None) for b in breaks]
return np.column_stack(cols)
def _ar1_fit(X: np.ndarray, y: np.ndarray, iterations: int=20) -> tuple[float, float, int]:
beta = np.linalg.lstsq(X, y, rcond=None)[0]
rho = 0.0
for _ in range(iterations):
e = y - X @ beta
rho_new = float(np.clip(lag_autocorr(e, 1), -0.95, 0.95))
ys, Xs = (y[1:] - rho_new * y[:-1], X[1:] - rho_new * X[:-1])
beta = np.linalg.lstsq(Xs, ys, rcond=None)[0]
if abs(rho_new - rho) < 1e-08:
rho = rho_new
break
rho = rho_new
ys, Xs = (y[1:] - rho * y[:-1], X[1:] - rho * X[:-1])
resid = ys - Xs @ beta
return (float(np.sum(resid * resid)), rho, len(ys))
def changepoint_bic(x, y, max_breaks: int=2, min_segment: int=8) -> dict:
x, y = _clean(x, y)
order = np.argsort(x)
x, y = (x[order], y[order])
candidates = [float(v) for v in x[min_segment - 1:len(x) - min_segment]]
results = {}
for k in range(max_breaks + 1):
best = None
for breaks in itertools.combinations(candidates, k):
if k and any((b2 - b1 < min_segment for b1, b2 in zip(breaks, breaks[1:]))):
continue
sse, rho, n = _ar1_fit(_hinge_design(x, breaks), y)
params = 2 + 2 * k + 2
bic = n * math.log(sse / n) + params * math.log(n)
if best is None or bic < best['bic']:
best = {'breaks': list(breaks), 'bic': bic, 'rho': rho, 'sse': sse, 'params': params}
results[k] = best
chosen = 0
for k in range(1, max_breaks + 1):
if results[k]['bic'] <= results[chosen]['bic'] - 2:
chosen = k
return {'models': {str(k): v for k, v in results.items()}, 'selected_breaks': chosen, 'selected': results[chosen], 'n': int(len(x))}
scripts/process/__main__.py37 lines
from __future__ import annotations
import argparse
import importlib
import sys
import time
import warnings
STEPS = ['validate_raw', 'global_temp', 'absolute_temp', 'us_ca', 'seasonality', 'california_drought', 'stations', 'ghg', 'carbon_sources', 'ocean_solar', 'forcing_breakdown', 'energy_flows', 'satellite', 'sealevel_ice', 'attribution_models', 'hydro_fire_snow', 'hurricanes', 'ghcnm_adjustments', 'response', 'provenance']
def main(argv: list[str] | None=None) -> int:
parser = argparse.ArgumentParser(description='Run processing steps.')
parser.add_argument('--only', help='comma-separated step names')
args = parser.parse_args(argv)
wanted = set(args.only.split(',')) if args.only else None
warnings.filterwarnings('ignore', category=Warning, module='pandas')
failed = []
for step in STEPS:
if wanted and step not in wanted:
continue
try:
module = importlib.import_module(f'scripts.process.{step}')
except ModuleNotFoundError as exc:
if exc.name == f'scripts.process.{step}':
print(f'[{step}] NOT IMPLEMENTED')
failed.append(step)
continue
raise
start = time.perf_counter()
code = module.main()
print(f'[{step}] exit {code} in {time.perf_counter() - start:.1f}s')
if code:
failed.append(step)
if failed:
print('failed steps:', ', '.join(failed))
return 1 if failed else 0
if __name__ == '__main__':
sys.exit(main())
scripts/process/absolute_temp.py42 lines
from __future__ import annotations
import re
import pandas as pd
from scripts.lib import readers as R
from scripts.lib.io import PROCESSED, Numbers, write_table
SCRIPT = 'scripts/process/absolute_temp.py'
SRC = {'berkeley': 'berkeley/Land_and_Ocean_summary.txt'}
GLOBAL_TABLE = 'data/processed/global_temperature_annual.csv'
BASE = (1951, 1980)
PRE = (1850, 1900)
RECENT = (2015, 2024)
HEADER = re.compile('Using (air temperature above sea ice|water temperature below sea ice):\\s*([0-9]+\\.[0-9]+)\\s*\\+/-\\s*([0-9]+\\.[0-9]+)')
VARIANTS = {'air temperature above sea ice': 'air', 'water temperature below sea ice': 'water'}
def published_levels() -> dict[str, tuple[float, float]]:
text = (R.RAW / SRC['berkeley']).read_text(encoding='utf-8', errors='replace')
found = {VARIANTS[m.group(1)]: (float(m.group(2)), float(m.group(3))) for m in HEADER.finditer(text)}
if set(found) != set(VARIANTS.values()):
raise ValueError(f"{SRC['berkeley']}: expected both published 1951–1980 absolute estimates in the header, found {sorted(found)}")
return found
def main() -> int:
num = Numbers('absolute_temp', SCRIPT)
levels = published_levels()
anomaly = pd.read_csv(PROCESSED / 'global_temperature_annual.csv').set_index('year')['mean_available']
on_base = anomaly - anomaly.loc[BASE[0]:BASE[1]].mean()
table = pd.DataFrame({'year': anomaly.index, 'anomaly_vs_1951_1980_c': on_base.values, 'absolute_air_over_ice_c': (on_base + levels['air'][0]).values, 'absolute_water_under_ice_c': (on_base + levels['water'][0]).values})
write_table(table, 'global_absolute_temperature', script=SCRIPT, inputs=[GLOBAL_TABLE, SRC['berkeley']], units={'year': 'year', 'anomaly_vs_1951_1980_c': 'degC', 'absolute_air_over_ice_c': 'degC', 'absolute_water_under_ice_c': 'degC'}, baseline="1951-1980 (the period Berkeley Earth's absolute estimates describe)", description="Global mean surface temperature in absolute terms: the mean of the records available in on Berkeley Earth's two published estimates of the 1951–1980 absolute level.", method='The anomaly is re-baselined to its own 1951–1980 mean, then each published 1951–1980 level is added. The two absolute columns therefore differ by a constant.', notes=['Three records cover 1850–1879 and four cover 1880 onward, because GISTEMP begins in 1880.', "The two levels differ only in how sea-ice regions are measured (air above the ice or water below it). Each estimate's stated uncertainty is far smaller than the gap between them.", "The mean runs to the last year any record reports; Berkeley's own series ends in 2024."])
names = {'air': 'air temperature above sea ice', 'water': 'water temperature below sea ice'}
for key, (level, err) in levels.items():
num.add(f'level_1951_1980_{key}', level, units='degC', decimals=1, kind='abs_temp', inputs=[SRC['berkeley']], description=f"Berkeley Earth's estimate of the absolute 1951–1980 global mean, using {names[key]}")
num.add(f'level_1951_1980_{key}_uncertainty', err, units='degC', decimals=2, kind='delta_temp', inputs=[SRC['berkeley']], description=f'Uncertainty Berkeley Earth states for its 1951–1980 level using {names[key]}')
num.add('level_gap_water_minus_air', levels['water'][0] - levels['air'][0], units='degC', decimals=1, kind='delta_temp', inputs=[SRC['berkeley']], description='How much the absolute 1951–1980 level changes with the treatment of sea-ice regions')
for label, (a, b) in (('1850_1900', PRE), ('2015_2024', RECENT)):
value = float(on_base.loc[a:b].mean() + levels['air'][0])
num.add(f'air.mean_{label}', value, units='degC', decimals=1, kind='abs_temp', inputs=[GLOBAL_TABLE, SRC['berkeley']], description=f'Absolute global mean surface temperature, {a}–{b} average (air-over-sea-ice level)')
num.save()
print(f'absolute_temp: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/attribution_models.py68 lines
from __future__ import annotations
import ast
import pandas as pd
from scripts.lib import readers as R
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/attribution_models.py'
MCA = (950, 1250)
SRC = {'spm1b': 'ar6_spm1/panel_b_gmst_changes_model_and_obs.csv', 'recon': 'ar6_spm1/panel_a_SPM1_1-2000_recon.csv', 'diffs': 'oldmodels/model_obs_time_diffs.csv', 'obs_time': 'oldmodels/obs_time_trends.csv', 'single': 'oldmodels/single_model_trends.csv', 'tcr_skill': 'oldmodels/model_tcr_skill_scores.csv'}
def timeframe(text: str) -> tuple[int, int]:
text = str(text).strip()
if text.startswith('['):
a, b = ast.literal_eval(text)
else:
a, b = (int(x) for x in text.split(' to '))
return (int(a), int(b))
def main() -> int:
num = Numbers('attribution', SCRIPT)
b = R.badc_csv(R.RAW / SRC['spm1b']).df.rename(columns={'Year': 'year', 'gsta_black_obs': 'observed', 'gsta_brown_line_hist_ssp245': 'human_and_natural', 'gsta_brown_shading_bottom_hist_ssp245': 'human_and_natural_low', 'gsta_brown_shading_top_hist_ssp245': 'human_and_natural_high', 'gsta_green_line_hist_nat': 'natural_only', 'gsta_green_shading_bottom_hist_nat': 'natural_only_low', 'gsta_green_shading_top_hist_nat': 'natural_only_high'})
write_table(b, 'attribution_ar6_spm1b', script=SCRIPT, inputs=[SRC['spm1b']], units={c: 'year' if c == 'year' else 'degC' for c in b.columns}, baseline='1850-1900 (AR6)', description='IPCC AR6 WG1 Figure SPM.1b data: observed global surface temperature change and CMIP6 simulations with human and natural forcings or natural forcings only (ranges as published: 5–95% over the ensemble).', notes=['Model values end in 2019; observations in 2020.'])
b = b.set_index('year')
for col in ('observed', 'human_and_natural', 'natural_only'):
num.add(f'spm1b.{col}_2010_2019', b.loc[2010:2019, col].mean(), units='degC', decimals=2, kind='delta_temp', inputs=[SRC['spm1b']], description=f"AR6 SPM.1b {col.replace('_', ' ')}: mean 2010–2019 relative to 1850–1900")
rec = R.badc_csv(R.RAW / SRC['recon']).df.rename(columns={'Year': 'year', 'Temperature': 'reconstruction', '5th percentile': 'p05', '95th percentile': 'p95'})
write_table(rec, 'paleo_reconstruction_1_2000', script=SCRIPT, inputs=[SRC['recon']], units={'year': 'year CE', 'reconstruction': 'degC', 'p05': 'degC', 'p95': 'degC'}, baseline='1850-1900 (AR6)', description='Global surface temperature reconstruction for years 5–1995 CE (decadal smoothing), PAGES 2k Consortium 2019 as plotted in AR6 SPM.1a.')
rec = rec.set_index('year')
pre = rec.loc[:1849]
num.add('recon.max_before_1850', pre.reconstruction.max(), units='degC', decimals=2, kind='delta_temp', inputs=[SRC['recon']], description='Warmest decadal-smoothed global value in the reconstruction before 1850 (relative to 1850–1900)')
num.add('recon.max_before_1850_p95', pre.loc[pre.reconstruction.idxmax(), 'p95'], units='degC', decimals=2, kind='delta_temp', inputs=[SRC['recon']], description='95th percentile at that warmest pre-1850 point')
num.add('recon.max_before_1850_year', int(pre.reconstruction.idxmax()), units='year CE', decimals=0, kind='year', inputs=[SRC['recon']], description='Year of the warmest pre-1850 value in the reconstruction')
num.add('recon.highest_p95_before_1850', pre.p95.max(), units='degC', decimals=2, kind='delta_temp', inputs=[SRC['recon']], description='Highest 95th-percentile value anywhere before 1850')
num.add('recon.highest_p95_before_1850_year', int(pre.p95.idxmax()), units='year CE', decimals=0, kind='year', inputs=[SRC['recon']], description='Year of the highest 95th-percentile value before 1850')
mca = rec.loc[MCA[0]:MCA[1]]
num.add('recon.mca_max', mca.reconstruction.max(), units='degC', decimals=2, kind='delta_temp', inputs=[SRC['recon']], description=f'Warmest decadal-smoothed global value in {MCA[0]}–{MCA[1]} CE (relative to 1850–1900)')
num.add('recon.mca_max_p95', mca.p95.max(), units='degC', decimals=2, kind='delta_temp', inputs=[SRC['recon']], description=f'Highest 95th-percentile value in {MCA[0]}–{MCA[1]} CE')
diffs = R.oldmodels_csv(R.RAW / SRC['diffs']).df
obs = R.oldmodels_csv(R.RAW / SRC['obs_time']).df
single = R.oldmodels_csv(R.RAW / SRC['single']).df
skill = R.oldmodels_csv(R.RAW / SRC['tcr_skill']).df
obs['span'] = obs['timeframe'].map(timeframe)
single['span'] = single['timeframe'].map(timeframe)
diffs['span'] = diffs['timeframe'].map(timeframe)
rows = []
for _, d in diffs.iterrows():
model_row = single[(single.model == d.model) & (single.dtype == 'model_time')]
obs_row = obs[obs.span == d.span]
if model_row.empty or obs_row.empty:
raise ValueError(f'missing model or observation trend for {d.model} {d.span}')
tcr = skill[skill.model == d.model]
rows.append({'model': d.model, 'start': d.span[0], 'end': d.span[1], 'model_trend_per_decade': 10 * float(model_row.coef.iloc[0]), 'obs_trend_per_decade': 10 * float(obs_row.coef_mean.iloc[0]), 'obs_trend_low': 10 * float(obs_row.coef_low.iloc[0]), 'obs_trend_high': 10 * float(obs_row.coef_high.iloc[0]), 'diff_per_decade': 10 * d.coef_mean, 'diff_low': 10 * d.coef_low, 'diff_high': 10 * d.coef_high, 'consistent_time_based': bool(d.coef_low <= 0 <= d.coef_high), 'tcr_skill_median': float(tcr.skill_median.iloc[0]) if not tcr.empty else float('nan')})
table = pd.DataFrame(rows)
write_table(table, 'model_projection_skill', script=SCRIPT, inputs=[SRC[k] for k in ('diffs', 'obs_time', 'single', 'tcr_skill')], units={'model': 'id', 'start': 'year', 'end': 'year', 'model_trend_per_decade': 'degC/decade', 'obs_trend_per_decade': 'degC/decade', 'obs_trend_low': 'degC/decade', 'obs_trend_high': 'degC/decade', 'diff_per_decade': 'degC/decade', 'diff_low': 'degC/decade', 'diff_high': 'degC/decade', 'consistent_time_based': 'boolean', 'tcr_skill_median': 'skill score'}, description="Projected vs observed warming rates for climate models published 1970–2007 over each model's evaluation window, from the tables Hausfather et al. (2020) published with their paper.", method="Rows as published by the authors (data/interim); trends converted from °C/yr to °C/decade. 'consistent_time_based' = model-minus-observation 95% interval includes zero.", notes=["These are the raw, time-based comparisons. The paper's forcing-adjusted (implied TCR) comparison is summarised by the skill score column.", "Evaluation windows end in 2017 (the paper's data); they are not extended here."])
num.add('models.n_projections', len(table), units='projections', decimals=0, kind='count', inputs=[SRC['diffs']], description='Model projections in the Hausfather et al. 2020 tables')
num.add('models.n_consistent_time_based', int(table.consistent_time_based.sum()), units='projections', decimals=0, kind='count', inputs=[SRC['diffs']], description='Projections whose warming-rate difference from observations has a 95% interval including zero')
num.add('models.n_too_warm', int((table.diff_low > 0).sum()), units='projections', decimals=0, kind='count', inputs=[SRC['diffs']], description='Projections that warmed significantly faster than observed (time-based)')
num.add('models.n_too_cool', int((table.diff_high < 0).sum()), units='projections', decimals=0, kind='count', inputs=[SRC['diffs']], description='Projections that warmed significantly slower than observed (time-based)')
for scenario in ('a', 'b', 'c'):
row = table[table.model == f'hansen_1988_{scenario}'].iloc[0]
num.add(f'hansen1988_{scenario}.trend', row.model_trend_per_decade, units='degC/decade', decimals=2, kind='delta_temp', inputs=[SRC['single']], description=f'Hansen 1988 scenario {scenario.upper()} projected trend over {row.start}–{row.end}')
hansen_obs = table[table.model == 'hansen_1988_b'].iloc[0]
num.add('hansen1988.obs_trend', hansen_obs.obs_trend_per_decade, units='degC/decade', decimals=2, kind='delta_temp', ci=(hansen_obs.obs_trend_low, hansen_obs.obs_trend_high), inputs=[SRC['obs_time']], description=f"Observed trend over the same window ({hansen_obs.start}–{hansen_obs.end}), per the paper's tables")
num.save()
print(f'attribution_models: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/california_drought.py129 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/california_drought.py'
INDEX_SRC = {'pdsi': 'noaa_cag/CA_pdsi_monthly_1895-2026.csv', 'phdi': 'noaa_cag/CA_phdi_monthly_1895-2026.csv', 'zndx': 'noaa_cag/CA_zndx_monthly_1895-2026.csv'}
DIV_SRC = {d: f'noaa_cag/CA-div{d:02d}_pcp_oct-sep_1896-2026.csv' for d in range(1, 8)}
INDEX_KIND = {'pdsi': 'meteorological', 'phdi': 'hydrological', 'zndx': 'short-term moisture'}
INDEX_NAME = {'pdsi': 'Palmer Drought Severity Index', 'phdi': 'Palmer Hydrological Drought Index', 'zndx': 'Palmer Z-Index (moisture anomaly)'}
DROUGHT = -2.0
DROUGHT_MONTHS = 6
EARLY, LATE = ((1896, 1960), (1961, 2025))
DIVISIONS = {1: 'North Coast Drainage', 2: 'Sacramento Drainage', 3: 'Northeast Interior Basins', 4: 'Central Coast Drainage', 5: 'San Joaquin Drainage', 6: 'South Coast Drainage', 7: 'Southeast Desert Basins'}
NORTH_TO_SOUTH = [1, 3, 2, 5, 4, 6, 7]
def monthly_index(key: str) -> pd.Series:
table = R.cag(R.RAW / INDEX_SRC[key])
frame = table.df.dropna(subset=['value'])
counts = frame.groupby('year')['end_month'].nunique()
whole = counts[counts == 12].index
return frame[frame['year'].isin(whole)].set_index(['year', 'end_month'])['value'].sort_index()
def division_precip(number: int) -> pd.Series:
table = R.cag(R.RAW / DIV_SRC[number])
unexpected = sorted(set(table.df['end_month']) - {9})
if unexpected:
raise ValueError(f'{DIV_SRC[number]}: expected water years ending in September, got {unexpected}')
if 'inch' not in table.units.lower():
raise ValueError(f'{DIV_SRC[number]}: expected inches, got {table.units!r}')
return table.df.dropna(subset=['value']).set_index('year')['value'].sort_index()
def main() -> int:
num = Numbers('drought', SCRIPT)
index_inputs = [INDEX_SRC[k] for k in sorted(INDEX_SRC)]
annual = {}
months_below = {}
for key in INDEX_SRC:
monthly = monthly_index(key)
annual[key] = monthly.groupby(level=0).mean()
months_below[key] = (monthly <= DROUGHT).groupby(level=0).sum()
years = sorted(set.intersection(*(set(s.index) for s in annual.values())))
if not years:
raise ValueError('no calendar year is complete in all three Palmer index files')
rows = []
for year in years:
for key in ('pdsi', 'phdi', 'zndx'):
months = int(months_below[key][year])
rows.append({'year': year, 'index': key, 'kind': INDEX_KIND[key], 'annual_mean': float(annual[key][year]), 'months_at_or_below_threshold': months, 'drought_year': bool(months >= DROUGHT_MONTHS)})
drought_table = pd.DataFrame(rows)
first, last = (years[0], years[-1])
num.add('years.first', first, units='year', decimals=0, kind='year', inputs=index_inputs, description='First calendar year with all twelve monthly values in every Palmer index file')
num.add('years.last', last, units='year', decimals=0, kind='year', inputs=index_inputs, description='Last complete calendar year in the Palmer index files; later months exist but their year is not yet whole, so it is excluded')
num.add('years.n', len(years), units='years', decimals=0, inputs=index_inputs, description='Complete calendar years available in all three Palmer index series')
counts = {}
for key in ('pdsi', 'phdi', 'zndx'):
panel = drought_table[drought_table['index'] == key]
flagged = panel[panel['drought_year']]
counts[key] = len(flagged)
worst = int(panel.sort_values(['months_at_or_below_threshold', 'annual_mean'], ascending=[False, True])['year'].iloc[0])
num.add(f'{key}.n_drought_years', counts[key], units='years', decimals=0, inputs=index_inputs, description=f'Years with at least {DROUGHT_MONTHS} months at or below {DROUGHT} on the {INDEX_NAME[key]} ({INDEX_KIND[key]} drought), {first}–{last}')
num.add(f'{key}.n_years_any_drought_month', int((panel['months_at_or_below_threshold'] > 0).sum()), units='years', decimals=0, inputs=index_inputs, description=f'Years with at least one month at or below {DROUGHT} on the {INDEX_NAME[key]}, {first}–{last}')
num.add(f'{key}.worst_year', worst, units='year', decimals=0, kind='year', inputs=index_inputs, description=f'Year with the most months at or below {DROUGHT} on the {INDEX_NAME[key]}, ties broken by the lower annual mean, {first}–{last}')
num.add(f'{key}.worst_value', float(annual[key][worst]), units='index', decimals=2, inputs=index_inputs, description=f'Annual mean {INDEX_NAME[key]} in that year')
num.add(f'{key}.max_months', int(panel['months_at_or_below_threshold'].max()), units='months', decimals=0, inputs=index_inputs, description=f'Most months of one year at or below {DROUGHT} on the {INDEX_NAME[key]}')
recent = flagged[flagged['year'] >= last - 29]
num.add(f'{key}.n_drought_years_last_30', len(recent), units='years', decimals=0, inputs=index_inputs, description=f'{INDEX_KIND[key].capitalize()} drought years falling in the most recent thirty years ({last - 29}–{last})')
worst = {key: int(drought_table[drought_table['index'] == key].sort_values(['months_at_or_below_threshold', 'annual_mean'], ascending=[False, True])['year'].iloc[0]) for key in ('pdsi', 'phdi')}
if worst['pdsi'] != worst['phdi']:
raise ValueError(f"the worst PDSI year ({worst['pdsi']}) and the worst PHDI year ({worst['phdi']}) are no longer the same year; the drought figure's caption and the California section both say they are, and must be rewritten before this can build")
for key in ('pdsi', 'phdi', 'zndx'):
flags = drought_table[drought_table['index'] == key].sort_values('year')
runs, in_run, recent_runs = (0, False, 0)
for year, flagged in zip(flags['year'], flags['drought_year']):
if flagged and (not in_run):
runs += 1
if year >= last - 29:
recent_runs += 1
in_run = bool(flagged)
num.add(f'{key}.n_drought_episodes', runs, units='episodes', decimals=0, inputs=index_inputs, description=f'Separate runs of consecutive {INDEX_KIND[key]} drought years, {first}–{last} — the {counts[key]} drought years are this many droughts')
num.add(f'{key}.n_drought_episodes_last_30', recent_runs, units='episodes', decimals=0, inputs=index_inputs, description=f'Separate {INDEX_KIND[key]} droughts beginning in the most recent thirty years ({last - 29}–{last})')
if runs:
num.add(f'{key}.mean_episode_years', counts[key] / runs, units='years', decimals=1, inputs=index_inputs, description=f'Mean length of a {INDEX_KIND[key]} drought, in years, {first}–{last}')
same = sum((1 for year in years if int(months_below['pdsi'][year]) == int(months_below['phdi'][year])))
num.add('pdsi_phdi.n_years_identical', same, units='years', decimals=0, inputs=index_inputs, description='Years in which the severity and hydrological indices give the same count of months at or below the moderate-drought line — a measure of how little the second adds')
by_year = drought_table.pivot(index='year', columns='index', values='drought_year')
num.add('all_three.n_years', int(by_year.all(axis=1).sum()), units='years', decimals=0, inputs=index_inputs, description=f'Years in drought on all three Palmer indices at once, {first}–{last}')
num.add('any.n_years', int(by_year.any(axis=1).sum()), units='years', decimals=0, inputs=index_inputs, description=f'Years in drought on at least one Palmer index, {first}–{last}')
write_table(drought_table, 'california_drought_annual', script=SCRIPT, inputs=index_inputs, units={'year': 'year', 'index': 'index id', 'kind': 'drought type', 'annual_mean': 'index value', 'months_at_or_below_threshold': 'months', 'drought_year': 'boolean'}, baseline='not applicable: the Palmer indices are calibrated by NOAA on 1931–1990 and are published as index values, not as anomalies against a baseline chosen here', description='California statewide Palmer drought indices summarised by calendar year, with the drought flag each figure uses.', method=f"For each year and index, the number of its twelve months at or below {DROUGHT} — NOAA's own boundary for moderate drought — and the year's mean index value. A year is flagged as a drought year for that index when at least {DROUGHT_MONTHS} of its months are at or below that line. Years without all twelve months are dropped.", notes=['The three indices are not independent: one water-balance model, one set of precipitation and temperature inputs, three different time-integrations of its output. Agreement between them is not corroboration.', f'NOAA states the category boundaries for PDSI and PHDI. The same {DROUGHT} line is applied to the Z-Index here for comparability, which is a choice made in this repository and not a NOAA category.', "annual_mean is carried so a reader can apply a different rule — comparing the year's mean index with the threshold instead of counting months — without refetching anything. That rule returns no Z-Index drought years at all, which is why it is not the rule used here."])
precip_rows, trend_rows = ([], [])
for number in NORTH_TO_SOUTH:
series = division_precip(number)
source = DIV_SRC[number]
for year, value in series.items():
precip_rows.append({'year': int(year), 'division': number, 'division_name': DIVISIONS[number], 'precip_in': float(value)})
mean = float(series.mean())
result = stats.ols_trend(series.index.values, series.values)
scale = 1000.0 / mean
num.add_trend_result(f'div{number:02d}.trend_pct_per_decade', result, units='% of mean per decade', decimals=2, kind='value', scale=scale, inputs=[source], description=f"{DIVISIONS[number]} (California climate division {number}): OLS trend in water-year precipitation {int(series.index.min())}–{int(series.index.max())}, as a percent of that division's own mean per decade (AR(1)-adjusted 95% CI)")
num.add(f'div{number:02d}.mean_in', mean, units='inches', decimals=1, inputs=[source], description=f'{DIVISIONS[number]}: mean water-year precipitation, {int(series.index.min())}–{int(series.index.max())}')
excludes_zero = bool(result['ci_low'] * result['ci_high'] > 0) and (not result['insufficient'])
bf = stats.brown_forsythe(series.loc[EARLY[0]:EARLY[1]].values, series.loc[LATE[0]:LATE[1]].values)
num.add(f'div{number:02d}.bf_p', bf['p'], units='p-value', decimals=3, inputs=[source], description=f'{DIVISIONS[number]}: Brown–Forsythe p-value for equal variance in water-year precipitation, {EARLY[0]}–{EARLY[1]} against {LATE[0]}–{LATE[1]}')
trend_rows.append({'division': number, 'division_name': DIVISIONS[number], 'first_year': int(series.index.min()), 'last_year': int(series.index.max()), 'mean_in': mean, 'trend_pct_per_decade': scale * result['slope'], 'ci_low_pct': scale * result['ci_low'], 'ci_high_pct': scale * result['ci_high'], 'n_eff': result['n_eff'], 'excludes_zero': excludes_zero, 'sd_early_in': bf['sd_a'], 'sd_late_in': bf['sd_b'], 'bf_p': bf['p']})
trends = pd.DataFrame(trend_rows)
div_inputs = [DIV_SRC[d] for d in sorted(DIV_SRC)]
num.add('n_divisions', len(trends), units='divisions', decimals=0, inputs=div_inputs, description='California climate divisions NOAA publishes, each with its own long precipitation record')
num.add('n_divisions_trend_excludes_zero', int(trends['excludes_zero'].sum()), units='divisions', decimals=0, inputs=div_inputs, description='California climate divisions whose water-year precipitation trend has a 95% interval that excludes zero — the divisions where a trend can be concluded')
if int(trends['excludes_zero'].sum()):
named = ', '.join(trends[trends['excludes_zero']]['division_name'])
raise ValueError(f'a California climate division now has a precipitation trend whose interval excludes zero ({named}); the figure title and the California section both say none does, and must be rewritten before this can build')
num.add('division_trend_ci_low', float(trends['ci_low_pct'].min()), units='% of mean per decade', decimals=1, inputs=div_inputs, description="The driest end of any division's 95% precipitation-trend interval — the most drying this record cannot rule out")
num.add('division_trend_ci_high', float(trends['ci_high_pct'].max()), units='% of mean per decade', decimals=1, inputs=div_inputs, description="The wettest end of any division's 95% precipitation-trend interval — the most wetting this record cannot rule out")
num.add('n_divisions_spread_increased', int((trends['sd_late_in'] > trends['sd_early_in']).sum()), units='divisions', decimals=0, inputs=div_inputs, description=f'California climate divisions whose water-year precipitation was more variable in {LATE[0]}–{LATE[1]} than in {EARLY[0]}–{EARLY[1]}')
num.add('n_divisions_variance_p_below_12', int((trends['bf_p'] < 0.12).sum()), units='divisions', decimals=0, inputs=div_inputs, description='California climate divisions whose Brown–Forsythe p for a change in the spread of water-year precipitation is below 0.12')
num.add('max_n_eff_shortfall_pct', float(100 * (1 - trends['n_eff'].min() / len(precip_rows) * 7)), units='%', decimals=1, inputs=div_inputs, description="The largest reduction the AR(1) correction makes to any division's effective sample size, as a percent of its number of years — water-year precipitation is close to serially independent, so the correction barely widens these intervals")
num.add('n_divisions_variance_p_below_05', int((trends['bf_p'] < 0.05).sum()), units='divisions', decimals=0, inputs=div_inputs, description=f'California climate divisions whose Brown–Forsythe test for a change in the spread of water-year precipitation returns p below 0.05, {EARLY[0]}–{EARLY[1]} against {LATE[0]}–{LATE[1]}; seven tests were run, and all seven are reported')
north, south = (trends[trends['division'].isin((1, 2, 3))], trends[trends['division'].isin((6, 7))])
num.add('north_trend_pct_mean', float(north['trend_pct_per_decade'].mean()), units='% of mean per decade', decimals=2, inputs=div_inputs, description="Mean of the three northern divisions' precipitation trend estimates (North Coast, Sacramento, Northeast Interior) — a summary of central estimates, each of which has an interval that includes zero")
num.add('south_trend_pct_mean', float(south['trend_pct_per_decade'].mean()), units='% of mean per decade', decimals=2, inputs=div_inputs, description="Mean of the two southern divisions' precipitation trend estimates (South Coast, Southeast Desert) — a summary of central estimates, each of which has an interval that includes zero")
precip = pd.DataFrame(precip_rows)
write_table(precip, 'california_division_precip', script=SCRIPT, inputs=[DIV_SRC[d] for d in sorted(DIV_SRC)], units={'year': 'year', 'division': 'division number', 'division_name': 'name', 'precip_in': 'inches'}, baseline='not applicable: totals, not anomalies', description="Water-year (October–September) precipitation for each of California's seven climate divisions, as published by NOAA.", method='Values as published. The year is the calendar year the water year ends in, which is how Climate at a Glance keys them.', notes=["Division names are NOAA's. They are ordered north to south in the trend table so that a north–south gradient, if there were one, would read as one."])
write_table(trends, 'california_division_trends', script=SCRIPT, inputs=[DIV_SRC[d] for d in sorted(DIV_SRC)], units={'division': 'division number', 'division_name': 'name', 'first_year': 'year', 'last_year': 'year', 'mean_in': 'inches', 'trend_pct_per_decade': '% of division mean per decade', 'ci_low_pct': '% of division mean per decade', 'ci_high_pct': '% of division mean per decade', 'n_eff': 'count', 'excludes_zero': 'boolean', 'sd_early_in': 'inches', 'sd_late_in': 'inches', 'bf_p': 'p-value'}, baseline='not applicable (trends)', description="OLS trend in water-year precipitation for each California climate division, with AR(1)-adjusted 95% intervals, expressed as a percent of that division's own long-term mean so that divisions of very different wetness compare.", method=f'OLS on water-year totals; interval widened by the AR(1) effective sample size. `excludes_zero` is the test this page uses for claiming a trend at all. `bf_p` is the Brown–Forsythe test for equal spread, {EARLY[0]}–{EARLY[1]} against {LATE[0]}–{LATE[1]}, the same pre-registered split the statewide series uses.', notes=['Rows are ordered north to south, not by division number.', 'A trend whose interval includes zero is plotted but never quoted as a trend.', "Seven divisions means seven variance tests, so about one in three runs of this set would produce a p below 0.05 by chance alone. Every division's p is reported here and on the page; none is selected for being small."])
num.save()
print(f"california_drought: {len(num.items)} numbers; drought years {first}–{last} pdsi {counts['pdsi']}, phdi {counts['phdi']}, zndx {counts['zndx']}; {int(trends['excludes_zero'].sum())} of {len(trends)} divisions with a trend")
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/carbon_sources.py115 lines
from __future__ import annotations
import re
import pandas as pd
from scripts.lib import readers as R
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/carbon_sources.py'
SRC = {'owid': 'owid/owid-co2-data.csv'}
START = 1850
FUELS = [('coal_co2', 'coal'), ('oil_co2', 'oil'), ('gas_co2', 'gas')]
INDUSTRY = ['cement_co2', 'flaring_co2', 'other_industry_co2']
MILESTONES = (1750, 1870, 1914, 1950)
TOP_N = 10
DECLINE_PCT = 10.0
PARIS_YEAR = 2015
def by_source(frame: pd.DataFrame, who: str) -> pd.DataFrame:
parts = pd.DataFrame(index=frame.index)
for column, name in FUELS:
parts[name] = frame[column].fillna(0.0) / 1000.0
parts['industry'] = frame[INDUSTRY].fillna(0.0).sum(axis=1) / 1000.0
parts['land_use'] = frame['land_use_change_co2'] / 1000.0
fossil = frame['co2'] / 1000.0
summed = parts[['coal', 'oil', 'gas', 'industry']].sum(axis=1)
worst = float(((summed - fossil).abs() / fossil).max())
if worst > 0.01:
raise ValueError(f'{who}: fuel components no longer add up to the fossil total (worst year off by {worst:.1%})')
table = parts.copy()
table['fossil'] = fossil
table['total'] = fossil + parts['land_use']
running = 0.0
for name in ('coal', 'oil', 'gas', 'industry', 'land_use'):
running = running + parts[name]
table[f'stack_{name}'] = running
return table.reset_index()
def main() -> int:
num = Numbers('carbon', SCRIPT)
df = pd.read_csv(R.RAW / SRC['owid'], low_memory=False)
world = df[df['country'] == 'World'].set_index('year').sort_index()
complete = world[world['co2'].notna() & world['land_use_change_co2'].notna()]
latest = int(complete.index.max())
table = by_source(complete.loc[START:latest], 'the world')
write_table(table, 'co2_emissions_by_source', script=SCRIPT, inputs=[SRC['owid']], units={c: 'year' if c == 'year' else 'GtCO2/yr' for c in table.columns}, baseline='not applicable (annual emissions)', description='World CO₂ emissions by source, from the Global Carbon Budget as republished by Our World in Data: coal, oil, gas, industry (cement, flaring and other), and land-use change.', method='Million tonnes converted to billion tonnes (Gt). `stack_*` columns are running sums in the plotted order, for drawing the stacked areas.', notes=['Land-use change estimates start in 1850, so the table starts there.', 'Industry is cement production, gas flaring and other industrial processes; the fuel components are checked to add up to the fossil total within 1% every year.'])
total = float(table['total'].iloc[-1])
num.add('latest_year', latest, units='year', decimals=0, kind='year', inputs=[SRC['owid']], description='Most recent year with both fossil and land-use change estimates')
num.add('total_gt_latest', total, units='GtCO2/yr', decimals=1, inputs=[SRC['owid']], description=f'World CO₂ emissions in {latest}, fossil fuels, industry and land-use change')
for name, label in (('coal', 'coal'), ('oil', 'oil'), ('gas', 'natural gas'), ('industry', 'cement, flaring and other industry'), ('land_use', 'land-use change')):
num.add(f'share_{name}_latest', float(table[name].iloc[-1]) / total * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Share of world CO₂ emissions in {latest} from {label}')
num.add('share_fossil_latest', float(table['fossil'].iloc[-1]) / total * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Share of world CO₂ emissions in {latest} from fossil fuels and industry')
fossil_series = table.set_index('year')['fossil']
fossil_peak_year = int(fossil_series.idxmax())
if fossil_peak_year != latest:
raise ValueError(f'world fossil CO₂ peaked in {fossil_peak_year}, not {latest}: §response says the latest year is the highest in the series, so that sentence needs rewriting')
num.add('world.fossil_gt_latest', float(fossil_series.loc[latest]), units='GtCO2/yr', decimals=1, inputs=[SRC['owid']], description=f'World CO₂ emissions from fossil fuels and industry in {latest}')
num.add('world.fossil_change_since_paris_pct', (float(fossil_series.loc[latest]) / float(fossil_series.loc[PARIS_YEAR]) - 1) * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Change in world fossil and industry CO₂ from {PARIS_YEAR} to {latest}')
cumulative_fossil, cumulative_land = (float(table['fossil'].sum()), float(table['land_use'].sum()))
num.add('cumulative_share_land_use', cumulative_land / (cumulative_fossil + cumulative_land) * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Land-use change as a share of all CO₂ emitted {START}–{latest}')
first = table.iloc[0]
num.add('land_use_to_fossil_1850', float(first['land_use'] / first['fossil']), units='times', decimals=0, inputs=[SRC['owid']], description='Land-use change emissions divided by fossil emissions in 1850')
us_rows = df[df['country'] == 'United States'].set_index('year').sort_index()
us_complete = us_rows[us_rows['co2'].notna() & us_rows['land_use_change_co2'].notna()]
us_table = by_source(us_complete.loc[START:latest], 'the United States')
write_table(us_table, 'us_co2_emissions_by_source', script=SCRIPT, inputs=[SRC['owid']], units={c: 'year' if c == 'year' else 'GtCO2/yr' for c in us_table.columns}, baseline='not applicable (annual emissions)', description='United States CO₂ emissions by source, on the same definitions as the world table: coal, oil, gas, industry (cement, flaring and other), and land-use change.', method='Million tonnes converted to billion tonnes (Gt); `stack_*` columns are running sums in the plotted order. Territorial emissions: CO₂ released inside the United States, not the emissions embodied in what it imports.', notes=['Same source and same processing as the world table, so the two figures compare.', 'Land-use change for a single country is the least certain column here.'])
us = us_table.set_index('year')
us_total = float(us['total'].iloc[-1])
num.add('us.total_gt_latest', us_total, units='GtCO2/yr', decimals=1, inputs=[SRC['owid']], description=f'United States CO₂ emissions in {latest}, fossil fuels, industry and land-use change')
for name, label in (('coal', 'coal'), ('oil', 'oil'), ('gas', 'natural gas'), ('industry', 'cement, flaring and other industry'), ('land_use', 'land-use change')):
num.add(f'us.share_{name}_latest', float(us[name].iloc[-1]) / us_total * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Share of United States CO₂ emissions in {latest} from {label}')
peak_year = int(us['fossil'].idxmax())
num.add('us.fossil_peak_year', peak_year, units='year', decimals=0, kind='year', inputs=[SRC['owid']], description='Year of the highest United States fossil and industry CO₂ emissions')
at_peak, now_row = (us.loc[peak_year], us.iloc[-1])
for name, label in (('coal', 'coal'), ('gas', 'natural gas'), ('oil', 'oil')):
num.add(f'us.{name}_gt_peak_year', float(at_peak[name]), units='GtCO2/yr', decimals=2, inputs=[SRC['owid']], description=f'United States CO₂ from {label} in {peak_year}, its peak year for fossil emissions')
num.add(f'us.{name}_gt_latest', float(now_row[name]), units='GtCO2/yr', decimals=2, inputs=[SRC['owid']], description=f'United States CO₂ from {label} in {latest}')
num.add(f'us.{name}_change_since_peak_pct', (float(now_row[name]) - float(at_peak[name])) / float(at_peak[name]) * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Change in United States CO₂ from {label} between {peak_year} and {latest}')
num.add('us.fossil_change_since_peak_pct', (float(now_row['fossil']) - float(at_peak['fossil'])) / float(at_peak['fossil']) * 100, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Change in United States fossil and industry CO₂ between {peak_year} and {latest}')
if not (now_row['coal'] < at_peak['coal'] and now_row['gas'] > at_peak['gas']):
raise ValueError('the US section says coal fell and gas rose since the fossil peak; the data no longer say that, so the prose must change')
fossil_mt = world['co2']
for year in MILESTONES:
num.add(f'fossil_mt_{year}', float(fossil_mt.loc[year]), units='MtCO2/yr', decimals=0, inputs=[SRC['owid']], description=f'World fossil and industry CO₂ emissions in {year}')
num.add('fossil_mt_latest', float(fossil_mt.loc[latest]), units='MtCO2/yr', decimals=0, inputs=[SRC['owid']], description=f'World fossil and industry CO₂ emissions in {latest}')
num.add('growth_1870_1914', float(fossil_mt.loc[1914] / fossil_mt.loc[1870]), units='times', decimals=0, inputs=[SRC['owid']], description='World fossil CO₂ emissions in 1914 divided by those in 1870')
since_1750 = fossil_mt.loc[1750:latest]
num.add('share_since_1950', float(since_1750.loc[1950:].sum() / since_1750.sum() * 100), units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Share of all fossil CO₂ emitted 1750–{latest} that was emitted from 1950 onward')
countries = df[df['iso_code'].notna() & ~df['iso_code'].astype(str).str.startswith('OWID')]
now = countries[countries['year'] == latest].dropna(subset=['co2']).nlargest(TOP_N, 'co2')
rows = []
for name in now['country']:
series = countries[countries['country'] == name].set_index('year')['co2'].dropna()
peak_year = int(series.idxmax())
rows.append({'country': name, 'co2_latest_mt': float(series.loc[latest]), 'peak_year': peak_year, 'co2_peak_mt': float(series.max()), 'pct_below_peak': float((series.max() - series.loc[latest]) / series.max() * 100)})
top = pd.DataFrame(rows)
top['well_below_peak'] = top['pct_below_peak'] >= DECLINE_PCT
write_table(top, 'co2_largest_emitters', script=SCRIPT, inputs=[SRC['owid']], units={'country': 'name', 'co2_latest_mt': 'MtCO2/yr', 'peak_year': 'year', 'co2_peak_mt': 'MtCO2/yr', 'pct_below_peak': '%', 'well_below_peak': 'boolean'}, baseline="each country's own peak year", description=f"The {TOP_N} largest national emitters of fossil and industry CO₂ in {latest}, with each one's peak year and how far its latest emissions sit below that peak.", method=f"Countries only (regional and income aggregates excluded). `well_below_peak` is at least {DECLINE_PCT:.0f}% below the country's own maximum.", notes=['Territorial emissions: CO₂ emitted inside the country, not the emissions embodied in what it imports.', 'Land-use change is not included in these national figures.'])
for row in top.itertuples():
key = 'top10.' + re.sub('[^a-z0-9]+', '_', row.country.lower()).strip('_')
num.add(f'{key}.peak_year', row.peak_year, units='year', decimals=0, kind='year', inputs=[SRC['owid']], description=f"Year of {row.country}'s highest fossil and industry CO₂ emissions")
num.add(f'{key}.pct_below_peak', row.pct_below_peak, units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f"How far {row.country}'s {latest} fossil CO₂ emissions sit below its peak")
at_peak = set(top.loc[top['peak_year'] == latest, 'country'])
num.add('top10.n_at_peak_latest', len(at_peak), units='countries', decimals=0, inputs=[SRC['owid']], description=f'Of the {TOP_N} largest emitters, how many emitted more in {latest} than in any earlier year')
below = set(top.loc[top['well_below_peak'], 'country'])
if below != {'United States', 'Russia', 'Japan', 'South Korea', 'Germany'}:
raise ValueError(f'the international-record section names five countries well below their peak; the data now give {sorted(below)}, so the prose must change')
if not {'China', 'India'} <= at_peak:
raise ValueError(f'the international-record section names China and India as emitting more in {latest} than ever before; that is no longer true, so the prose must change')
world_latest = float(world.loc[latest, 'co2'])
num.add('top10.n_well_below_peak', int(top['well_below_peak'].sum()), units='countries', decimals=0, inputs=[SRC['owid']], description=f'Of the {TOP_N} largest emitters in {latest}, how many are at least {DECLINE_PCT:.0f}% below their own peak')
num.add('top10.share_of_world', float(top['co2_latest_mt'].sum() / world_latest * 100), units='%', decimals=0, kind='percent', inputs=[SRC['owid']], description=f'Share of world fossil CO₂ in {latest} from the {TOP_N} largest national emitters')
num.save()
print(f'carbon_sources: {len(num.items)} numbers; latest year {latest}')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/energy_flows.py64 lines
from __future__ import annotations
import re
import unicodedata
import xml.etree.ElementTree as ET
import pandas as pd
from scripts.lib import readers as R
from scripts.lib.io import PROCESSED, Numbers, write_table
SCRIPT = 'scripts/process/energy_flows.py'
SRC = {'wild2020': 'wild2020/pmc7366598.xml'}
ESTIMATE = 'b'
CLOSURE_TOLERANCE = 2.0
TSI_TABLE = PROCESSED / 'solar_vs_anthropogenic_forcing.csv'
ROWS = {'SW down TOA': ('sunlight_in', 'Sunlight arriving at the top of the atmosphere, averaged over the whole surface of the turning planet'), 'SW up all-sky TOA': ('reflected_total', 'Sunlight reflected straight back to space, by everything'), 'SW up all-sky surface': ('reflected_surface', 'Sunlight reflected back by the surface itself — ice, desert, cloudless ocean, everything the ground does'), 'SW absorbed all-sky TOA': ('absorbed', 'Sunlight the Earth system keeps'), 'LW up (OLR) all-sky TOA': ('infrared_out', 'Infrared radiation emitted back to space')}
def table_rows(xml_text: str) -> dict[str, str]:
root = ET.fromstring(xml_text)
for table in root.iter('table'):
rows = {}
for tr in table.iter('tr'):
cells = [''.join(td.itertext()) for td in tr]
if len(cells) >= 2:
rows[normalise(cells[0])] = normalise(cells[1])
if 'Energy balance component' in rows:
return rows
raise ValueError(f"{SRC['wild2020']}: no table with an 'Energy balance component' column")
def normalise(text: str) -> str:
return ' '.join(unicodedata.normalize('NFKC', text).replace('−', '-').split())
def estimate(cell: str, label: str) -> float:
for match in re.finditer('(-?\\s?\\d+(?:\\.\\d+)?)\\s*([a-d])\\b', cell):
if match.group(2) == ESTIMATE:
return abs(float(match.group(1).replace(' ', '')))
raise ValueError(f'{label!r}: no ({ESTIMATE}) reference estimate in {cell!r}')
def main() -> int:
rows = table_rows((R.RAW / SRC['wild2020']).read_text(encoding='utf-8'))
missing = [label for label in ROWS if label not in rows]
if missing:
raise ValueError(f"{SRC['wild2020']}: Table 1 no longer has the row(s) {missing}")
flux = {key: estimate(rows[label], label) for label, (key, _) in ROWS.items()}
flux['reflected_atmosphere'] = flux['reflected_total'] - flux['reflected_surface']
checks = [('arriving minus reflected should be what is absorbed', flux['sunlight_in'] - flux['reflected_total'], flux['absorbed']), ('absorbed should be close to emitted, the difference being the imbalance', flux['absorbed'], flux['infrared_out'])]
tsi = pd.read_csv(TSI_TABLE) if TSI_TABLE.exists() else None
if tsi is not None:
ours = float(tsi.loc[tsi['year'].between(2015, 2024), 'tsi'].mean()) / 4
checks.append(("the paper's arriving sunlight should match the one this project computes from total solar irradiance", flux['sunlight_in'], ours))
for what, left, right in checks:
if abs(left - right) > CLOSURE_TOLERANCE:
raise ValueError(f'{what}: {left:.1f} against {right:.1f} W m-2, more than {CLOSURE_TOLERANCE} apart')
order = ['sunlight_in', 'reflected_atmosphere', 'reflected_surface', 'reflected_total', 'absorbed', 'infrared_out']
described = {key: text for key, text in ROWS.values()}
described['reflected_atmosphere'] = 'Sunlight reflected back by clouds and the air, which is what is reflected at the top of the atmosphere and not at the surface'
table = pd.DataFrame([{'flow': key, 'w_per_m2': flux[key], 'description': described[key]} for key in order])
write_table(table, 'global_energy_flows', script=SCRIPT, inputs=[SRC['wild2020']], units={'flow': 'category', 'w_per_m2': 'W m-2', 'description': 'text'}, baseline='not applicable: these are flows, not anomalies', description='Global annual mean energy flows at the top of the atmosphere for the present-day climate, read from Table 1 of Wild (2020).', method=f"Parsed from the paper's full-text XML; reference estimate ({ESTIMATE}) throughout, which is Wild et al. (2015, 2019). Reflection by clouds and air is the top-of-atmosphere reflection minus the surface's. Magnitudes: the table signs fluxes by direction.", notes=['The paper gives two to four independent reference estimates per row; this table takes one of them throughout rather than mixing them, so that the flows add up.', 'Checked at build time: arriving minus reflected equals absorbed, absorbed is within 2 W m-2 of emitted, and the arriving figure is within 2 W m-2 of the one this project computes independently from total solar irradiance.'])
num = Numbers('flows', SCRIPT)
for key in order:
num.add(key, flux[key], units='W m-2', decimals=0, inputs=[SRC['wild2020']], description=described[key] + f' — global annual mean for the present-day climate, reference estimate ({ESTIMATE}) of Wild (2020) Table 1')
num.save()
print(f"energy_flows: {len(order)} flows, arriving {flux['sunlight_in']:.0f} W m-2, reflected {flux['reflected_atmosphere']:.0f} by air and {flux['reflected_surface']:.0f} by surface, {flux['infrared_out']:.0f} out as infrared")
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/forcing_breakdown.py49 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/forcing_breakdown.py'
SRC = {'igcc': 'igcc/ClimateIndicator-data-v2025.06.11.zip'}
EARLY, LATE = ((1850, 1900), (2015, 2024))
SOURCES = [('CO2', 'human'), ('CH4', 'human'), ('N2O', 'human'), ('halogen', 'human'), ('O3', 'human'), ('H2O_stratospheric', 'human'), ('BC_on_snow', 'human'), ('contrails', 'human'), ('land_use', 'human'), ('aerosol', 'human'), ('solar', 'natural'), ('volcanic', 'natural')]
WMGHG = ['CO2', 'CH4', 'N2O', 'halogen']
SUM_TOLERANCE = 0.005
def member(tag: str) -> pd.DataFrame:
frame = R.zip_member_csv(R.RAW / SRC['igcc'], f'ERF_{tag}_aggregates_1750-2024.csv').df
frame['year'] = frame['timebound_lower'].astype(int)
return frame.set_index('year')
def change(frame: pd.DataFrame, column: str) -> float:
series = frame[column]
return float(series.loc[LATE[0]:LATE[1]].mean() - series.loc[EARLY[0]:EARLY[1]].mean())
def main() -> int:
best = member('best')
bounds = {tag: member(tag) for tag in ('p05', 'p95')}
rows, unbanded = ([], [])
for name, kind in SOURCES:
low, high = (change(bounds['p05'], name), change(bounds['p95'], name))
if low > high:
unbanded.append(name)
low = high = float('nan')
rows.append({'source': name, 'kind': kind, 'change': change(best, name), 'change_p05': low, 'change_p95': high, 'erf_2024': float(best.loc[2024, name])})
table = pd.DataFrame(rows)
human = table.loc[table['kind'] == 'human', 'change'].sum()
for label, computed, aggregate in (('human sources', human, change(best, 'anthro')), ('every source', table['change'].sum(), change(best, 'total'))):
if abs(computed - aggregate) > SUM_TOLERANCE:
raise ValueError(f"the {label} in this table sum to {computed:.4f} W m-2, but the archive's own aggregate is {aggregate:.4f}; a column is missing or double-counted")
write_table(table, 'forcing_by_source', script=SCRIPT, inputs=[SRC['igcc']], units={'source': 'category', 'kind': 'category', 'change': 'W m-2', 'change_p05': 'W m-2', 'change_p95': 'W m-2', 'erf_2024': 'W m-2'}, baseline='change from the 1850–1900 mean to the 2015–2024 mean', description='Effective radiative forcing by source (IGCC 2024): how far each driver has pushed the top-of-atmosphere energy balance since 1850–1900.', method="Per-source columns of the archive's aggregates file, differenced between the two period means; the 5th and 95th percentile members are differenced the same way, and erf_2024 is the archive's own 2024 value relative to 1750. The human rows sum to the archive's anthropogenic aggregate and all rows to its total, checked at build time.", notes=["'aerosol' is the archive's aggregate of aerosol-radiation and aerosol-cloud interactions, which are one physical effect reported in two columns.", "The percentile members are not independent per source: the archive's uncertainty is dominated by a scaling common to every year, so differencing them this way gives a band on the change close to the band on the recent level.", 'No band is published for ' + ', '.join(unbanded) + ': differencing the percentile members returns them the wrong way round, which is what an episodic forcing does to an assumption that both period means move together.'] if unbanded else ["'aerosol' is the archive's aggregate of aerosol-radiation and aerosol-cloud interactions, which are one physical effect reported in two columns."])
num = Numbers('forcing', SCRIPT)
for name, key, described in (('CO2', 'co2', 'Carbon dioxide'), ('CH4', 'ch4', 'Methane'), ('aerosol', 'aerosol', 'Aerosols (radiation and cloud interactions)')):
num.add(f'{key}.change_1850_1900_to_2015_2024', change(best, name), units='W m-2', decimals=2, ci=(change(bounds['p05'], name), change(bounds['p95'], name)), inputs=[SRC['igcc']], description=f"{described}: effective radiative forcing, mean 2015–2024 minus mean 1850–1900, with the archive's 5th and 95th percentile members differenced the same way (IGCC 2024)")
wmghg = sum((change(best, name) for name in WMGHG))
num.add('wmghg.change_1850_1900_to_2015_2024', wmghg, units='W m-2', decimals=2, ci=tuple((sum((change(bounds[tag], name) for name in WMGHG)) for tag in ('p05', 'p95'))), inputs=[SRC['igcc']], description='Well-mixed greenhouse gases together (CO₂, methane, nitrous oxide and the halogenated gases): effective radiative forcing, mean 2015–2024 minus mean 1850–1900 (IGCC 2024)')
num.add('n_human_sources', int((table['kind'] == 'human').sum()), units='sources', decimals=0, kind='count', inputs=[SRC['igcc']], description='Human-caused forcing sources listed separately in the IGCC 2024 aggregates file')
num.add('n_cooling_sources', int(((table['kind'] == 'human') & (table['change'] < 0)).sum()), units='sources', decimals=0, kind='count', inputs=[SRC['igcc']], description='Of those human sources, how many push the energy balance the cooling way')
num.save()
print(f'forcing_breakdown: {len(table)} sources, {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/ghcnm_adjustments.py103 lines
from __future__ import annotations
import tarfile
import numpy as np
import pandas as pd
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
from scripts.lib.readers import RAW
SCRIPT = 'scripts/process/ghcnm_adjustments.py'
SRC = {'qcu': 'ghcnm/ghcnm.tavg.latest.qcu.tar.gz', 'qcf': 'ghcnm/ghcnm.tavg.latest.qcf.tar.gz'}
BASE = (1961, 1990)
MIN_BASE_YEARS = 20
CELL_DEG = 5
N_LAT, N_LON = (180 // CELL_DEG, 360 // CELL_DEG)
Y0, Y1 = (1850, 2025)
LINE = 115
def parse_values(rows: np.ndarray, start: int) -> np.ndarray:
field = rows[:, start:start + 5].astype(np.int64)
digits = np.where((field >= 48) & (field <= 57), field - 48, 0)
magnitude = digits @ np.array([10000, 1000, 100, 10, 1], dtype=np.int64)
sign = np.where((field == 45).any(axis=1), -1, 1)
return magnitude * sign
def read_archive(path) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]:
with tarfile.open(path, 'r:gz') as tar:
files = [m for m in tar.getmembers() if m.isfile()]
raw = tar.extractfile(next((m for m in files if m.name.endswith('.dat')))).read()
inventory = tar.extractfile(next((m for m in files if m.name.endswith('.inv')))).read().decode('ascii', 'replace')
raw = raw.replace(b'\r', b'')
width = raw.index(b'\n') + 1
if len(raw) % width or width < LINE + 1:
raise ValueError(f'GHCNm lines are not fixed width ({width} bytes); parser needs updating')
rows = np.frombuffer(raw, dtype=np.uint8).reshape(-1, width)
ids = np.ascontiguousarray(rows[:, :11]).view('S11').ravel()
stations, code = np.unique(ids, return_inverse=True)
year = rows[:, 11:15].astype(np.int64) - 48
year = year @ np.array([1000, 100, 10, 1], dtype=np.int64)
values = np.empty((len(rows), 12))
for month in range(12):
start = 19 + 8 * month
v = parse_values(rows, start).astype(float)
qc = rows[:, start + 6]
values[:, month] = np.where((v == -9999) | (qc != ord(' ')), np.nan, v / 100.0)
lat = np.full(len(stations), np.nan)
lon = np.full(len(stations), np.nan)
position = {s.decode(): i for i, s in enumerate(stations)}
for line in inventory.splitlines():
i = position.get(line[:11])
if i is not None:
lat[i], lon[i] = (float(line[12:20]), float(line[21:30]))
return (code, year, values, lat, lon)
def global_land(code, year, values, lat, lon) -> tuple[pd.Series, int]:
n_st = int(code.max()) + 1
base = (year >= BASE[0]) & (year <= BASE[1])
clim = np.full((n_st, 12), np.nan)
for month in range(12):
ok = base & np.isfinite(values[:, month])
sums = np.bincount(code[ok], weights=values[ok, month], minlength=n_st)
counts = np.bincount(code[ok], minlength=n_st)
clim[:, month] = np.where(counts >= MIN_BASE_YEARS, sums / np.maximum(counts, 1), np.nan)
anomalies = values - clim[code]
cell_lat = np.clip(np.floor((lat + 90) / CELL_DEG), 0, N_LAT - 1)
cell_lon = np.clip(np.floor((lon + 180) / CELL_DEG), 0, N_LON - 1)
cell_of_station = np.where(np.isfinite(lat), cell_lat * N_LON + cell_lon, -1).astype(np.int64)
in_range = (year >= Y0) & (year <= Y1)
n_time, n_cells = ((Y1 - Y0 + 1) * 12, N_LAT * N_LON)
time_index = (year[:, None] - Y0) * 12 + np.arange(12)[None, :]
cells = np.broadcast_to(cell_of_station[code][:, None], anomalies.shape)
valid = np.isfinite(anomalies) & in_range[:, None] & (cells >= 0)
keys = time_index[valid] * n_cells + cells[valid]
sums = np.bincount(keys, weights=anomalies[valid], minlength=n_time * n_cells).reshape(n_time, n_cells)
counts = np.bincount(keys, minlength=n_time * n_cells).reshape(n_time, n_cells)
cell_mean = np.where(counts > 0, sums / np.maximum(counts, 1), np.nan)
weights = np.repeat(np.cos(np.radians(-90 + (np.arange(N_LAT) + 0.5) * CELL_DEG)), N_LON)
have = np.isfinite(cell_mean)
monthly = np.where(have.any(axis=1), np.nansum(cell_mean * weights, axis=1) / np.where(have, weights, 0).sum(axis=1).clip(min=1e-12), np.nan)
monthly = monthly.reshape(-1, 12)
annual = np.where(np.isfinite(monthly).all(axis=1), monthly.mean(axis=1), np.nan)
used = int(np.isfinite(clim).any(axis=1).sum())
return (pd.Series(annual, index=pd.RangeIndex(Y0, Y1 + 1, name='year')), used)
def main() -> int:
num = Numbers('ghcnm', SCRIPT)
results, used = ({}, {})
for key in ('qcu', 'qcf'):
results[key], used[key] = global_land(*read_archive(RAW / SRC[key]))
table = pd.DataFrame({'unadjusted': results['qcu'], 'adjusted': results['qcf']}).loc[1880:2025]
table['adjusted_minus_unadjusted'] = table.adjusted - table.unadjusted
write_table(table.reset_index(), 'ghcnm_raw_vs_adjusted_global_land', script=SCRIPT, inputs=list(SRC.values()), units={'year': 'year', 'unadjusted': 'degC', 'adjusted': 'degC', 'adjusted_minus_unadjusted': 'degC'}, baseline='1961-1990 (per station and calendar month)', description='Global land mean temperature anomaly computed identically from GHCNm v4 unadjusted and adjusted station data.', method='Common anomaly method (1961–1990, ≥ 20 years), 5°×5° cells, cos(latitude) weights, annual means from 12 months, QC-flagged values dropped.', notes=['Not a replacement for official land series: no land-fraction weighting, no infilling.', f"Stations with at least one 1961–1990 monthly climatology: {used['qcu']} unadjusted, {used['qcf']} adjusted.", "GHCNm 'latest' files are revised daily; the manifest records the exact bytes used."])
for start, end in ((1900, 2024), (1970, 2024)):
for col in ('unadjusted', 'adjusted', 'adjusted_minus_unadjusted'):
s = table[col].loc[start:end].dropna()
res = stats.ols_trend(s.index.values, s.values)
num.add_trend_result(f'{col}.trend_{start}_{end}', res, units='degC/decade', decimals=3, inputs=list(SRC.values()), description=f"GHCNm v4 global land, {col.replace('_', ' ')}, trend {start}–{end} (this project's gridding)")
for key in ('qcu', 'qcf'):
num.add(f'stations_used_{key}', used[key], units='stations', decimals=0, kind='count', inputs=[SRC[key]], description=f"Stations with a 1961–1990 climatology ({('unadjusted' if key == 'qcu' else 'adjusted')} file)")
num.save()
print(f'ghcnm_adjustments: {len(num.items)} numbers; trends 1900–2024:', {k: v['value'] for k, v in num.items.items() if '1900_2024' in k})
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/ghg.py91 lines
from __future__ import annotations
import numpy as np
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/ghg.py'
SRC = {'mm': 'noaa_gml/co2_mm_mlo.txt', 'ann_mlo': 'noaa_gml/co2_annmean_mlo.txt', 'ann_gl': 'noaa_gml/co2_annmean_gl.txt', 'ch4': 'noaa_gml/ch4_annmean_gl.txt', 'n2o': 'noaa_gml/n2o_annmean_gl.txt', 'aggi': 'noaa_gml/AGGI_Table.csv', 'ice': 'ncei_paleo/antarctica2015co2composite.txt', 'c13_mlo': 'scripps_co2/monthly_flask_c13_mlo.csv', 'c13_spo': 'scripps_co2/monthly_flask_c13_spo.csv', 'o2_ljo': 'scripps_o2/monthly_o2_ljo.csv', 'o2_alt': 'scripps_o2/monthly_o2_alt.csv', 'o2_cgo': 'scripps_o2/monthly_o2_cgo.csv'}
MAUNAKEA_MONTHS = pd.period_range('2022-12', '2023-07', freq='M')
MIN_MONTHS = 10
def annual_mean(df: pd.DataFrame, column: str) -> pd.Series:
grouped = df.groupby('year')[column]
return grouped.mean().where(grouped.count() >= MIN_MONTHS)
def main() -> int:
num = Numbers('ghg', SCRIPT)
ice = R.ncei_paleo_tab(R.RAW / SRC['ice']).df.rename(columns=str.strip)
ice['year_ce'] = 1950 - ice['age_gas_calBP']
ice['pre_1850'] = ice['year_ce'] < 1850
ice = ice.sort_values('age_gas_calBP', ascending=False).reset_index(drop=True)
write_table(ice, 'co2_ice_core_composite', script=SCRIPT, inputs=[SRC['ice']], units={'age_gas_calBP': 'years before 1950', 'co2_ppm': 'ppm', 'co2_1s_ppm': 'ppm (1 sigma)', 'year_ce': 'year CE', 'pre_1850': 'boolean'}, description='Antarctic composite ice-core CO₂, 805,669 BP to 2001 CE (Bereiter et al. 2015 compilation).', notes=['Gas-age resolution ranges from decades in the youngest (Law Dome) section to centuries in the oldest (Dome C).', 'Samples from 1850 CE onward overlap the instrumental record and are excluded from the pre-industrial range.'])
pre = ice[ice.pre_1850]
num.add('ice.pre1850_min', pre.co2_ppm.min(), units='ppm', decimals=0, inputs=[SRC['ice']], description='Lowest ice-core CO₂ before 1850 CE in the 800,000-year composite')
num.add('ice.pre1850_max', pre.co2_ppm.max(), units='ppm', decimals=0, inputs=[SRC['ice']], description='Highest ice-core CO₂ before 1850 CE in the 800,000-year composite')
num.add('ice.pre1850_max_age_bp', pre.loc[pre.co2_ppm.idxmax(), 'age_gas_calBP'], units='years BP', decimals=-3, inputs=[SRC['ice']], description='Gas age of that pre-1850 maximum, rounded to thousands of years')
late = ice[(ice.year_ce >= 1700) & (ice.year_ce < 1800)]
num.add('ice.mean_1700_1799', late.co2_ppm.mean(), units='ppm', decimals=0, inputs=[SRC['ice']], description=f'Mean ice-core CO₂ for samples dated 1700–1799 CE (n = {len(late)})')
num.add('ice.oldest_age_bp', ice.age_gas_calBP.max(), units='years BP', decimals=-3, inputs=[SRC['ice']], description='Oldest sample in the composite')
mm = R.gml_text(R.RAW / SRC['mm'], R.CO2_MONTHLY_COLUMNS).df
period = pd.PeriodIndex.from_fields(year=mm.year, month=mm.month, freq='M')
monthly = pd.DataFrame({'decimal_date': mm.decimal_date, 'year': mm.year, 'month': mm.month, 'co2_ppm': mm.average, 'co2_deseasonalized_ppm': mm.deseasonalized, 'no_daily_observations': mm.ndays.isna(), 'maunakea_site': period.isin(MAUNAKEA_MONTHS)})
write_table(monthly, 'co2_mauna_loa_monthly', script=SCRIPT, inputs=[SRC['mm']], units={'decimal_date': 'year', 'year': 'year', 'month': 'month', 'co2_ppm': 'ppm', 'co2_deseasonalized_ppm': 'ppm', 'no_daily_observations': 'boolean', 'maunakea_site': 'boolean'}, description='Monthly mean CO₂ at Mauna Loa (Scripps before May 1974, NOAA after), dry-air mole fraction.', notes=['no_daily_observations marks months whose provider value has no daily-count information (interpolated for NOAA data; unknown for Scripps-era months).', 'maunakea_site marks December 2022–July 2023, when observations came from Maunakea after the Mauna Loa eruption (provider header).'])
ann = R.gml_text(R.RAW / SRC['ann_mlo'], R.ANNUAL_MEAN_COLUMNS).df.set_index('year')['mean']
glob = R.gml_text(R.RAW / SRC['ann_gl'], R.ANNUAL_MEAN_COLUMNS).df.set_index('year')['mean']
ch4 = R.gml_text(R.RAW / SRC['ch4'], R.ANNUAL_MEAN_COLUMNS).df.set_index('year')['mean']
n2o = R.gml_text(R.RAW / SRC['n2o'], R.ANNUAL_MEAN_COLUMNS).df.set_index('year')['mean']
annual = pd.DataFrame({'co2_mlo_ppm': ann, 'co2_global_ppm': glob, 'ch4_global_ppb': ch4, 'n2o_global_ppb': n2o})
annual.index.name = 'year'
write_table(annual.reset_index(), 'ghg_annual', script=SCRIPT, inputs=[SRC['ann_mlo'], SRC['ann_gl'], SRC['ch4'], SRC['n2o']], units={'year': 'year', 'co2_mlo_ppm': 'ppm', 'co2_global_ppm': 'ppm', 'ch4_global_ppb': 'ppb', 'n2o_global_ppb': 'ppb'}, description='Annual mean CO₂ (Mauna Loa and global marine surface), CH₄ and N₂O (global), NOAA GML.')
first, last = (int(ann.index.min()), int(ann.index.max()))
num.add('mlo.first_year', first, units='year', decimals=0, kind='year', inputs=[SRC['ann_mlo']], description='First complete year of Mauna Loa annual means')
num.add('mlo.first_value', ann.loc[first], units='ppm', decimals=1, inputs=[SRC['ann_mlo']], description=f'Mauna Loa annual mean CO₂ in {first}')
num.add('mlo.last_value', ann.loc[last], units='ppm', decimals=1, inputs=[SRC['ann_mlo']], description=f'Mauna Loa annual mean CO₂ in {last}')
num.add('mlo.increase', ann.loc[last] - ann.loc[first], units='ppm', decimals=0, inputs=[SRC['ann_mlo']], description=f'Increase in Mauna Loa annual mean CO₂, {first}–{last}')
num.add('mlo.growth_2016_2025', (ann.loc[2025] - ann.loc[2015]) / 10, units='ppm/yr', decimals=2, inputs=[SRC['ann_mlo']], description='Average annual growth of Mauna Loa CO₂, 2016–2025 (2025 minus 2015, divided by 10)')
num.add('mlo.growth_1960s', (ann.loc[1969] - ann.loc[1959]) / 10, units='ppm/yr', decimals=2, inputs=[SRC['ann_mlo']], description='Average annual growth of Mauna Loa CO₂, 1960–1969')
num.add('mlo.pct_above_1700s', (ann.loc[last] / late.co2_ppm.mean() - 1) * 100, units='%', decimals=0, kind='percent', inputs=[SRC['ann_mlo'], SRC['ice']], description=f'{last} Mauna Loa CO₂ relative to the 1700–1799 ice-core mean')
num.add('mlo.ppm_above_pre1850_max', ann.loc[last] - pre.co2_ppm.max(), units='ppm', decimals=0, inputs=[SRC['ann_mlo'], SRC['ice']], description=f'{last} Mauna Loa CO₂ minus the highest pre-1850 ice-core value')
for gas, series, units in (('co2_global', glob, 'ppm'), ('ch4_global', ch4, 'ppb'), ('n2o_global', n2o, 'ppb')):
num.add(f'{gas}.last_value', series.loc[series.index.max()], units=units, decimals=1, inputs=[SRC['ann_gl']], description=f"Global annual mean {gas.split('_')[0].upper()} in {int(series.index.max())}")
num.add('mlo.maunakea_months', int(monthly.maunakea_site.sum()), units='months', decimals=0, kind='count', inputs=[SRC['mm']], description='Months partly or wholly measured at Maunakea after the 2022 eruption')
aggi = R.aggi(R.RAW / SRC['aggi']).df
write_table(aggi, 'aggi_forcing', script=SCRIPT, inputs=[SRC['aggi']], units={'year': 'year', 'co2': 'W m-2', 'ch4': 'W m-2', 'n2o': 'W m-2', 'cfc_major': 'W m-2', 'hcfc': 'W m-2', 'hfc_minor': 'W m-2', 'total_wm2': 'W m-2', 'co2eq_ppm': 'ppm', 'aggi_1990_1': 'index', 'change_pct': '%'}, baseline='radiative forcing relative to 1750 (NOAA AGGI)', description='Radiative forcing by long-lived greenhouse gases computed by NOAA from measured concentrations (AGGI).')
last_aggi = aggi.iloc[-1]
num.add('aggi.co2_last', last_aggi.co2, units='W m-2', decimals=2, inputs=[SRC['aggi']], description=f'CO₂ radiative forcing in {int(last_aggi.year)} (NOAA AGGI)')
num.add('aggi.total_last', last_aggi.total_wm2, units='W m-2', decimals=2, inputs=[SRC['aggi']], description=f'Total long-lived GHG forcing in {int(last_aggi.year)} (NOAA AGGI)')
num.add('aggi.co2_share_last', 100 * last_aggi.co2 / last_aggi.total_wm2, units='%', decimals=0, kind='percent', inputs=[SRC['aggi']], description='CO₂ share of long-lived GHG forcing in the latest AGGI year')
num.add('aggi.last_year', int(last_aggi.year), units='year', decimals=0, kind='year', inputs=[SRC['aggi']], description='Latest year in the AGGI table')
scripps = {key: R.scripps_monthly(R.RAW / SRC[key]).df for key in ('c13_mlo', 'c13_spo', 'o2_ljo', 'o2_alt', 'o2_cgo')}
fp = monthly[['decimal_date', 'year', 'month', 'co2_deseasonalized_ppm']].copy()
for key, df in scripps.items():
fp = fp.merge(df[['year', 'month', 'value_sa']].rename(columns={'value_sa': f'{key}_sa'}), on=['year', 'month'], how='outer')
fp = fp.sort_values(['year', 'month']).reset_index(drop=True)
fp['decimal_date'] = fp['year'] + (fp['month'] - 0.5) / 12
fp = fp[(fp.year >= 1977) & (fp.year <= 2026)]
write_table(fp, 'fossil_fingerprint_monthly', script=SCRIPT, inputs=[SRC[k] for k in ('mm', 'c13_mlo', 'c13_spo', 'o2_ljo', 'o2_alt', 'o2_cgo')], units={'decimal_date': 'year', 'year': 'year', 'month': 'month', 'co2_deseasonalized_ppm': 'ppm', 'c13_mlo_sa': 'per mil (VPDB, Scripps scale)', 'c13_spo_sa': 'per mil (VPDB, Scripps scale)', 'o2_ljo_sa': 'per meg (SIO2023 scale)', 'o2_alt_sa': 'per meg (SIO2023 scale)', 'o2_cgo_sa': 'per meg (SIO2023 scale)'}, description='Monthly seasonally adjusted CO₂ (Mauna Loa), δ¹³C of CO₂ (Mauna Loa, South Pole) and atmospheric O₂/N₂ (La Jolla, Alert, Cape Grim).', method='Measured, seasonally adjusted columns only; provider spline fits and gap-filled values are not used.', notes=['A falling δ¹³C and falling O₂ are what burning organic carbon produces — fossil or biospheric; the O₂ budget shows the land biosphere has been a net sink (Manning & Keeling 2006), which leaves fossil carbon as the source.'])
yearly = pd.DataFrame({key: annual_mean(df, 'value_sa') for key, df in scripps.items()})
yearly['co2_mlo'] = ann
yearly['o2_mean_3_stations'] = yearly[['o2_ljo', 'o2_alt', 'o2_cgo']].mean(axis=1).where(yearly[['o2_ljo', 'o2_alt', 'o2_cgo']].notna().all(axis=1))
yearly.index.name = 'year'
yearly = yearly.loc[1977:2025]
write_table(yearly.reset_index(), 'fossil_fingerprint_annual', script=SCRIPT, inputs=[SRC[k] for k in ('ann_mlo', 'c13_mlo', 'c13_spo', 'o2_ljo', 'o2_alt', 'o2_cgo')], units={'year': 'year', 'c13_mlo': 'per mil', 'c13_spo': 'per mil', 'o2_ljo': 'per meg', 'o2_alt': 'per meg', 'o2_cgo': 'per meg', 'co2_mlo': 'ppm', 'o2_mean_3_stations': 'per meg'}, description='Annual means (years with ≥ 10 measured months) of the fingerprint series.')
for key, label, units, dec in (('c13_mlo', 'δ¹³C at Mauna Loa', 'per mil', 3), ('c13_spo', 'δ¹³C at South Pole', 'per mil', 3), ('o2_mean_3_stations', 'O₂/N₂ (mean of La Jolla, Alert, Cape Grim)', 'per meg', 1)):
s = yearly[key].dropna()
if units == 'per mil':
res = stats.ols_trend(s.index.values, s.values)
num.add_trend_result(f'{key}.trend', res, units='per mil/decade', decimals=dec, kind='value', inputs=[SRC[key]], description=f'{label}: OLS trend {int(s.index.min())}–{int(s.index.max())} (AR(1) 95% CI)')
else:
num.add(f'{key}.mean_rate', (s.iloc[-1] - s.iloc[0]) / (s.index[-1] - s.index[0]), units='per meg/yr', decimals=1, inputs=[SRC['o2_ljo'], SRC['o2_alt'], SRC['o2_cgo']], description=f'{label}: average rate, last minus first complete annual mean divided by the years between')
num.add(f'{key}.first_year', int(s.index.min()), units='year', decimals=0, kind='year', inputs=[SRC.get(key, SRC['o2_ljo'])], description=f'First complete year for {label}')
num.add(f'{key}.last_year', int(s.index.max()), units='year', decimals=0, kind='year', inputs=[SRC.get(key, SRC['o2_ljo'])], description=f'Last complete year for {label}')
num.add(f'{key}.change', s.iloc[-1] - s.iloc[0], units=units, decimals=dec, inputs=[SRC.get(key, SRC['o2_ljo'])], description=f'{label}: last complete annual mean minus first')
both = yearly[['o2_mean_3_stations', 'co2_mlo']].dropna()
num.add('co2_mlo.change_over_o2_years', both.co2_mlo.iloc[-1] - both.co2_mlo.iloc[0], units='ppm', decimals=0, inputs=[SRC['ann_mlo']], description=f'Mauna Loa CO₂ change over the same years as the O₂ record ({int(both.index.min())}–{int(both.index.max())})')
num.save()
print(f'ghg: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/global_temp.py184 lines
from __future__ import annotations
import itertools
import json
import numpy as np
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import PROCESSED, Numbers, clean_floats, dump_json, write_table
SCRIPT = 'scripts/process/global_temp.py'
SRC = {'noaa': 'noaa_cag/global_land_ocean_12mo_dec_1850-2025.csv', 'hc_ens': 'hadcrut5/HadCRUT.5.0.2.0.analysis.ensemble_series.global.annual.csv', 'gis_glb': 'gistemp/GLB.Ts+dSST.csv', 'gis_nh': 'gistemp/NH.Ts+dSST.csv', 'gis_zon': 'gistemp/ZonAnn.Ts+dSST.csv', 'gis_ci': 'gistemp/totalCI_ERA_v1.2.1.csv', 'be_lo': 'berkeley/Land_and_Ocean_summary.txt', 'be_tmax': 'berkeley/Complete_TMAX_summary.txt', 'be_tmin': 'berkeley/Complete_TMIN_summary.txt'}
PRE = (1850, 1900)
LAST_COMPLETE = 2025
DATASETS = ['hadcrut5', 'noaaglobaltemp', 'gistemp', 'berkeley']
ANTARCTIC_MASK_BEFORE = 1957
def per_decade(result: dict) -> dict:
return {k: 10 * result[k] for k in ('slope', 'ci_low', 'ci_high', 'ci_low_arma', 'ci_high_arma')}
def build_annual() -> tuple[pd.DataFrame, dict]:
years = pd.RangeIndex(1850, LAST_COMPLETE + 1, name='year')
df = pd.DataFrame(index=years)
noaa = R.cag(R.RAW / SRC['noaa']).df.set_index('year')['value']
df['noaaglobaltemp'] = noaa - noaa.loc[PRE[0]:PRE[1]].mean()
ens = R.hadcrut5_ensemble(R.RAW / SRC['hc_ens']).df.set_index('year')
members = ens[[c for c in ens.columns if c.startswith('Realization')]]
members = members - members.loc[PRE[0]:PRE[1]].mean()
sd_total = np.sqrt(members.var(axis=1, ddof=1) + ens['coverage_sigma'] ** 2)
df['hadcrut5'] = members.mean(axis=1)
df['hadcrut5_lo'] = df['hadcrut5'] - 1.96 * sd_total
df['hadcrut5_hi'] = df['hadcrut5'] + 1.96 * sd_total
be = R.berkeley_summary(R.RAW / SRC['be_lo']).df.set_index('year')
df['berkeley'] = be['anomaly'] - be['anomaly'].loc[PRE[0]:PRE[1]].mean()
df['berkeley_lo'] = df['berkeley'] - be['unc95']
df['berkeley_hi'] = df['berkeley'] + be['unc95']
glb = R.gistemp_table(R.RAW / SRC['gis_glb']).df.set_index('year')['J-D'].dropna()
others = {k: float(df[k].loc[1880:1900].mean()) for k in ('hadcrut5', 'noaaglobaltemp', 'berkeley')}
offset = float(np.mean(list(others.values())))
df['gistemp'] = glb.loc[:LAST_COMPLETE] - glb.loc[1880:1900].mean() + offset
ci = R.gistemp_ci(R.RAW / SRC['gis_ci']).df.set_index('year')['ci95']
last_distinct = int(ci.index[-1])
while ci.loc[last_distinct] == ci.loc[last_distinct - 1]:
last_distinct -= 1
ci = ci.loc[:last_distinct]
df['gistemp_lo'] = df['gistemp'] - ci
df['gistemp_hi'] = df['gistemp'] + ci
df['mean_available'] = df[DATASETS].mean(axis=1)
df['n_datasets'] = df[DATASETS].notna().sum(axis=1)
info = {'gistemp_offset': offset, 'gistemp_offset_components': others, 'gistemp_offset_spread': max(others.values()) - min(others.values()), 'gistemp_ci_last_year': last_distinct, 'hadcrut5_coverage_sigma': {int(y): float(ens.loc[y, 'coverage_sigma']) for y in (2024, 2025)}}
return (df, info)
def trend_tables(df: pd.DataFrame) -> tuple[pd.DataFrame, pd.DataFrame]:
rows = []
for ds in DATASETS:
for start, end in ((1970, 2024), (1970, 2025), (1979, 2024), (1880, 2024)):
series = df[ds].loc[start:end].dropna()
if series.empty or series.index.min() > start or series.index.max() < end:
continue
res = stats.ols_trend(series.index.values, series.values)
dec = per_decade(res)
rows.append({'dataset': ds, 'start': start, 'end': end, 'slope_per_decade': dec['slope'], 'ci_low': dec['ci_low'], 'ci_high': dec['ci_high'], 'ci_low_arma': dec['ci_low_arma'], 'ci_high_arma': dec['ci_high_arma'], 'n': res['n'], 'r1': res['r1'], 'n_eff': res['n_eff']})
diffs = []
for a, b in itertools.combinations(DATASETS, 2):
pair = df[[a, b]].loc[1970:2024].dropna()
res = stats.trend_difference(pair.index.values, pair[a].values, pair[b].values)
dec = per_decade(res)
diffs.append({'dataset_a': a, 'dataset_b': b, 'start': 1970, 'end': 2024, 'diff_slope_per_decade': dec['slope'], 'ci_low': dec['ci_low'], 'ci_high': dec['ci_high'], 'excludes_zero': bool(dec['ci_low'] > 0 or dec['ci_high'] < 0)})
return (pd.DataFrame(rows), pd.DataFrame(diffs))
def escalator(series: pd.Series) -> tuple[pd.DataFrame, dict]:
s = series.loc[1970:LAST_COMPLETE].dropna()
years, values = (s.index.values, s.values)
segments, i = ([], 0)
while i < len(years):
chosen = None
for length in range(10, 6, -1):
if i + length <= len(years):
res = stats.ols_trend(years[i:i + length], values[i:i + length])
if res['slope'] < 0:
chosen = (length, res)
break
if chosen:
length, res = chosen
segments.append({'start': int(years[i]), 'end': int(years[i + length - 1]), 'slope_per_decade': 10 * res['slope'], 'intercept': res['intercept']})
i += length
else:
i += 1
windows = [stats.ols_trend(years[j:j + 10], values[j:j + 10])['slope'] for j in range(len(years) - 9)]
full = stats.ols_trend(years, values)
return (pd.DataFrame(segments), {'n_ten_year_windows': len(windows), 'n_negative_ten_year_windows': int(sum((w < 0 for w in windows))), 'weakest_ten_year_window': 10 * min(windows), 'full': full})
def zonal_seasonal_dtr() -> tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:
zon = R.gistemp_table(R.RAW / SRC['gis_zon']).df.set_index('year').loc[:LAST_COMPLETE]
zonal = pd.DataFrame({'global': zon['Glob'], 'arctic_64n_90n': zon['64N-90N'], 'tropics_24s_24n': zon['24S-24N'], 'antarctic_90s_64s': zon['90S-64S'].where(zon.index >= ANTARCTIC_MASK_BEFORE)})
nh = R.gistemp_table(R.RAW / SRC['gis_nh']).df.set_index('year').loc[:LAST_COMPLETE]
seasonal = pd.DataFrame({'nh_djf': nh['DJF'], 'nh_jja': nh['JJA'], 'nh_annual': nh['J-D']})
tmax = R.berkeley_summary(R.RAW / SRC['be_tmax']).df.set_index('year')['anomaly']
tmin = R.berkeley_summary(R.RAW / SRC['be_tmin']).df.set_index('year')['anomaly']
dtr = pd.DataFrame({'tmax': tmax, 'tmin': tmin, 'dtr': tmax - tmin})
return (zonal.reset_index(), seasonal.reset_index(), dtr.rename_axis('year').reset_index())
def main() -> int:
num = Numbers('global', SCRIPT)
raw_inputs = list(SRC.values())
annual, info = build_annual()
units = {c: 'degC' for c in annual.columns}
units.update(year='year', n_datasets='count')
write_table(annual.reset_index(), 'global_temperature_annual', script=SCRIPT, inputs=raw_inputs, units={'year': 'year', **units}, baseline='1850-1900 (all datasets; see method)', description='Annual global surface temperature anomalies from four reconstructions on a common 1850–1900 baseline, with the uncertainty each provider publishes.', method=f"HadCRUT5: each of 200 realizations re-baselined, central = ensemble mean, 95% = ±1.96·sqrt(ensemble variance + coverage σ²); NOAAGlobalTemp (CAG) and Berkeley Earth re-baselined directly, Berkeley envelope = published 95% (baseline uncertainty not propagated); GISTEMP: own 1880–1900 mean removed, then the other three datasets' mean 1880–1900 anomaly ({info['gistemp_offset']:.3f} °C) added; GISTEMP envelope = v1.2.1 95% half-widths, ending {info['gistemp_ci_last_year']} (later years repeat). NOAAGlobalTemp v6 publishes no usable uncertainty.", notes=['2026 excluded (partial year).', 'Berkeley Earth ends 2024.', f"HadCRUT5 2025 is provisional: coverage σ {info['hadcrut5_coverage_sigma'][2025]:.3f} °C vs {info['hadcrut5_coverage_sigma'][2024]:.3f} °C in 2024.", 'Shared inputs: GISTEMP and NOAAGlobalTemp use GHCNm v4 land and ERSSTv5 ocean data; HadCRUT5 and Berkeley Earth use HadSST4.'])
trends, diffs = trend_tables(annual)
write_table(trends, 'global_temperature_trends', script=SCRIPT, inputs=raw_inputs, units={'dataset': 'name', 'start': 'year', 'end': 'year', 'slope_per_decade': 'degC/decade', 'ci_low': 'degC/decade', 'ci_high': 'degC/decade', 'ci_low_arma': 'degC/decade', 'ci_high_arma': 'degC/decade', 'n': 'count', 'r1': 'dimensionless', 'n_eff': 'count'}, description='OLS trends of the annual series in global_temperature_annual.', method='OLS; 95% CI with AR(1) effective sample size (Santer et al. 2000); ARMA(1,1) interval (Foster & Rahmstorf 2011) as sensitivity.')
write_table(diffs, 'global_temperature_trend_diffs', script=SCRIPT, inputs=raw_inputs, units={'dataset_a': 'name', 'dataset_b': 'name', 'start': 'year', 'end': 'year', 'diff_slope_per_decade': 'degC/decade', 'ci_low': 'degC/decade', 'ci_high': 'degC/decade', 'excludes_zero': 'boolean'}, description='Trend of the difference series for each pair of datasets, 1970–2024.', method='OLS + AR(1) on a(t) − b(t) (Santer et al. 2000).')
main_trends = trends[(trends.start == 1970) & (trends.end == 2024)].set_index('dataset')
if len(main_trends) != len(DATASETS):
raise ValueError(f'expected {len(DATASETS)} datasets over 1970–2024, got {sorted(main_trends.index)}')
if (main_trends.n_eff < stats.MIN_N_EFF).any():
raise ValueError(f'A 1970–2024 trend has n_eff below {stats.MIN_N_EFF}: {main_trends.n_eff.round(2).to_dict()}')
for ds, row in main_trends.iterrows():
num.add(f'trend_1970_2024.{ds}', row.slope_per_decade, units='degC/decade', decimals=3, kind='delta_temp', ci=(row.ci_low, row.ci_high), inputs=raw_inputs, description=f'{ds} OLS trend 1970–2024, AR(1)-adjusted 95% CI')
num.add('trend_1970_2024.min', main_trends.slope_per_decade.min(), units='degC/decade', decimals=3, kind='delta_temp', inputs=raw_inputs, description='Smallest of the four 1970–2024 trends')
num.add('trend_1970_2024.max', main_trends.slope_per_decade.max(), units='degC/decade', decimals=3, kind='delta_temp', inputs=raw_inputs, description='Largest of the four 1970–2024 trends')
num.add('trend_1970_2024.spread', main_trends.slope_per_decade.max() - main_trends.slope_per_decade.min(), units='degC/decade', decimals=3, kind='delta_temp', inputs=raw_inputs, description='Largest minus smallest 1970–2024 trend across the four datasets')
num.add('trend_1970_2024.spread_cumulated', (main_trends.slope_per_decade.max() - main_trends.slope_per_decade.min()) * 55 / 10, units='degC', decimals=2, kind='delta_temp', inputs=raw_inputs, description="How far apart the four datasets' 1970–2024 trends put the total warming over that period: the spread in trend multiplied by the length of the period")
for ds, row in trends[(trends.start == 1970) & (trends.end == 2025)].set_index('dataset').iterrows():
if row.n_eff < stats.MIN_N_EFF:
continue
num.add(f'trend_1970_2025.{ds}', row.slope_per_decade, units='degC/decade', decimals=3, kind='delta_temp', ci=(row.ci_low, row.ci_high), inputs=raw_inputs, description=f'{ds} OLS trend 1970–2025')
num.add('trenddiff_1970_2024.max_abs', diffs.diff_slope_per_decade.abs().max(), units='degC/decade', decimals=3, kind='delta_temp', inputs=raw_inputs, description='Largest absolute difference-series trend between any two datasets, 1970–2024')
num.add('trenddiff_1970_2024.n_excluding_zero', int(diffs.excludes_zero.sum()), units='pairs', decimals=0, kind='count', inputs=raw_inputs, description='Dataset pairs whose difference trend CI excludes zero (of 6)')
decade_means = []
for ds in DATASETS:
decade = annual[ds].loc[2015:2024]
if decade.notna().sum() == 10:
decade_means.append(float(decade.mean()))
num.add(f'mean_2015_2024.{ds}', decade.mean(), units='degC', decimals=2, kind='delta_temp', inputs=raw_inputs, description=f'{ds} mean anomaly 2015–2024 relative to 1850–1900')
warmest = annual[ds].idxmax()
num.add(f'warmest_year.{ds}', warmest, units='year', decimals=0, kind='year', inputs=raw_inputs, description=f'Warmest complete year in {ds} (2026 excluded)')
for name, value in (('min', min(decade_means)), ('max', max(decade_means))):
num.add(f'mean_2015_2024.{name}', value, units='degC', decimals=2, kind='delta_temp', inputs=raw_inputs, description=f'{name.capitalize()}imum across the datasets of the mean anomaly 2015–2024 relative to 1850–1900')
for year in (2024, 2025):
num.add(f'hadcrut5_coverage_sigma_{year}', info['hadcrut5_coverage_sigma'][year], units='degC', decimals=3, kind='delta_temp', inputs=[SRC['hc_ens']], description=f'HadCRUT5 coverage uncertainty (1σ), {year}')
num.add('gistemp_offset', info['gistemp_offset'], units='degC', decimals=3, kind='delta_temp', inputs=raw_inputs, description="Offset added to GISTEMP (other datasets' mean 1880–1900 anomaly vs 1850–1900)")
num.add('gistemp_offset_spread', info['gistemp_offset_spread'], units='degC', decimals=3, kind='delta_temp', inputs=raw_inputs, description='Range of the 1880–1900 means across HadCRUT5, NOAAGlobalTemp, Berkeley Earth')
num.add('gistemp_ci_last_year', info['gistemp_ci_last_year'], units='year', decimals=0, kind='year', inputs=[SRC['gis_ci']], description='Last year of the GISTEMP v1.2.1 envelope with a distinct value')
segments, esc = escalator(annual['mean_available'])
full_row = {'start': 1970, 'end': LAST_COMPLETE, 'slope_per_decade': 10 * esc['full']['slope'], 'intercept': esc['full']['intercept'], 'kind': 'full_record'}
escalator_table = pd.concat([segments.assign(kind='cooling_window'), pd.DataFrame([full_row])], ignore_index=True)
write_table(escalator_table, 'global_escalator_segments', script=SCRIPT, inputs=raw_inputs, units={'start': 'year', 'end': 'year', 'slope_per_decade': 'degC/decade', 'intercept': 'degC', 'kind': 'name'}, description='Short windows (7–10 years) with a negative OLS trend inside 1970–2025, found by a forward greedy search, plus the full-record trend.', baseline='1850-1900', method='From 1970, take the longest 7–10 year window with a negative OLS slope; otherwise advance one year. Fitted value = intercept + (slope_per_decade / 10) × year.')
num.add('escalator.n_segments', len(segments), units='windows', decimals=0, kind='count', inputs=raw_inputs, description='Number of short cooling windows found by the V14 search')
num.add('escalator.n_negative_10yr', esc['n_negative_ten_year_windows'], units='windows', decimals=0, kind='count', inputs=raw_inputs, description='10-year windows (of all start years) with a negative trend, 1970–2025')
num.add('escalator.n_10yr', esc['n_ten_year_windows'], units='windows', decimals=0, kind='count', inputs=raw_inputs, description='All 10-year windows in 1970–2025')
num.add('escalator.weakest_10yr', esc['weakest_ten_year_window'], units='degC/decade', decimals=3, kind='delta_temp', inputs=raw_inputs, description='Trend of the weakest of the 10-year windows in 1970–2025: the closest any of them comes to cooling, which a count of zero negative windows does not show')
num.add('escalator.full_trend', 10 * esc['full']['slope'], units='degC/decade', decimals=3, kind='delta_temp', ci=(10 * esc['full']['ci_low'], 10 * esc['full']['ci_high']), inputs=raw_inputs, description='Trend of the multi-dataset mean 1970–2025')
mean_series = annual['mean_available'].loc[1970:LAST_COMPLETE]
cp = stats.changepoint_bic(mean_series.index.values, mean_series.values, max_breaks=2, min_segment=8)
dump_json(clean_floats(cp), PROCESSED / 'global_changepoints.json')
num.add('changepoint.selected_breaks', cp['selected_breaks'], units='breaks', decimals=0, kind='count', inputs=raw_inputs, description='Breaks selected by the pre-registered BIC rule, 1970–2025')
one = cp['models']['1']
num.add('changepoint.best_one_break_year', one['breaks'][0], units='year', decimals=0, kind='year', inputs=raw_inputs, description='Location of the best single break (whether or not selected)')
num.add('changepoint.delta_bic_one_vs_linear', cp['models']['0']['bic'] - one['bic'], units='BIC', decimals=1, inputs=raw_inputs, description='BIC(linear) minus BIC(one break); ≥ 2 needed to select a break')
zonal, seasonal, dtr = zonal_seasonal_dtr()
write_table(zonal, 'gistemp_zonal_annual', script=SCRIPT, inputs=[SRC['gis_zon']], units={c: 'degC' for c in zonal.columns} | {'year': 'year'}, baseline='1951-1980 (GISTEMP)', description='GISTEMP v4 zonal annual anomalies; Antarctic band masked before 1957 (no coverage).')
write_table(seasonal, 'gistemp_seasonal_nh', script=SCRIPT, inputs=[SRC['gis_nh']], units={c: 'degC' for c in seasonal.columns} | {'year': 'year'}, baseline='1951-1980 (GISTEMP)', description="GISTEMP v4 northern-hemisphere winter (DJF, labelled by January's year) and summer (JJA) anomalies.")
write_table(dtr, 'berkeley_land_tmax_tmin', script=SCRIPT, inputs=[SRC['be_tmax'], SRC['be_tmin']], units={'year': 'year', 'tmax': 'degC', 'tmin': 'degC', 'dtr': 'degC'}, baseline='Jan 1951-Dec 1980 (Berkeley Earth)', description='Berkeley Earth global land TMAX and TMIN anomalies and their difference (diurnal range anomaly).')
z = zonal.set_index('year')
for col, label in (('global', 'global'), ('arctic_64n_90n', 'arctic'), ('tropics_24s_24n', 'tropics'), ('antarctic_90s_64s', 'antarctic')):
res = stats.ols_trend(z.loc[1979:LAST_COMPLETE].index.values, z.loc[1979:LAST_COMPLETE, col].values)
num.add_trend_result(f'zonal_trend_1979_2025.{label}', res, units='degC/decade', decimals=3, inputs=[SRC['gis_zon']], description=f'GISTEMP {label} band trend 1979–2025')
ratio = stats.ols_trend(z.loc[1979:].index.values, z.loc[1979:, 'arctic_64n_90n'].values)['slope'] / stats.ols_trend(z.loc[1979:].index.values, z.loc[1979:, 'global'].values)['slope']
num.add('arctic_amplification_1979_2025', ratio, units='ratio', decimals=1, inputs=[SRC['gis_zon']], description='GISTEMP 64N–90N trend divided by global trend, 1979–2025')
s = seasonal.set_index('year')
for col in ('nh_djf', 'nh_jja'):
span = s[col].loc[1970:LAST_COMPLETE].dropna()
res = stats.ols_trend(span.index.values, span.values)
num.add_trend_result(f'seasonal_trend_1970_2025.{col}', res, units='degC/decade', decimals=3, inputs=[SRC['gis_nh']], description=f'GISTEMP {col.upper()} trend 1970–2025')
d = dtr.set_index('year')
for start, end in ((1950, 1979), (1979, 2023)):
for col in ('tmax', 'tmin', 'dtr'):
res = stats.ols_trend(d.loc[start:end].index.values, d.loc[start:end, col].values)
num.add_trend_result(f'land_{col}_trend_{start}_{end}', res, units='degC/decade', decimals=3, inputs=[SRC['be_tmax'], SRC['be_tmin']], description=f'Berkeley land {col} trend {start}–{end}')
num.save()
print(f'global_temp: {len(num.items)} numbers; trends 1970–2024:', json.dumps({k: round(v, 3) for k, v in main_trends.slope_per_decade.items()}))
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/hurricanes.py33 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/hurricanes.py'
SRC = {'hrd': 'noaa_hrd/All_U.S._Hurricanes.html'}
START, END = (1900, 2025)
def main() -> int:
num = Numbers('hurricanes', SCRIPT)
df = R.hrd_us_hurricanes(R.RAW / SRC['hrd']).df
listed = set(df.year)
missing_years = [y for y in range(START, END + 1) if y not in listed]
if missing_years:
raise ValueError(f"HRD table has no line (not even 'None') for years {missing_years}")
impacts = df[df.max_category >= 1]
years = pd.RangeIndex(START, END + 1, name='year')
counts = pd.DataFrame({'hurricanes': impacts.groupby('year').size().reindex(years, fill_value=0), 'major_hurricanes': impacts[impacts.max_category >= 3].groupby('year').size().reindex(years, fill_value=0)})
write_table(counts.reset_index(), 'us_hurricane_impacts_annual', script=SCRIPT, inputs=[SRC['hrd']], units={'year': 'year', 'hurricanes': 'count', 'major_hurricanes': 'count'}, description='Continental US hurricane impacts per year (category ≥ 1 and ≥ 3 in at least one state), NOAA AOML Hurricane Research Division, 1900–2025.', method='Highest category derived from the per-state Saffir–Simpson codes on each line; lines marked tropical-storm conditions only are excluded.', notes=['Includes storms that brought hurricane-force winds without a US landfall (*), Mexican landfalls with hurricane winds in Texas (#), and landfalls whose strongest winds stayed offshore (&) when a category is given.', 'HRD notes records are incomplete for some coastlines before 1900; the analysis starts in 1900.'])
for column, label in (('hurricanes', 'all hurricane impacts'), ('major_hurricanes', 'major hurricane impacts')):
fit = stats.poisson_trend(counts.index.values, counts[column].values)
num.add(f'{column}.p_lr', fit['p_lr'], units='p-value', decimals=2, inputs=[SRC['hrd']], description=f'Likelihood-ratio p-value for a trend in {label}, 1900–2025 (pre-registered Poisson regression)')
num.add(f'{column}.rate_ratio_per_century', fit['rate_ratio_per_100'], units='ratio per century', decimals=2, ci=(fit['rr100_ci_low'], fit['rr100_ci_high']), inputs=[SRC['hrd']], description=f'Poisson rate ratio per century for {label}, 1900–2025 (Wald 95% CI)')
num.add(f'{column}.dispersion', fit['dispersion'], units='ratio', decimals=2, inputs=[SRC['hrd']], description=f'Pearson dispersion for {label} (≈ 1 means Poisson is adequate)')
num.add(f'{column}.mean_per_year', counts[column].mean(), units='per year', decimals=2, inputs=[SRC['hrd']], description=f'Mean {label} per year, 1900–2025')
num.add(f'{column}.total', int(counts[column].sum()), units='count', decimals=0, kind='count', inputs=[SRC['hrd']], description=f'Total {label}, 1900–2025')
num.save()
print(f'hurricanes: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/hydro_fire_snow.py78 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import PROCESSED, Numbers, write_table
SCRIPT = 'scripts/process/hydro_fire_snow.py'
SRC = {'kings': 'cdec/station_search_kings_river.html', 'sanjoaquin': 'cdec/station_search_san_joaquin_river.html', 'frap': 'calfire_frap/acres_by_year.json', 'fires': 'calfire_frap/thomas_woolsey.json', 'frap_meta': 'calfire_frap/layer_metadata.json'}
WS_TABLE = 'data/processed/california_warm_season_tmax.csv'
REF = (1951, 2000)
COVERAGE = 0.9
MIN_SHARE_REPORTING = 0.75
def swe_index(april: pd.DataFrame, start: int, end: int) -> tuple[pd.DataFrame, list[str]]:
years = range(start, end + 1)
span = april.loc[start:end]
keep = [c for c in span.columns if span[c].notna().sum() >= COVERAGE * len(years)]
means = april.loc[REF[0]:REF[1], keep].mean()
pct = 100 * span[keep] / means
reporting = pct.notna().sum(axis=1)
index = pct.mean(axis=1).where(reporting >= MIN_SHARE_REPORTING * len(keep))
return (pd.DataFrame({'index_pct': index, 'courses_reporting': reporting}), keep)
def main() -> int:
num = Numbers('hydro_fire_snow', SCRIPT)
stations = {s['id']: s for p in (SRC['kings'], SRC['sanjoaquin']) for s in R.cdec_station_search(R.RAW / p)}
april = {}
inputs = [SRC['kings'], SRC['sanjoaquin']]
for sid in sorted(stations):
rel = f'cdec/snow_wc_monthly/{sid}.csv'
inputs.append(rel)
df = R.cdec_monthly(R.RAW / rel).df
sel = df[(df.nominal.dt.month == 4) & df.value.notna()]
april[sid] = pd.Series(sel.value.values, index=sel.nominal.dt.year.values)
april = pd.DataFrame(april).sort_index()
april.index.name = 'year'
idx1950, keep1950 = swe_index(april, 1950, 2025)
idx1930, keep1930 = swe_index(april, 1930, 2025)
table = pd.DataFrame({'index_pct_1950_set': idx1950.index_pct, 'courses_1950_set': idx1950.courses_reporting})
table = table.join(pd.DataFrame({'index_pct_1930_set': idx1930.index_pct, 'courses_1930_set': idx1930.courses_reporting}), how='outer')
write_table(table.reset_index(), 'sierra_april1_swe_index', script=SCRIPT, inputs=inputs, units={'year': 'year', 'index_pct_1950_set': '% of 1951–2000 mean', 'courses_1950_set': 'courses', 'index_pct_1930_set': '% of 1951–2000 mean', 'courses_1930_set': 'courses'}, baseline="each course's own 1951–2000 April mean", description="April 1 snow water equivalent index for manual snow courses in the Kings and San Joaquin basins (CDEC): mean across courses of each course's April value as a percent of its 1951–2000 mean.", method=f'Courses kept if they report April values in ≥ {int(COVERAGE * 100)}% of the index years; a year counts if ≥ {int(MIN_SHARE_REPORTING * 100)}% of kept courses report.', notes=['April 1 values are nominal; survey dates usually fall in the preceding weeks.', 'Courses in these basins sit at about 6,000–11,500 ft; high-elevation Sierra snowpack is expected to respond more slowly to warming than lower sites.'])
inv = pd.DataFrame([{'course': sid, 'name': stations[sid]['name'], 'basin': stations[sid]['basin'], 'elev_ft': stations[sid]['elev_ft'], 'in_1950_set': sid in keep1950, 'in_1930_set': sid in keep1930, 'april_values_1950_2025': int(april.loc[1950:2025, sid].notna().sum()) if sid in april else 0} for sid in sorted(stations)])
write_table(inv, 'sierra_snow_courses', script=SCRIPT, inputs=[SRC['kings'], SRC['sanjoaquin']], units={'course': 'id', 'name': 'name', 'basin': 'name', 'elev_ft': 'feet', 'in_1950_set': 'boolean', 'in_1930_set': 'boolean', 'april_values_1950_2025': 'years'}, description='CDEC snow courses in the Kings and San Joaquin basins and whether each meets the coverage rule.')
for label, idx, keep, start in (('1950', idx1950, keep1950, 1950), ('1930', idx1930, keep1930, 1930)):
s = idx.index_pct.dropna()
res = stats.ols_trend(s.index.values, s.values)
num.add_trend_result(f'swe_{label}_set.trend', res, units='percentage points/decade', decimals=1, kind='value', inputs=inputs, description=f'April 1 SWE index trend {int(s.index.min())}–{int(s.index.max())}, {len(keep)} courses (OLS + AR(1))')
num.add(f'swe_{label}_set.n_courses', len(keep), units='courses', decimals=0, kind='count', inputs=inputs, description=f'Snow courses meeting the coverage rule for the {start}–2025 index')
num.add(f'swe_{label}_set.median_elev', inv[inv[f'in_{label}_set']].elev_ft.median(), units='feet', decimals=-2, inputs=inputs, description=f'Median elevation of the {start}–2025 index courses')
change = stats.period_mean_difference(s.index.values, s.values, (start, start + 29), (1996, 2025))
num.add(f'swe_{label}_set.change', change['difference'], units='percentage points', decimals=0, ci=(change['ci_low'], change['ci_high']), n_eff=change['n_eff'], inputs=inputs, description=f'April 1 SWE index: mean 1996–2025 minus mean {start}–{start + 29}')
for year in (2015, 2023):
num.add(f'swe_1950_set.value_{year}', table.loc[year, 'index_pct_1950_set'], units='% of 1951–2000 mean', decimals=0, kind='percent', inputs=inputs, description=f'April 1 SWE index in {year}')
frap = R.frap_by_year(R.RAW / SRC['frap']).df.dropna(subset=['year'])
frap['year'] = frap['year'].astype(int)
frap = frap.set_index('year').loc[1950:2025]
frap = frap.reindex(range(1950, 2026), fill_value=0)
frap.index.name = 'year'
ws = pd.read_csv(PROCESSED / 'california_warm_season_tmax.csv').set_index('year')
fires = R.frap_fires(R.RAW / SRC['fires']).df.set_index('FIRE_NAME')
burned = pd.DataFrame({'acres': frap.acres, 'fires_mapped': frap.n_fires, 'tmax_apr_oct_anomaly_f': ws['anomaly_f'].reindex(frap.index)})
write_table(burned.reset_index(), 'california_burned_area', script=SCRIPT, inputs=[SRC['frap'], SRC['frap_meta'], WS_TABLE], units={'year': 'year', 'acres': 'acres', 'fires_mapped': 'count', 'tmax_apr_oct_anomaly_f': 'degF'}, baseline='Tmax anomaly vs 1901–2000', description="California area burned per year in CAL FIRE's fire perimeter database (all agencies), 1950–2025, with statewide April–October Tmax anomaly.", notes=['CAL FIRE warns the perimeter database should be used carefully for statistics (missing perimeters, lost records, minimum-size cutoffs, duplicates).', 'Fire is multi-causal: ignitions (mostly human), fuels and suppression history, wind events and development all matter alongside warming.'])
early, late = (burned.loc[1950:1999, 'acres'], burned.loc[2000:2025, 'acres'])
num.add('burned.mean_1950_1999', early.mean() / 1000000.0, units='million acres/yr', decimals=2, inputs=[SRC['frap']], description='Mean mapped area burned per year in California, 1950–1999')
num.add('burned.mean_2000_2025', late.mean() / 1000000.0, units='million acres/yr', decimals=2, inputs=[SRC['frap']], description='Mean mapped area burned per year in California, 2000–2025')
num.add('burned.max_year', int(burned.acres.idxmax()), units='year', decimals=0, kind='year', inputs=[SRC['frap']], description='Year with the largest mapped area burned, 1950–2025')
num.add('burned.max_acres', burned.acres.max() / 1000000.0, units='million acres', decimals=1, inputs=[SRC['frap']], description='Largest mapped annual area burned, 1950–2025')
for name in ('THOMAS', 'WOOLSEY'):
acres = float(fires.loc[name, 'GIS_ACRES'])
year = int(fires.loc[name, 'YEAR_'])
num.add(f'fire.{name.lower()}_acres', acres, units='acres', decimals=-3, inputs=[SRC['fires']], description=f'{name.title()} Fire ({year}) mapped area')
num.add(f'fire.{name.lower()}_share_of_year', 100 * acres / burned.loc[year, 'acres'], units='%', decimals=0, kind='percent', inputs=[SRC['fires'], SRC['frap']], description=f'{name.title()} Fire share of all mapped acres in {year}')
num.add(f'fire.{name.lower()}_year', year, units='year', decimals=0, kind='year', inputs=[SRC['fires']], description=f'Year of the {name.title()} Fire (FRAP record)')
num.save()
print(f'hydro_fire_snow: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/ocean_solar.py153 lines
from __future__ import annotations
import html
import re
import numpy as np
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import PROCESSED, Numbers, write_table
SCRIPT = 'scripts/process/ocean_solar.py'
SRC = {'iap': 'iap/IAPv4.2_OHC_estimate_update.txt', 'igcc': 'igcc/ClimateIndicator-data-v2025.06.11.zip', 'tsi': 'lisird/nrl2_tsi_P1Y.csv', 'eia': 'eia/total_energy_T01.01.csv', 'cag_ocean': 'noaa_cag/global_ocean_12mo_dec_1850-2025.csv', 'osti': 'history/osti_hiroshima.htm'}
TNT_J_PER_TON = 4184000000.0
UPTAKE_EARLY, UPTAKE_LATE = ((1960, 1990), (1996, 2025))
YIELD = re.compile('([\\d,]{4,})\\s+tons of TNT')
QUAD_BTU_ZJ = 1.055056e+18 / 1e+21
US_ENERGY_MSN = 'TETCBUS'
RECENT_RATE = (2013, 2025)
GLOBAL_TABLE = 'data/processed/global_temperature_annual.csv'
ZJ_PER_1E22_J = 10.0
OHC_START = 1955
ARGO_ERA_START = 2005
HIATUS = (1998, 2012)
def us_primary_energy() -> tuple[int, float]:
table = pd.read_csv(R.RAW / SRC['eia'])
series = table[table['MSN'] == US_ENERGY_MSN].copy()
series['year'] = series['YYYYMM'] // 100
series['month'] = series['YYYYMM'] % 100
months = series[series['month'] <= 12].groupby('year')['Value'].count()
complete = set(months[months == 12].index)
annual = series[(series['month'] == 13) & series['year'].isin(complete)]
if annual.empty:
raise ValueError('EIA table has no complete annual total for US primary energy consumption')
row = annual.loc[annual['year'].idxmax()]
return (int(row['year']), float(row['Value']) * QUAD_BTU_ZJ)
def main() -> int:
num = Numbers('ocean_solar', SCRIPT)
iap = R.iap_ohc(R.RAW / SRC['iap']).df
grouped = iap.groupby('year')
annual = pd.DataFrame({'ohc_0_700_zj': grouped['ohc_0_700'].mean() * ZJ_PER_1E22_J, 'ohc_0_2000_zj': grouped['ohc_0_2000'].mean() * ZJ_PER_1E22_J, 'ohc_0_2000_err95_zj': grouped['ohc_0_2000_err'].mean() * ZJ_PER_1E22_J, 'ohc_2000_6000_zj': grouped['ohc_2000_6000'].mean() * ZJ_PER_1E22_J, 'months': grouped['ohc_0_2000'].count()})
annual = annual[(annual.index >= OHC_START) & (annual.months == 12)]
surface = pd.read_csv(PROCESSED / 'global_temperature_annual.csv').set_index('year')['mean_available']
annual['surface_mean_available_c'] = surface.reindex(annual.index)
annual['argo_era'] = annual.index >= ARGO_ERA_START
table = annual.drop(columns='months').reset_index()
write_table(table, 'ocean_heat_content_annual', script=SCRIPT, inputs=[SRC['iap'], GLOBAL_TABLE], units={'year': 'year', 'ohc_0_700_zj': 'ZJ', 'ohc_0_2000_zj': 'ZJ', 'ohc_0_2000_err95_zj': 'ZJ', 'ohc_2000_6000_zj': 'ZJ', 'surface_mean_available_c': 'degC', 'argo_era': 'boolean'}, baseline='OHC: 2006-2015 (IAP); surface: 1850-1900', description='Annual global ocean heat content (IAPv4.2, 0–700 m, 0–2000 m, 2000–6000 m) from 1955, with the multi-dataset surface temperature mean.', method='Annual mean of 12 monthly values; 10^22 J × 10 = ZJ; error column = mean of the monthly 95% half-widths (monthly errors are correlated, so this is not reduced by averaging).', notes=['Provider: records reliable only after 1955; mapping uses CMIP5-informed covariances (Cheng et al. 2024).', 'Argo floats give near-global 0–2000 m coverage from about 2005; earlier values rest on sparser ship data.'])
def change_ci(start: int, end: int, change: float) -> tuple[float, float]:
spread = float(np.hypot(annual.loc[start, 'ohc_0_2000_err95_zj'], annual.loc[end, 'ohc_0_2000_err95_zj']))
return (change - spread, change + spread)
for start, end in ((1955, 1990), (1983, 1997), HIATUS, (2013, 2025)):
span = annual.loc[start:end, 'ohc_0_2000_zj']
res = stats.ols_trend(span.index.values, span.values)
num.add_trend_result(f'ohc_0_2000.trend_{start}_{end}', res, units='ZJ/yr', decimals=1, scale=1, kind='value', inputs=[SRC['iap']], description=f'IAP 0–2000 m ocean heat content trend {start}–{end} (OLS + AR(1) 95% CI)')
change = float(span.loc[end] - span.loc[start])
num.add(f'ohc_0_2000.change_{start}_{end}', change, units='ZJ', decimals=0, inputs=[SRC['iap']], ci=change_ci(start, end, change), description=f"IAP 0–2000 m ocean heat content: {end} annual mean minus {start}, with the provider's 95% uncertainties on the two endpoint years added in quadrature")
num.add(f'ohc_0_2000.rate_{start}_{end}', change / (end - start), units='ZJ/yr', decimals=1, inputs=[SRC['iap']], description=f'IAP 0–2000 m ocean heat content: average rate over {start}–{end} (change divided by the years between)')
surf = surface.loc[start:end].dropna()
sres = stats.ols_trend(surf.index.values, surf.values)
num.add_trend_result(f'surface.trend_{start}_{end}', sres, units='degC/decade', decimals=2, inputs=[GLOBAL_TABLE], description=f'Multi-dataset surface temperature trend {start}–{end}')
surf_change = stats.period_mean_difference(surface.index.values, surface.values, (start, start + 4), (end - 4, end))
num.add(f'surface.change_{start}_{end}', surf_change['difference'], units='degC', decimals=2, kind='delta_temp', ci=(surf_change['ci_low'], surf_change['ci_high']), n_eff=surf_change['n_eff'], inputs=[GLOBAL_TABLE], description=f'Multi-dataset surface temperature: mean of the last five years of {start}–{end} minus the first five')
shifted = {}
for start, end in ((1983, 1997), HIATUS):
changes = [float(annual.loc[end + s, 'ohc_0_2000_zj'] - annual.loc[start + s, 'ohc_0_2000_zj']) for s in range(-2, 3)]
shifted[start, end] = changes
for name, value in (('min', min(changes)), ('max', max(changes))):
num.add(f'ohc_0_2000.change_{start}_{end}_shifted_{name}', value, units='ZJ', decimals=0, inputs=[SRC['iap']], description=f'IAP 0–2000 m heat gained over the {start}–{end} window moved by up to two years either way: {name}imum over the five placements')
if min(shifted[HIATUS]) <= max(shifted[1983, 1997]):
raise ValueError('with each window moved by up to two years, the 1998–2012 gain no longer exceeds the 1983–1997 gain in every placement; V10, link 5 and the pause card must be reworded')
for first in (1960, 1990):
change = float(annual.loc[2025, 'ohc_0_2000_zj'] - annual.loc[first, 'ohc_0_2000_zj'])
num.add(f'ohc_0_2000.change_{first}_2025', change, units='ZJ', decimals=0, inputs=[SRC['iap']], ci=change_ci(first, 2025, change), description=f"IAP 0–2000 m ocean heat content, 2025 annual mean minus {first}, with the provider's 95% uncertainties on the two endpoint years added in quadrature")
num.add('ohc_0_2000.change_2024_2025', annual.loc[2025, 'ohc_0_2000_zj'] - annual.loc[2024, 'ohc_0_2000_zj'], units='ZJ', decimals=0, inputs=[SRC['iap']], description='IAP 0–2000 m ocean heat content, 2025 minus 2024 (annual means)')
for year in (1960, 2025):
num.add(f'ohc_0_2000.err95_{year}', float(annual.loc[year, 'ohc_0_2000_err95_zj']), units='ZJ', decimals=0, inputs=[SRC['iap']], description=f'Published 95% uncertainty on the IAP 0–2000 m annual value in {year}')
num.add('ohc_0_2000.years_increase_share', float((annual['ohc_0_2000_zj'].diff().dropna() > 0).mean() * 100), units='%', decimals=0, kind='percent', inputs=[SRC['iap']], description='Share of year-to-year changes since 1955 in which 0–2000 m heat content rose')
us_year, us_zj = us_primary_energy()
num.add('us_energy.primary_year', us_year, units='year', decimals=0, kind='year', inputs=[SRC['eia']], description='Most recent complete calendar year of EIA total US primary energy consumption')
num.add('us_energy.primary_zj', us_zj, units='ZJ', decimals=3, inputs=[SRC['eia']], description=f'Total US primary energy consumption in {us_year}, converted from quadrillion Btu')
change_1960 = float(annual.loc[2025, 'ohc_0_2000_zj'] - annual.loc[1960, 'ohc_0_2000_zj'])
num.add('ohc_0_2000.change_1960_2025_us_energy_years', change_1960 / us_zj, units='years', decimals=0, inputs=[SRC['iap'], SRC['eia']], description='Ocean heat gained 1960–2025 divided by one year of total US primary energy use')
start, end = RECENT_RATE
recent_rate = float(annual.loc[end, 'ohc_0_2000_zj'] - annual.loc[start, 'ohc_0_2000_zj']) / (end - start)
num.add(f'ohc_0_2000.rate_{start}_{end}_us_energy_multiple', recent_rate / us_zj, units='times', decimals=0, inputs=[SRC['iap'], SRC['eia']], description=f'Average yearly ocean heat uptake over {start}–{end} as a multiple of one year of total US primary energy use')
osti = re.sub('\\s+', ' ', html.unescape(re.sub('<[^>]+>', ' ', (R.RAW / SRC['osti']).read_text(encoding='utf-8', errors='replace'))))
tons = {int(m.replace(',', '')) for m in YIELD.findall(osti)}
if len(tons) != 1:
raise ValueError(f"{SRC['osti']}: expected one stated yield in tons of TNT, found {sorted(tons) or 'none'}")
yield_j = tons.pop() * TNT_J_PER_TON
per_second = recent_rate * 1e+21 / (365.2425 * 86400) / yield_j
num.add('hiroshima.yield_kt', yield_j / TNT_J_PER_TON / 1000, units='kilotons of TNT', decimals=0, inputs=[SRC['osti']], description='Yield of the Hiroshima bomb as stated by the DOE history page')
num.add(f'ohc_0_2000.rate_{start}_{end}_hiroshima_per_second', per_second, units='bombs per second', decimals=0, inputs=[SRC['iap'], SRC['osti']], description=f'Average ocean heat uptake over {start}–{end} expressed in Hiroshima-bomb yields per second')
num.add(f'ohc_0_2000.rate_{start}_{end}_hiroshima_per_day', round(per_second * 86400, -3), units='bombs per day', decimals=0, inputs=[SRC['iap'], SRC['osti']], description=f'The same uptake per day, rounded to the nearest thousand')
num.add('scale.one_wm2_vs_us_power', 510072000000000.0 / (us_zj * 1e+21 / (365.2425 * 86400)), units='times', decimals=0, inputs=[SRC['eia']], description="A forcing of 1 W m⁻² over Earth's surface divided by the average power of US primary energy use")
gain = annual['ohc_0_2000_zj'].diff()
sea_surface = R.cag(R.RAW / SRC['cag_ocean']).df.set_index('year')['value']
uptake = pd.DataFrame({'gain_zj': gain, 'gain_10yr_mean_zj': gain.rolling(10, center=True, min_periods=10).mean(), 'sea_surface_anomaly_c': sea_surface.reindex(annual.index)}, index=annual.index)
write_table(uptake.reset_index(), 'ocean_heat_uptake_annual', script=SCRIPT, inputs=[SRC['iap'], SRC['cag_ocean']], units={'year': 'year', 'gain_zj': 'ZJ/yr', 'gain_10yr_mean_zj': 'ZJ/yr', 'sea_surface_anomaly_c': 'degC'}, baseline='heat gain: change from the previous year; sea surface: 1901-2000', description="Heat added to the upper 2,000 m of the ocean each year (IAPv4.2), its 10-year running mean, and NOAA's global sea surface temperature anomaly.", method="Gain is each year's annual-mean heat content minus the previous year's; the running mean is centred and needs all 10 years.", notes=["Year-to-year gains inherit the uncertainty of both years' estimates, which is large before Argo (about 2005); the running mean and the period means carry the claim, not single bars.", 'Sea surface temperature describes the top few metres; the heat content describes the whole upper 2,000 m.'])
accel = stats.period_mean_difference(gain.index.values, gain.values, UPTAKE_EARLY, UPTAKE_LATE)
for period in (UPTAKE_EARLY, UPTAKE_LATE):
window = gain.loc[period[0]:period[1]].dropna()
ci = stats.mean_ci(window.values)
num.add(f'ohc_0_2000.uptake_mean_{period[0]}_{period[1]}', ci['mean'], units='ZJ/yr', decimals=1, ci=(ci['ci_low'], ci['ci_high']), n_eff=ci['n_eff'], inputs=[SRC['iap']], description=f'Mean yearly ocean heat gain, {period[0]}–{period[1]} (95% CI on the mean)')
num.add('ohc_0_2000.uptake_increase', accel['difference'], units='ZJ/yr', decimals=1, ci=(accel['ci_low'], accel['ci_high']), n_eff=accel['n_eff'], inputs=[SRC['iap']], description=f'Mean yearly heat gain {UPTAKE_LATE[0]}–{UPTAKE_LATE[1]} minus {UPTAKE_EARLY[0]}–{UPTAKE_EARLY[1]} (AR(1)-adjusted 95% CI)')
if accel['ci_low'] <= 0:
raise ValueError("the later period's mean ocean heat gain is no longer higher than the earlier period's beyond its uncertainty; Figure 10b and the energy section say it is")
surface_change = stats.period_mean_difference(sea_surface.index.values, sea_surface.values, (1850, 1900), (2015, 2024))
num.add('sea_surface.change_1850_1900_to_2015_2024', surface_change['difference'], units='degC', decimals=2, kind='delta_temp', ci=(surface_change['ci_low'], surface_change['ci_high']), n_eff=surface_change['n_eff'], inputs=[SRC['cag_ocean']], description='Global sea surface temperature, 2015–2024 mean minus 1850–1900 mean (NOAAGlobalTemp)')
def erf_member(tag: str) -> pd.DataFrame:
member = R.zip_member_csv(R.RAW / SRC['igcc'], f'ERF_{tag}_aggregates_1750-2024.csv').df
member['year'] = member['timebound_lower'].astype(int)
return member.set_index('year')[['solar', 'volcanic', 'anthro', 'total']]
erf = erf_member('best')
erf_bounds = {tag: erf_member(tag) for tag in ('p05', 'p95')}
tsi = R.lisird_tsi(R.RAW / SRC['tsi']).df.set_index('year')['tsi']
forcing = pd.DataFrame(index=pd.RangeIndex(1850, 2025, name='year'))
for col in ('solar', 'volcanic', 'anthro', 'total'):
forcing[f'{col}_erf'] = erf[col].reindex(forcing.index)
forcing[f'{col}_erf_11yr'] = erf[col].rolling(11, center=True).mean().reindex(forcing.index)
forcing['tsi'] = tsi.reindex(forcing.index)
forcing['tsi_11yr'] = tsi.rolling(11, center=True).mean().reindex(forcing.index)
forcing['surface_mean_available_c'] = surface.reindex(forcing.index)
table = forcing.reset_index()
write_table(table, 'solar_vs_anthropogenic_forcing', script=SCRIPT, inputs=[SRC['igcc'], SRC['tsi'], GLOBAL_TABLE], units={'year': 'year', **{c: 'W m-2' for c in table.columns if 'erf' in c or c.startswith('tsi')}, 'surface_mean_available_c': 'degC'}, baseline='ERF relative to 1750 (IGCC); TSI absolute; surface 1850-1900', description='Effective radiative forcing from solar, volcanic and anthropogenic drivers (IGCC 2024), total solar irradiance (NRLTSI2), and surface temperature.', method='11-year centred running means; ERF and TSI are not converted into each other here.', notes=['TSI before the satellite era (1978) is a proxy-based reconstruction (Coddington et al. 2016); other reconstructions differ (Connolly et al. 2021; Richardson & Benestad 2022).', 'NRLTSI2 uncertainty grows sharply for 2021–2023 (provisional).'])
pre = forcing.loc[1850:1900]
recent = forcing.loc[2015:2024]
num.add('tsi.mean_2015_2024', float(forcing.loc[2015:2024, 'tsi'].mean()), units='W m-2', decimals=1, inputs=[SRC['tsi']], description='Mean total solar irradiance 2015–2024 (NRLTSI2): the power arriving on a square metre facing the Sun, before any of it is reflected or spread over the turning planet')
num.add('tsi.mean_2015_2024_per_area', float(forcing.loc[2015:2024, 'tsi'].mean()) / 4, units='W m-2', decimals=1, inputs=[SRC['tsi']], description="Mean solar irradiance 2015–2024 averaged over Earth's whole surface: total solar irradiance divided by four, before any of it is reflected")
num.add('ohc_0_2000.implied_imbalance_2013_2025', recent_rate * 1e+21 / (365.2425 * 86400 * 510072000000000.0), units='W m-2', decimals=2, inputs=[SRC['iap']], description="Average 2013–2025 ocean heat uptake (0–2000 m) spread over Earth's whole surface")
def erf_change(frame: pd.DataFrame, column: str) -> float:
series = frame[column].reindex(forcing.index)
return float(series.loc[2015:2024].mean() - series.loc[1850:1900].mean())
for column, key, who in (('solar', 'solar_erf', 'Solar'), ('anthro', 'anthro_erf', 'Anthropogenic')):
num.add(f'{key}.change_1850_1900_to_2015_2024', erf_change(erf, column), units='W m-2', decimals=2, ci=(erf_change(erf_bounds['p05'], column), erf_change(erf_bounds['p95'], column)), inputs=[SRC['igcc']], description=f"{who} ERF: mean 2015–2024 minus mean 1850–1900, with the archive's 5th and 95th percentile members differenced the same way (IGCC 2024)")
num.add('anthro_erf.2024', forcing.loc[2024, 'anthro_erf'], units='W m-2', decimals=2, inputs=[SRC['igcc']], description='Anthropogenic ERF in 2024 relative to 1750 (IGCC 2024)')
span = forcing.loc[1980:2023, 'tsi']
res = stats.ols_trend(span.index.values, span.values)
num.add_trend_result('tsi.trend_1980_2023', res, units='W m-2/decade', decimals=3, kind='value', inputs=[SRC['tsi']], description='NRLTSI2 total solar irradiance trend 1980–2023 (OLS + AR(1))')
cycles = {'cycle22': (1986, 1996), 'cycle24': (2008, 2019)}
num.add('tsi.cycle_mean_change_1986_1996_to_2008_2019', forcing.loc[cycles['cycle24'][0]:cycles['cycle24'][1], 'tsi'].mean() - forcing.loc[cycles['cycle22'][0]:cycles['cycle22'][1], 'tsi'].mean(), units='W m-2', decimals=2, inputs=[SRC['tsi']], description='Mean TSI over solar cycle 24 (2008–2019) minus cycle 22 (1986–1996)')
for name, (start, end) in cycles.items():
number = name.removeprefix('cycle')
num.add(f'tsi.{name}_start', start, units='year', decimals=0, kind='year', inputs=[SRC['tsi']], description=f'First year of the window used for solar cycle {number} (its sunspot minimum)')
num.add(f'tsi.{name}_end', end, units='year', decimals=0, kind='year', inputs=[SRC['tsi']], description=f'Last year of the window used for solar cycle {number} (the next sunspot minimum)')
num.save()
print(f'ocean_solar: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/provenance.py40 lines
from __future__ import annotations
import json
from collections import defaultdict
import pandas as pd
from scripts.lib.io import PROCESSED, write_table
from scripts.lib.readers import RAW
SCRIPT = 'scripts/process/provenance.py'
COLUMNS = ['raw_file', 'dataset', 'url', 'method', 'request_body', 'http_status', 'bytes', 'sha256', 'fetched_at', 'used_by']
UNITS = {'raw_file': 'path relative to data/raw/', 'dataset': 'name', 'url': 'URL', 'method': 'HTTP method', 'request_body': 'JSON request body (POST only)', 'http_status': 'HTTP status', 'bytes': 'bytes', 'sha256': 'hex digest', 'fetched_at': 'UTC timestamp', 'used_by': 'processed tables, semicolon-separated'}
def consumers() -> dict[str, set[str]]:
used: dict[str, set[str]] = defaultdict(set)
for meta_path in sorted(PROCESSED.glob('*.meta.json')):
meta = json.loads(meta_path.read_text(encoding='utf-8'))
table = meta['file'].rsplit('/', 1)[-1]
for item in meta.get('inputs', []):
path = item['path'].replace('\\', '/')
if path.startswith('data/raw/'):
used[path[len('data/raw/'):]].add(table)
return used
def main() -> int:
manifest = json.loads((RAW / 'MANIFEST.json').read_text(encoding='utf-8'))['files']
used = consumers()
rows = []
for key in sorted(manifest):
record = manifest[key]
tables = set(used.get(key, ()))
for depth in range(key.count('/')):
tables |= used.get(key.rsplit('/', depth + 1)[0], set())
body = record.get('request_body')
rows.append({'raw_file': key, 'dataset': record.get('dataset', ''), 'url': record.get('url', ''), 'method': record.get('method', 'GET'), 'request_body': json.dumps(body, sort_keys=True, separators=(',', ':')) if body else '', 'http_status': record.get('http_status', ''), 'bytes': record.get('bytes', ''), 'sha256': record.get('sha256', ''), 'fetched_at': record.get('fetched_at', ''), 'used_by': '; '.join(sorted(tables))})
table = pd.DataFrame(rows, columns=COLUMNS)
unused = int((table['used_by'] == '').sum())
write_table(table, 'raw_file_provenance', script=SCRIPT, inputs=['MANIFEST.json'], units=UNITS, description='Every raw file this page was built from: the request that fetched it, its SHA-256, and the processed tables that read it.', method="Written from data/raw/MANIFEST.json; used_by resolved from the other processed tables' recorded inputs.", notes=["Re-fetch a row's url, hash the bytes, and compare with sha256 to confirm the input has not changed since fetched_at.", 'A row with an empty used_by was fetched and validated but feeds no table on this page; it was read for a single number, a quotation, or a cross-check.', 'request_body is filled only for the rows fetched with POST, whose URL alone does not identify the data returned.'])
print(f'provenance: {len(table)} raw files, {len(table) - unused} feeding a table, {unused} read only')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/response.py29 lines
from __future__ import annotations
import html
import re
from scripts.lib import readers as R
from scripts.lib.io import Numbers
SCRIPT = 'scripts/process/response.py'
SRC = {'treaty': 'response/un_treaty_paris.html', 'nzt': 'response/net_zero_tracker.html', 'laws': 'response/climate_laws.html'}
COUNTS = [('paris.parties', 'treaty', 'Parties\\s*:\\s*(\\d{2,3})\\b', 'parties', 'Parties to the Paris Agreement, as listed by the UN Treaty Collection'), ('net_zero.countries', 'nzt', 'Net Zero Numbers\\s+Countries\\s+(\\d{2,3})\\b', 'countries', 'Countries with a national net-zero (or equivalent) target, per Net Zero Tracker'), ('net_zero.countries_assessed', 'nzt', 'Out of\\s+(\\d{2,3})\\s+countries', 'countries', 'Countries Net Zero Tracker assesses'), ('net_zero.emissions_share', 'nzt', 'Global Net Zero Coverage\\s+Emissions\\s+(\\d{1,3})\\s*%', '%', 'Share of global emissions from countries with a national net-zero target, per Net Zero Tracker'), ('laws.count', 'laws', 'Search over\\s+([\\d,]+)\\s+climate laws', 'laws and policies', 'Climate laws, policies and UNFCCC submissions catalogued by Climate Change Laws of the World')]
def page_text(path: str) -> str:
raw = (R.RAW / path).read_text(encoding='utf-8', errors='replace')
raw = re.sub('<script.*?</script>|<style.*?</style>', ' ', raw, flags=re.DOTALL | re.IGNORECASE)
return re.sub('\\s+', ' ', html.unescape(re.sub('<[^>]+>', ' ', raw)))
def main() -> int:
num = Numbers('response', SCRIPT)
texts = {name: page_text(path) for name, path in SRC.items()}
for key, page, pattern, units, description in COUNTS:
found = {m.replace(',', '') for m in re.findall(pattern, texts[page])}
if len(found) != 1:
raise ValueError(f"{SRC[page]}: expected exactly one value for {key}, found {sorted(found) or 'none'} — the page has changed; re-check the pattern against the fetched file")
value = int(found.pop())
num.add(key, value, units=units, decimals=0, kind='percent' if units == '%' else 'value', inputs=[SRC[page]], description=description)
num.save()
print(f'response: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/satellite.py49 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/satellite.py'
SRC = {'rss_tlt': 'rss/RSS_TLT_Land_and_Ocean_v04_0.txt', 'rss_tmt': 'rss/RSS_TMT_Land_and_Ocean_v04_0.txt', 'rss_ttt': 'rss/RSS_TTT_Land_and_Ocean_v04_0.txt', 'rss_tls': 'rss/RSS_TLS_Land_and_Ocean_v04_0.txt', 'uah_lt': 'uah/uahncdc_lt_6.1.txt', 'uah_mt': 'uah/uahncdc_mt_6.1.txt', 'uah_ls': 'uah/uahncdc_ls_6.1.txt'}
BASE = (1979, 1998)
LAST_COMPLETE = 2025
OZONE_ERA = (1979, 1997)
AFTER = (1998, 2025)
def monthly(key: str) -> pd.Series:
if key.startswith('rss'):
table = R.rss(R.RAW / SRC[key])
column = table.meta['bands'][0]
else:
table = R.uah(R.RAW / SRC[key])
column = 'globe'
df = table.df
index = pd.to_datetime(dict(year=df.year, month=df.month, day=15))
return pd.Series(df[column].values, index=index, name=key)
def main() -> int:
num = Numbers('satellite', SCRIPT)
series = {key: monthly(key) for key in SRC}
frame = pd.DataFrame(series)
in_base = (frame.index.year >= BASE[0]) & (frame.index.year <= BASE[1])
frame = frame - frame[in_base].mean()
frame.insert(0, 'decimal_year', frame.index.year + (frame.index.month - 0.5) / 12)
write_table(frame.reset_index(drop=True), 'satellite_layers_monthly', script=SCRIPT, inputs=list(SRC.values()), units={'decimal_year': 'year', **{k: 'degC' for k in SRC}}, baseline='1979-1998 (all series re-baselined)', description='Monthly global-mean atmospheric layer temperatures from RSS v4.0 and UAH v6.1.', method='RSS TMT/TTT/TLS use 82.5°S–82.5°N; RSS TLT uses 70°S–82.5°N (widest band published); UAH uses its global column.', notes=['TTT combines TMT and TLS to remove stratospheric influence from the mid-troposphere channel.', 'Lower-stratosphere cooling 1979–mid-1990s is mostly ozone depletion (AR6 SPM A.1.3); volcanic eruptions in 1982 and 1991 warm it briefly.'])
counts = frame.groupby(frame.index.year).count()
annual = frame.groupby(frame.index.year).mean().where(counts == 12).loc[:LAST_COMPLETE]
annual.index.name = 'year'
annual = annual.drop(columns='decimal_year')
write_table(annual.reset_index(), 'satellite_layers_annual', script=SCRIPT, inputs=list(SRC.values()), units={'year': 'year', **{k: 'degC' for k in SRC}}, baseline='1979-1998', description='Annual means (12 complete months) of the monthly layer temperatures.')
for key in SRC:
for start, end in ((1979, LAST_COMPLETE), OZONE_ERA, AFTER):
if key not in ('rss_tls', 'uah_ls') and (start, end) != (1979, LAST_COMPLETE):
continue
span = annual.loc[start:end, key].dropna()
res = stats.ols_trend(span.index.values, span.values)
num.add_trend_result(f'{key}.trend_{start}_{end}', res, units='degC/decade', decimals=3, inputs=[SRC[key]], description=f'{key.upper()} annual trend {start}–{end} (OLS + AR(1) 95% CI)')
num.save()
print(f'satellite: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/sealevel_ice.py57 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/sealevel_ice.py'
SRC = {'sf_annual': 'psmsl/10_annual.rlrdata', 'gmsl': 'noaa_star/slr_sla_gbl_free_all_66.csv', 'nsidc': 'nsidc/N_09_extent_v4.0.csv', 'wgms': 'wgms/mb_ref_2026-02-10.csv'}
BASE = (1993, 2012)
def trend(num: Numbers, key: str, s: pd.Series, units: str, decimals: int, inputs: list[str], desc: str, per: int=1) -> dict:
s = s.dropna()
res = stats.ols_trend(s.index.values, s.values)
num.add_trend_result(key, res, units=units, decimals=decimals, kind='value', scale=per, inputs=inputs, description=desc)
return res
def main() -> int:
num = Numbers('sealevel_ice', SCRIPT)
sf = R.psmsl_rlr(R.RAW / SRC['sf_annual']).df
sf['year'] = sf['time'].astype(int)
sf = sf.set_index('year')['mm']
gm = R.star_gmsl(R.RAW / SRC['gmsl']).df
gm['year'] = gm['time'].astype(int)
per_year = gm.groupby('year')['mm'].agg(['mean', 'count'])
complete = per_year[per_year['count'] >= 30]['mean']
table = pd.DataFrame({'sf_tide_gauge_mm': sf - sf.loc[BASE[0]:BASE[1]].mean()})
table['satellite_gmsl_mm'] = complete - complete.loc[BASE[0]:BASE[1]].mean()
table.index.name = 'year'
write_table(table.reset_index(), 'sea_level_san_francisco', script=SCRIPT, inputs=[SRC['sf_annual'], SRC['gmsl']], units={'year': 'year', 'sf_tide_gauge_mm': 'mm', 'satellite_gmsl_mm': 'mm'}, baseline='1993-2012 (both series)', description='Annual mean relative sea level at San Francisco (PSMSL station 10) and satellite global mean sea level (NOAA LSA, 66°S–66°N).', method='Tide gauge: PSMSL Revised Local Reference annual means. Satellite: mean of all altimetry points in a year (years with ≥ 30 points).', notes=['A tide gauge measures sea level relative to the land it sits on (vertical land motion included); the satellite series is a global ocean mean. They are not expected to match.', 'NOAA LSA series ends early 2025; no glacial isostatic adjustment applied (provider).'])
trend(num, 'sf.trend_1855_2025', sf.loc[1855:2025], 'mm/yr', 2, [SRC['sf_annual']], 'San Francisco tide gauge trend 1855–2025')
trend(num, 'sf.trend_1993_2025', sf.loc[1993:2025], 'mm/yr', 1, [SRC['sf_annual']], 'San Francisco tide gauge trend 1993–2025')
trend(num, 'gmsl.trend_1993_2024', complete.loc[1993:2024], 'mm/yr', 1, [SRC['gmsl']], 'Satellite global mean sea level trend 1993–2024 (annual means)')
gmsl_change = stats.period_mean_difference(complete.index.values, complete.values, (1993, 2002), (2015, 2024))
num.add('gmsl.change_1993_2002_to_2015_2024', gmsl_change['difference'], units='mm', decimals=0, ci=(gmsl_change['ci_low'], gmsl_change['ci_high']), n_eff=gmsl_change['n_eff'], inputs=[SRC['gmsl']], description='Satellite global mean sea level: mean 2015–2024 minus mean 1993–2002')
first30 = stats.period_mean_difference(sf.index.values, sf.values, (1900, 1929), (1996, 2025))
num.add('sf.change_1900_1929_to_1996_2025', first30['difference'], units='mm', decimals=0, ci=(first30['ci_low'], first30['ci_high']), n_eff=first30['n_eff'], inputs=[SRC['sf_annual']], description='San Francisco mean sea level 1996–2025 minus 1900–1929')
ice = R.nsidc_extent(R.RAW / SRC['nsidc']).df.set_index('year')
write_table(ice[['extent', 'area', 'source_dataset']].reset_index(), 'arctic_sea_ice_september', script=SCRIPT, inputs=[SRC['nsidc']], units={'year': 'year', 'extent': 'million km2', 'area': 'million km2', 'source_dataset': 'id'}, description='Arctic September sea-ice extent and area, NSIDC Sea Ice Index v4.0.', notes=['Source dataset changes from NSIDC-0051 (to 2024) to NSIDC-0803 (2025).'])
base_mean = ice.loc[1981:2010, 'extent'].mean()
res = trend(num, 'extent.trend_1979_2025', ice['extent'], 'million km2/decade', 2, [SRC['nsidc']], 'Arctic September extent trend 1979–2025', per=10)
num.add('extent.trend_pct_per_decade', 1000 * res['slope'] / base_mean, units='% of 1981–2010 mean per decade', decimals=1, kind='percent', inputs=[SRC['nsidc']], description='September extent trend as a share of the 1981–2010 mean')
num.add('extent.mean_1979_1988', ice.loc[1979:1988, 'extent'].mean(), units='million km2', decimals=1, inputs=[SRC['nsidc']], description='Mean September extent 1979–1988')
num.add('extent.mean_2016_2025', ice.loc[2016:2025, 'extent'].mean(), units='million km2', decimals=1, inputs=[SRC['nsidc']], description='Mean September extent 2016–2025')
num.add('extent.record_low_year', int(ice['extent'].idxmin()), units='year', decimals=0, kind='year', inputs=[SRC['nsidc']], description='Year of the lowest September extent 1979–2025')
wg = R.wgms_ref(R.RAW / SRC['wgms']).df.set_index('year')
wg['cumulative_m_we_since_1970'] = wg['cum_mm_we_rel_1970'] / 1000
write_table(wg.reset_index(), 'wgms_reference_glaciers', script=SCRIPT, inputs=[SRC['wgms']], units={'year': 'year', 'n_glaciers': 'count', 'mb_mm_we': 'mm w.e.', 'cum_mm_we_rel_1970': 'mm w.e.', 'cumulative_m_we_since_1970': 'm w.e.'}, description='WGMS reference-glacier annual mass balance (regional averages) and cumulative change relative to 1970.', notes=['The number of glaciers averaged grows from 4–5 in the early 1950s to about 60 today.'])
num.add('wgms.cumulative_1970_2025', wg.loc[2025, 'cumulative_m_we_since_1970'], units='m w.e.', decimals=1, inputs=[SRC['wgms']], description='Cumulative reference-glacier mass balance, 1970 to 2025 (metres of water equivalent)')
num.add('wgms.positive_years_since_2000', int((wg.loc[2000:2025, 'mb_mm_we'] > 0).sum()), units='years', decimals=0, kind='count', inputs=[SRC['wgms']], description='Years since 2000 with a positive mean reference-glacier balance')
num.add('wgms.mean_1976_1985', wg.loc[1976:1985, 'mb_mm_we'].mean(), units='mm w.e./yr', decimals=0, inputs=[SRC['wgms']], description='Mean annual reference-glacier balance 1976–1985')
num.add('wgms.mean_2016_2025', wg.loc[2016:2025, 'mb_mm_we'].mean(), units='mm w.e./yr', decimals=0, inputs=[SRC['wgms']], description='Mean annual reference-glacier balance 2016–2025')
num.add('wgms.glaciers_2025', int(wg.loc[2025, 'n_glaciers']), units='glaciers', decimals=0, kind='count', inputs=[SRC['wgms']], description='Reference glaciers reporting in 2025')
num.save()
print(f'sealevel_ice: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/seasonality.py101 lines
from __future__ import annotations
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/seasonality.py'
MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
SRC = {month: f'noaa_cag/CA_tavg_m{month:02d}_1895-2025.csv' for month in range(1, 13)}
VENTURA_OCTOBER = 'noaa_cag/CA-111_tavg_oct_1895-2026.csv'
BASELINE = (1901, 2000)
TREND = (1970, 2025)
WINTER, SUMMER = (('m12', 'm01', 'm02'), ('m06', 'm07', 'm08'))
ZERO_CROSSING_MONTHS = ('February', 'March', 'May')
OCT_FIRST30, OCT_LAST30 = ((1895, 1924), (1996, 2025))
def monthly_frame() -> pd.DataFrame:
columns = {}
for month, path in SRC.items():
table = R.cag(R.RAW / path)
unexpected = sorted(set(table.df['end_month']) - {month})
if unexpected:
raise ValueError(f'{path}: expected only month {month}, found end months {unexpected}')
columns[f'm{month:02d}'] = table.df.set_index('year')['value']
return pd.DataFrame(columns).sort_index()
def ventura_october() -> pd.Series:
table = R.cag(R.RAW / VENTURA_OCTOBER)
unexpected = sorted(set(table.df['end_month']) - {10})
if unexpected:
raise ValueError(f'{VENTURA_OCTOBER}: expected only October, found end months {unexpected}')
if 'fahrenheit' not in table.units.lower():
raise ValueError(f'{VENTURA_OCTOBER}: expected degrees Fahrenheit, got {table.units!r}')
return table.df.dropna(subset=['value']).set_index('year')['value'].sort_index()
def add_ventura_october(num: Numbers) -> pd.DataFrame:
series = ventura_october()
inputs = [VENTURA_OCTOBER]
first, last = (int(series.index.min()), int(series.index.max()))
change = stats.period_mean_difference(series.index.values, series.values, OCT_FIRST30, OCT_LAST30)
num.add(f'ventura_october.change_{OCT_FIRST30[0]}_{OCT_FIRST30[1]}_to_{OCT_LAST30[0]}_{OCT_LAST30[1]}', change['difference'], units='degF', decimals=2, kind='delta_temp', ci=(change['ci_low'], change['ci_high']), n_eff=change['n_eff'], inputs=inputs, description=f'Ventura County October mean temperature: mean {OCT_LAST30[0]}–{OCT_LAST30[1]} minus mean {OCT_FIRST30[0]}–{OCT_FIRST30[1]} (AR(1)-adjusted 95% CI)')
for lo, hi in (OCT_FIRST30, OCT_LAST30):
window = series.loc[lo:hi]
num.add(f'ventura_october.mean_{lo}_{hi}', float(window.mean()), units='degF', decimals=2, kind='abs_temp', inputs=inputs, description=f'Ventura County October mean temperature averaged over {lo}–{hi}')
full = stats.ols_trend(series.index.values, series.values)
num.add_trend_result(f'ventura_october.trend_{first}_{last}', full, units='degF/decade', decimals=2, inputs=inputs, description=f'Ventura County October mean temperature: OLS trend {first}–{last} per decade (AR(1)-adjusted 95% CI)')
recent = series.loc[TREND[0]:TREND[1]]
num.add_trend_result(f'ventura_october.trend_{TREND[0]}_{TREND[1]}', stats.ols_trend(recent.index.values, recent.values), units='degF/decade', decimals=2, inputs=inputs, description=f'Ventura County October mean temperature: OLS trend {TREND[0]}–{TREND[1]} per decade (AR(1)-adjusted 95% CI)')
for key, value, units, decimals, kind, description in (('first_year', first, 'year', 0, 'year', 'First year of the Ventura County October record'), ('last_year', last, 'year', 0, 'year', 'Last October in the Ventura County record; an October still in progress is never published'), ('n_years', int(series.notna().sum()), 'years', 0, 'value', 'Octobers with a published county mean'), ('warmest_year', int(series.idxmax()), 'year', 0, 'year', 'Warmest October in the Ventura County record'), ('coolest_year', int(series.idxmin()), 'year', 0, 'year', 'Coolest October in the Ventura County record'), ('warmest_value', float(series.max()), 'degF', 1, 'abs_temp', 'Mean temperature of the warmest October in the Ventura County record'), ('coolest_value', float(series.min()), 'degF', 1, 'abs_temp', 'Mean temperature of the coolest October in the Ventura County record'), ('range_f', float(series.max() - series.min()), 'degF', 1, 'delta_temp', 'Spread between the warmest and coolest October in the Ventura County record'), ('sd_f', float(series.std(ddof=1)), 'degF', 1, 'delta_temp', 'Standard deviation of Ventura County October mean temperature over the whole record')):
num.add(f'ventura_october.{key}', value, units=units, decimals=decimals, kind=kind, inputs=inputs, description=description)
table = pd.DataFrame({'year': series.index.astype(int), 'tavg_f': series.values})
table['decade'] = table['year'] // 10 * 10
table['lowess_f'] = stats.lowess(table['year'].values, table['tavg_f'].values, frac=0.3)
write_table(table, 'ventura_october_tavg', script=SCRIPT, inputs=inputs, units={'year': 'year', 'tavg_f': 'degF', 'decade': 'year', 'lowess_f': 'degF'}, baseline='not applicable: absolute monthly means, not anomalies', description='Ventura County, California: mean temperature for the month of October in every year of the nClimGrid record, with a LOWESS smooth.', method='Values as published by Climate at a Glance for the county (a gridded analysis of homogenized station data, not a single station). The smooth is LOWESS with a 0.3 span, drawn to guide the eye and never used for a quoted number.', notes=["One month of one county is about as noisy as this page's data gets. That is why the figure shows the scatter rather than only the fit.", 'A partial October is never published, so the last row is always a complete month.'])
return table
def main() -> int:
num = Numbers('seasonality', SCRIPT)
frame = monthly_frame()
inputs = [SRC[month] for month in sorted(SRC)]
winter = pd.concat([frame['m12'].shift(1), frame['m01'], frame['m02']], axis=1).mean(axis=1)
summer = frame[list(SUMMER)].mean(axis=1)
rows = []
for month in range(1, 13):
column = f'm{month:02d}'
span = frame.loc[TREND[0]:TREND[1], column].dropna()
result = stats.ols_trend(span.index.values, span.values)
num.add_trend_result(f'ca_tavg_{column}.trend_{TREND[0]}_{TREND[1]}', result, units='degF/decade', decimals=2, inputs=inputs, description=f'California statewide mean temperature in {MONTHS[month - 1]}: OLS trend {TREND[0]}–{TREND[1]} per decade (AR(1)-adjusted 95% CI)')
rows.append({'month': month, 'month_name': MONTHS[month - 1], 'trend_f_per_decade': 10 * result['slope'], 'ci_low_f': 10 * result['ci_low'], 'ci_high_f': 10 * result['ci_high'], 'n_eff': result['n_eff'], 'claimed': not result['insufficient']})
seasons = {}
for name, series in (('winter_djf', winter), ('summer_jja', summer)):
span = series.loc[TREND[0]:TREND[1]].dropna()
seasons[name] = stats.ols_trend(span.index.values, span.values)
num.add_trend_result(f'ca_{name}.trend_{TREND[0]}_{TREND[1]}', seasons[name], units='degF/decade', decimals=2, inputs=inputs, description=f"California statewide {name.replace('_', ' ').upper()} mean temperature: OLS trend {TREND[0]}–{TREND[1]} per decade (AR(1)-adjusted 95% CI)")
w, s = (seasons['winter_djf'], seasons['summer_jja'])
if w['ci_low'] > s['ci_high'] or s['ci_low'] > w['ci_high']:
raise ValueError('California winter and summer 1970–2025 trend intervals no longer overlap: the seasonality prose says they do, and must be rewritten before this can build')
claimed = [row for row in rows if row['claimed']]
num.add('ca_month_trend.min', min((row['trend_f_per_decade'] for row in claimed)), units='degF/decade', decimals=2, kind='delta_temp', inputs=inputs, description=f'Smallest per-month California warming trend {TREND[0]}–{TREND[1]} among the months whose trend the effective-sample-size rule allows')
num.add('ca_month_trend.max', max((row['trend_f_per_decade'] for row in claimed)), units='degF/decade', decimals=2, kind='delta_temp', inputs=inputs, description=f'Largest per-month California warming trend {TREND[0]}–{TREND[1]} among the months whose trend the effective-sample-size rule allows')
num.add('ca_month_trend.n_warming', sum((1 for row in rows if row['trend_f_per_decade'] > 0)), units='months', decimals=0, inputs=inputs, description=f'Calendar months whose California trend {TREND[0]}–{TREND[1]} has a positive slope')
num.add('ca_month_trend.n_claimed', len(claimed), units='months', decimals=0, inputs=inputs, description='Calendar months whose trend passes the effective-sample-size rule')
crossing = tuple((row['month_name'] for row in rows if row['ci_low_f'] <= 0 <= row['ci_high_f']))
if crossing != ZERO_CROSSING_MONTHS:
raise ValueError(f"the California months whose {TREND[0]}–{TREND[1]} trend interval includes zero are now {', '.join(crossing) or 'none'}, not {', '.join(ZERO_CROSSING_MONTHS)}. Three sentences name those months by hand (the California section, the extremes section and the seasonal figure's caption); update them and ZERO_CROSSING_MONTHS together before this can build")
num.add('ca_month_trend.n_interval_includes_zero', len(crossing), units='months', decimals=0, inputs=inputs, description=f'Calendar months whose California trend {TREND[0]}–{TREND[1]} has a 95% interval that includes zero, so the page claims no warming for them')
out = frame.copy()
out['winter_djf_f'] = winter
out['summer_jja_f'] = summer
out['winter_anomaly_f'] = winter - winter.loc[BASELINE[0]:BASELINE[1]].mean()
out['summer_anomaly_f'] = summer - summer.loc[BASELINE[0]:BASELINE[1]].mean()
table = out.reset_index()
write_table(table, 'california_monthly_tavg', script=SCRIPT, inputs=inputs, units={'year': 'year', **{c: 'degF' for c in table.columns if c != 'year'}}, baseline=f'anomaly columns vs {BASELINE[0]}–{BASELINE[1]}', description='California statewide mean temperature for each calendar month (nClimGrid via Climate at a Glance), with December–February and June–August means.', method="DJF uses the previous calendar year's December; anomalies are against the same months' 1901–2000 mean.", notes=['The first year has no DJF value because it has no preceding December.', 'Values are absolute monthly means as published, not anomalies, except where a column says anomaly.'])
trends = pd.DataFrame(rows)
write_table(trends, 'california_monthly_trends', script=SCRIPT, inputs=inputs, units={'month': 'month number', 'month_name': 'name', 'trend_f_per_decade': 'degF/decade', 'ci_low_f': 'degF/decade', 'ci_high_f': 'degF/decade', 'n_eff': 'count', 'claimed': 'boolean'}, baseline='not applicable (trends)', description=f'Per-calendar-month OLS trend in California statewide mean temperature, {TREND[0]}–{TREND[1]}, with AR(1)-adjusted 95% intervals.', method='OLS on annual values for that month; interval widened by the AR(1) effective sample size. `claimed` is false where n_eff falls below that minimum, and those trends are not registered as numbers.', notes=['A month whose `claimed` is false is plotted with its interval but never quoted in prose.'])
october = add_ventura_october(num)
num.save()
print(f"seasonality: {len(num.items)} numbers; Ventura October {october['year'].min()}–{october['year'].max()}, {len(october)} years")
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/stations.py238 lines
from __future__ import annotations
import math
import numpy as np
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/stations.py'
SRC = {'fresno': 'ghcnd/USW00093193', 'threadex': 'acis/threadex_FATthr_daily.json', 'fc_tavg': 'noaa_cag/CA-019_tavg_ann_1895-2025.csv', 'fc_tmax': 'noaa_cag/CA-019_tmax_ann_1895-2025.csv', 'fc_tmin': 'noaa_cag/CA-019_tmin_ann_1895-2025.csv', 'vc_tavg': 'noaa_cag/CA-111_tavg_ann_1895-2025.csv', 'inventory': 'acis/stnmeta_ventura_westla.json', 'prism_to': 'acis/prism_thousand_oaks_annual_1981-2025.json', 'prism_simi': 'acis/prism_simi_valley_annual_1981-2025.json', 'livneh_to_max': 'caladapt/livneh_tasmax_year_thousand_oaks.json', 'livneh_to_min': 'caladapt/livneh_tasmin_year_thousand_oaks.json', 'livneh_simi_max': 'caladapt/livneh_tasmax_year_simi_valley.json', 'livneh_simi_min': 'caladapt/livneh_tasmin_year_simi_valley.json'}
VENTURA_STATIONS = {'USC00046399': ('OJAI', 'coop'), 'USC00049785': ('WOODLAND HILLS PIERCE COLLEGE', 'coop'), 'USW00023136': ('CAMARILLO AP', 'asos'), 'USR0000CTHS': ('THOUSAND OAKS RAWS', 'raws'), 'USR0000CSIV': ('SIMI VALLEY RAWS', 'raws'), 'USC00048904': ('THOUSAND OAKS 1 SW', 'coop')}
CITIES = {'thousand_oaks': (34.17, -118.84), 'simi_valley': (34.27, -118.78)}
SPLICES = ['1939-07-01', '1949-08-21']
LIVNEH_LAST_GOOD = 2011
def calendar(df: pd.DataFrame, element: str, date_col: str='date') -> pd.Series:
series = df.set_index(date_col)[element]
first, last = (df[date_col].min(), df[date_col].max())
days = pd.date_range(f'{first.year}-01-01', f'{last.year}-12-31', freq='D')
return series.reindex(days)
def annual_means(daily: pd.Series) -> tuple[pd.Series, pd.Series]:
frame = pd.DataFrame({'v': daily.values, 'y': daily.index.year, 'm': daily.index.month})
grouped = frame.groupby(['y', 'm'])['v']
monthly = grouped.mean()
missing = grouped.size() - grouped.count()
valid = monthly.where(missing <= 3)
per_year = valid.groupby(level=0)
annual = per_year.mean().where(per_year.count() == 12)
invalid_months = 12 - per_year.count()
annual.index.name = invalid_months.index.name = 'year'
return (annual, invalid_months)
def threshold_days(daily: pd.Series, threshold: float, season: tuple[int, int]) -> tuple[pd.Series, pd.Series]:
frame = pd.DataFrame({'v': daily.values, 'y': daily.index.year, 'm': daily.index.month})
counts = frame.assign(hit=frame['v'] >= threshold).groupby('y')['hit'].sum().astype(float)
in_season = frame[(frame.m >= season[0]) & (frame.m <= season[1])]
missing = in_season['v'].isna().groupby(in_season['y']).sum()
counts.index.name = missing.index.name = 'year'
return (counts.where(missing == 0), missing)
def haversine_km(lat1, lon1, lat2, lon2) -> float:
p1, p2 = (math.radians(lat1), math.radians(lat2))
dp, dl = (p2 - p1, math.radians(lon2 - lon1))
a = math.sin(dp / 2) ** 2 + math.cos(p1) * math.cos(p2) * math.sin(dl / 2) ** 2
return 6371.0 * 2 * math.asin(math.sqrt(a))
def county(key: str) -> pd.Series:
return R.cag(R.RAW / SRC[key]).df.set_index('year')['value']
def trend_entry(num: Numbers, key: str, s: pd.Series, units: str, inputs: list[str], desc: str, decimals: int=2) -> None:
s = s.dropna()
res = stats.ols_trend(s.index.values, s.values)
valid, start = stats.sparsest_decade(s.index.values)
refusal = None
if valid < stats.MIN_VALID_PER_DECADE:
refusal = f'Window completeness: {valid} valid years in {start}–{start + 9}'
num.add_trend_result(key, res, units=f'{units}/decade', decimals=decimals, inputs=inputs, description=desc, refusal=refusal)
def fresno(num: Numbers) -> None:
air = R.ncei_daily(R.RAW / SRC['fresno']).df
tmax_d, tmin_d = (calendar(air, 'TMAX'), calendar(air, 'TMIN'))
tmax, bad_max = annual_means(tmax_d)
tmin, bad_min = annual_means(tmin_d)
annual = pd.DataFrame({'tmax_f': tmax, 'tmin_f': tmin})
annual['tavg_f'] = (annual.tmax_f + annual.tmin_f) / 2
valid = annual.dropna()
for col in ('tavg_f', 'tmax_f', 'tmin_f'):
annual[f'{col}_lowess'] = pd.Series(stats.lowess(valid.index.values, valid[col].values, frac=0.3), index=valid.index)
fc = {k: county(f'fc_{k}') for k in ('tavg', 'tmax', 'tmin')}
for k in ('tavg', 'tmax', 'tmin'):
annual[f'{k}_minus_county_f'] = annual[f'{k}_f'] - fc[k].reindex(annual.index)
annual['invalid_months_tmax'] = bad_max
annual['invalid_months_tmin'] = bad_min
inputs = [f"{SRC['fresno']}/{p.name}" for p in sorted((R.RAW / SRC['fresno']).glob('*.csv'))]
county_inputs = [SRC['fc_tavg'], SRC['fc_tmax'], SRC['fc_tmin']]
table = annual.reset_index()
write_table(table, 'fresno_airport_annual', script=SCRIPT, inputs=inputs + county_inputs, units={'year': 'year', **{c: 'degF' for c in table.columns if c.endswith('_f') or c.endswith('_lowess')}, 'invalid_months_tmax': 'months', 'invalid_months_tmin': 'months'}, description="FRESNO YOSEMITE INT'L (USW00093193) annual mean Tmax, Tmin and Tavg from raw GHCN-Daily, with LOWESS smooths and differences from homogenized Fresno County nClimGrid.", method='Missing-data rule; Tavg = (Tmax + Tmin)/2; LOWESS frac 0.3, 3 robustness iterations.', notes=["Raw station data, not homogenized. One relocation in the station's own history (0.5 mi WSW, 1995-09-01, NCEI HOMR).", 'Station-minus-county differences show local effects (urban growth, irrigation, siting, instruments) relative to the county-wide gridded analysis.'])
decadal = []
for col in ('tavg_f', 'tmax_f', 'tmin_f'):
for row in stats.decadal_means(valid.index.values, valid[col].values, min_count=8):
decadal.append({'series': col, **row})
write_table(pd.DataFrame(decadal), 'fresno_airport_decadal', script=SCRIPT, inputs=inputs, units={'series': 'name', 'decade': 'year', 'mean': 'degF', 'n': 'years'}, description='Decadal means of Fresno airport annual temperatures (decades with ≥ 8 valid years).')
for col in ('tavg_f', 'tmax_f', 'tmin_f'):
trend_entry(num, f'airport_{col[:-2]}.trend_1948_2025', annual[col], 'degF', inputs, f'Fresno airport annual {col[:4]} OLS trend 1948–2025')
change = stats.period_mean_difference(valid.index.values, valid[col].values, (1948, 1977), (1996, 2025))
num.add(f'airport_{col[:-2]}.change_1948_1977_to_1996_2025', change['difference'], units='degF', decimals=1, kind='delta_temp', ci=(change['ci_low'], change['ci_high']), n_eff=change['n_eff'], inputs=inputs, description=f'Fresno airport {col[:4]}: mean 1996–2025 minus mean 1948–1977')
diff = valid['tmin_f'] - valid['tmax_f']
trend_entry(num, 'airport_tmin_minus_tmax.trend_1948_2025', diff, 'degF', inputs, 'Trend of (Tmin − Tmax) at Fresno airport, 1948–2025: positive = nights warming faster than days')
for k in ('tavg', 'tmax', 'tmin'):
trend_entry(num, f'airport_{k}_minus_county.trend_1948_2025', annual[f'{k}_minus_county_f'], 'degF', inputs + county_inputs, f'Trend of Fresno airport {k} minus Fresno County {k}, 1948–2025')
num.add('airport.years_excluded_d6', int(annual[['tmax_f', 'tmin_f']].isna().any(axis=1).sum()), units='years', decimals=0, kind='count', inputs=inputs, description='Fresno airport years excluded by the missing-data rule')
num.add('airport.max_tmin', float(tmin_d.max()), units='degF', decimals=0, kind='abs_temp', inputs=inputs, description='Highest daily minimum in the airport record (2006-07-23, July 2006 heat wave; passed NCEI QC)')
d100, miss100 = threshold_days(tmax_d, 100, (5, 9))
n75, miss75 = threshold_days(tmin_d, 75, (6, 9))
counts = pd.DataFrame({'days_tmax_ge_100': d100, 'nights_tmin_ge_75': n75, 'missing_may_sep_tmax': miss100, 'missing_jun_sep_tmin': miss75}).reset_index()
write_table(counts, 'fresno_airport_threshold_days', script=SCRIPT, inputs=inputs, units={'year': 'year', 'days_tmax_ge_100': 'days', 'nights_tmin_ge_75': 'nights', 'missing_may_sep_tmax': 'days', 'missing_jun_sep_tmin': 'days'}, description='Days per year with Tmax ≥ 100 °F and nights with Tmin ≥ 75 °F at Fresno airport.', method='A year counts only with zero missing days in May–September (Tmax) or June–September (Tmin).')
threshold_decadal = []
for col in ('days_tmax_ge_100', 'nights_tmin_ge_75'):
valid_counts = counts.set_index('year')[col].dropna()
for row in stats.decadal_means(valid_counts.index.values, valid_counts.values, min_count=8):
threshold_decadal.append({'series': col, **row})
write_table(pd.DataFrame(threshold_decadal), 'fresno_airport_threshold_decadal', script=SCRIPT, inputs=inputs, units={'series': 'name', 'decade': 'year', 'mean': 'days (or nights) per year', 'n': 'years'}, description='Decadal means of the Fresno airport threshold counts (decades with ≥ 8 complete years).')
homr_path = 'homr/USW00093193_search.json'
events = []
station = R.homr_station(R.RAW / homr_path)
identifiers = {i.get('id') for i in station.get('identifiers', [])}
if 'USW00093193' not in identifiers and (not any(('93193' in str(i) for i in identifiers))):
raise ValueError(f'HOMR returned an unexpected station: {sorted(identifiers)[:6]}')
relocations = station.get('relocations') or []
if not relocations:
raise ValueError('HOMR record has no relocations; the V5/V5b station markers would be silently lost')
for move in relocations:
when = pd.Timestamp(str(move['date'])[:10])
distance = str(move.get('relocation', '')).strip()
distance = f'0{distance}' if distance.startswith('.') else distance
events.append({'station': 'USW00093193', 'date': when.date().isoformat(), 'kind': 'relocation', 'label': f'Moved {distance} ({when.date().isoformat()})', 'source': homr_path})
for when_text in SPLICES:
events.append({'station': 'FATthr', 'date': when_text, 'kind': 'splice', 'label': f'Splice ({when_text})', 'source': SRC['threadex']})
for event in events:
when = pd.Timestamp(event['date'])
event['decimal_year'] = when.year + (when.dayofyear - 1) / (366 if when.is_leap_year else 365)
write_table(pd.DataFrame(events), 'fresno_station_events', script=SCRIPT, inputs=[homr_path, SRC['threadex']], units={'station': 'id', 'date': 'date', 'kind': 'name', 'label': 'text', 'source': 'path', 'decimal_year': 'year'}, description='Dated station changes drawn on the Fresno charts: relocations recorded in NCEI HOMR and the two ThreadEx splice dates, both found by the automated validation pass over the raw files.')
for col, label in (('days_tmax_ge_100', 'days ≥ 100 °F'), ('nights_tmin_ge_75', 'nights ≥ 75 °F')):
c = counts.set_index('year')[col].dropna()
pois = stats.poisson_trend(c.index.values, c.values)
num.add(f'{col}.rate_ratio_per_decade', pois['rr10_quasi'], units='ratio per decade', decimals=2, ci=(pois['rr10_quasi_ci_low'], pois['rr10_quasi_ci_high']), inputs=inputs, description=f'Quasi-Poisson rate ratio per decade for {label}, 1948–2025 (pre-registered)')
num.add(f'{col}.dispersion', pois['dispersion'], units='ratio', decimals=1, inputs=inputs, description=f'Pearson dispersion of the Poisson fit for {label} (>1 = over-dispersed)')
for start, end in ((1948, 1977), (1996, 2025)):
num.add(f'{col}.mean_{start}_{end}', c.loc[start:end].mean(), units=f'{label.split()[0]} per year', decimals=1, kind='count', inputs=inputs, description=f'Mean {label} per year at Fresno airport, {start}–{end}')
num.add(f'{col}.years_excluded_d6', int(counts[col].isna().sum()), units='years', decimals=0, kind='count', inputs=inputs, description=f'Years excluded from the {label} count by the missing-data rule')
def fresno_threadex(num: Numbers) -> None:
thr = R.acis_threadex(R.RAW / SRC['threadex']).df
tmax_d, tmin_d = (calendar(thr, 'maxt'), calendar(thr, 'mint'))
tmax, _ = annual_means(tmax_d)
tmin, _ = annual_means(tmin_d)
sid = thr.assign(year=thr.date.dt.year).groupby('year')['maxt_sid'].agg(lambda s: '/'.join(sorted(set(s))))
fc = {k: county(f'fc_{k}') for k in ('tavg', 'tmax', 'tmin')}
frame = pd.DataFrame({'tmax_f': tmax, 'tmin_f': tmin})
frame['tavg_f'] = (frame.tmax_f + frame.tmin_f) / 2
for k in ('tavg', 'tmax', 'tmin'):
frame[f'{k}_minus_county_f'] = frame[f'{k}_f'] - fc[k].reindex(frame.index)
frame['station_ids'] = sid.reindex(frame.index)
d100, _ = threshold_days(tmax_d, 100, (5, 9))
frame['days_tmax_ge_100'] = d100
table = frame.reset_index()
inputs = [SRC['threadex'], SRC['fc_tavg'], SRC['fc_tmax'], SRC['fc_tmin']]
write_table(table, 'fresno_threadex_annual', script=SCRIPT, inputs=inputs, units={'year': 'year', 'tmax_f': 'degF', 'tmin_f': 'degF', 'tavg_f': 'degF', 'tavg_minus_county_f': 'degF', 'tmax_minus_county_f': 'degF', 'tmin_minus_county_f': 'degF', 'station_ids': 'WBAN/GHCN ids', 'days_tmax_ge_100': 'days'}, description="ACIS ThreadEx 'Fresno Area' annual means and 100 °F day counts, 1888–2025, with the contributing station for each year and differences from Fresno County nClimGrid.", method='Missing-data rules; contributing station from the id ACIS attaches to each daily value.', notes=[f'Station changes on {SPLICES[0]} (downtown → Chandler) and {SPLICES[1]} (Chandler → airport). No trend is fitted across a splice.', 'The 598 days of 1948-01-01 to 1949-08-20 appear under both the Chandler and airport ids with identical values, so no independent overlap exists at the 1949 splice.'])
diff = frame['tavg_minus_county_f']
for k in ('tavg', 'tmax', 'tmin'):
series = frame[f'{k}_minus_county_f']
for label, before, after in (('1939', (1929, 1938), (1940, 1948)), ('1949', (1940, 1948), (1950, 1959))):
s = series.dropna()
step = stats.period_mean_difference(s.index.values, s.values, before, after)
num.add(f'threadex_step_{label}.{k}', step['difference'], units='degF', decimals=1, kind='delta_temp', ci=(step['ci_low'], step['ci_high']), n_eff=step['n_eff'], inputs=inputs, description=f'Change in (ThreadEx {k} − Fresno County {k}) across the {label} station move: mean {after[0]}–{after[1]} minus mean {before[0]}–{before[1]}')
num.add('threadex.first_valid_year', int(frame.tmax_f.first_valid_index()), units='year', decimals=0, kind='year', inputs=inputs, description='First complete year in the ThreadEx Fresno record')
del diff
def across_gap(num: Numbers, sid: str, name: str, station: pd.Series, county_tavg: pd.Series) -> None:
years = [int(y) for y in station.index]
before, after = max(zip(years, years[1:]), key=lambda pair: pair[1] - pair[0])
first, last = ((years[0], before), (after, years[-1]))
station_input = f'ghcnd/{sid}'
num.add(f'{sid}.gap_first_missing', before + 1, units='year', decimals=0, kind='year', inputs=[station_input], description=f'{name}: first year of the longest run without a valid annual Tavg')
num.add(f'{sid}.gap_last_missing', after - 1, units='year', decimals=0, kind='year', inputs=[station_input], description=f'{name}: last year of the longest run without a valid annual Tavg')
county_same = county_tavg.reindex(station.index)
for label, series, what in (('tavg_change_across_gap', station, f'{name} Tavg'), ('county_change_across_gap', county_same, 'Ventura County Tavg in the same years'), ('minus_county_change_across_gap', station - county_same, f'{name} Tavg minus Ventura County Tavg')):
s = series.dropna()
change = stats.period_mean_difference(s.index.values, s.values, first, last)
num.add(f'{sid}.{label}', change['difference'], units='degF', decimals=1, kind='delta_temp', ci=(change['ci_low'], change['ci_high']), n_eff=change['n_eff'], inputs=[station_input, SRC['vc_tavg']], description=f"{what}: mean of valid years {last[0]}–{last[1]} minus {first[0]}–{first[1]}, across the record's longest gap")
def ventura(num: Numbers) -> None:
inventory = R.acis_stnmeta(R.RAW / SRC['inventory']).df
coords = {}
for _, row in inventory.iterrows():
for sid in VENTURA_STATIONS:
if sid in row['sids']:
coords[sid] = (row['lat'], row['lon'], row['elev_ft'])
long_rows, inv_rows = ([], [])
county_tavg = county('vc_tavg')
base = (1951, 2010)
for sid, (name, kind) in VENTURA_STATIONS.items():
table = R.ncei_daily(R.RAW / 'ghcnd' / sid).df
tmax, _ = annual_means(calendar(table, 'TMAX'))
tmin, _ = annual_means(calendar(table, 'TMIN'))
tavg = (tmax + tmin) / 2
valid_years = tavg.dropna()
sparsest, _ = stats.sparsest_decade(valid_years.index.values)
lat, lon, elev = coords.get(sid, (np.nan, np.nan, np.nan))
inv_rows.append({'station_id': sid, 'name': name, 'network': kind, 'lat': lat, 'lon': lon, 'elev_ft': elev, 'km_to_thousand_oaks': haversine_km(lat, lon, *CITIES['thousand_oaks']) if np.isfinite(lat) else np.nan, 'km_to_simi_valley': haversine_km(lat, lon, *CITIES['simi_valley']) if np.isfinite(lat) else np.nan, 'first_year': int(table.date.min().year), 'last_year': int(table.date.max().year), 'valid_tavg_years': int(len(valid_years)), 'valid_tmin_years': int(tmin.notna().sum()), 'sparsest_decade_tavg_years': int(sparsest), 'trend_allowed': bool(len(valid_years) >= 30 and kind != 'raws' and (sparsest >= stats.MIN_VALID_PER_DECADE))})
in_base = valid_years.loc[base[0]:base[1]]
reference = in_base.mean() if len(in_base) >= 20 else np.nan
for year, value in tavg.items():
long_rows.append({'year': int(year), 'series': sid, 'element': 'tavg', 'value_f': value, 'anomaly_f': value - reference if np.isfinite(reference) else np.nan})
for year, value in tmin.items():
long_rows.append({'year': int(year), 'series': sid, 'element': 'tmin', 'value_f': value, 'anomaly_f': np.nan})
if len(valid_years) >= 30 and kind != 'raws':
trend_entry(num, f'{sid}.tavg_trend_valid_years', valid_years, 'degF', [f'ghcnd/{sid}'], f'{name} annual Tavg OLS trend over its complete years ({int(valid_years.index.min())}–{int(valid_years.index.max())})')
if sparsest < stats.MIN_VALID_PER_DECADE:
across_gap(num, sid, name, valid_years, county_tavg)
tmin_sparsest, _ = stats.sparsest_decade(tmin.dropna().index.values)
num.add(f'{sid}.tmin_sparsest_decade_years', int(tmin_sparsest), units='years', decimals=0, inputs=[f'ghcnd/{sid}'], description=f'{name}: valid annual Tmin years in its emptiest ten-year window')
if tmin.notna().sum() >= 30 and kind != 'raws':
trend_entry(num, f'{sid}.tmin_trend_valid_years', tmin, 'degF', [f'ghcnd/{sid}'], f'{name} annual Tmin OLS trend over its complete years')
county_ref = county_tavg.loc[base[0]:base[1]].mean()
for year, value in county_tavg.items():
long_rows.append({'year': int(year), 'series': 'ventura_county_nclimgrid', 'element': 'tavg', 'value_f': value, 'anomaly_f': value - county_ref})
for city in CITIES:
prism = R.acis_grid_annual(R.RAW / SRC[f"prism_{('to' if city == 'thousand_oaks' else 'simi')}"]).df.set_index('year')
for year, value in prism['avgt'].items():
long_rows.append({'year': int(year), 'series': f'prism_{city}', 'element': 'tavg', 'value_f': value, 'anomaly_f': np.nan})
key = 'to' if city == 'thousand_oaks' else 'simi'
lmax = R.caladapt_events(R.RAW / SRC[f'livneh_{key}_max']).df.set_index('year')['value']
lmin = R.caladapt_events(R.RAW / SRC[f'livneh_{key}_min']).df.set_index('year')['value']
ltavg = ((lmax + lmin) / 2 * 1.8 + 32).loc[:LIVNEH_LAST_GOOD]
for year, value in ltavg.items():
long_rows.append({'year': int(year), 'series': f'livneh_{city}', 'element': 'tavg', 'value_f': value, 'anomaly_f': np.nan})
long = pd.DataFrame(long_rows).sort_values(['series', 'element', 'year']).reset_index(drop=True)
station_inputs = [f'ghcnd/{sid}' for sid in VENTURA_STATIONS]
all_inputs = station_inputs + [SRC['vc_tavg'], SRC['inventory'], SRC['prism_to'], SRC['prism_simi'], SRC['livneh_to_max'], SRC['livneh_to_min'], SRC['livneh_simi_max'], SRC['livneh_simi_min']]
write_table(long, 'ventura_county_records', script=SCRIPT, inputs=all_inputs, units={'year': 'year', 'series': 'id', 'element': 'name', 'value_f': 'degF', 'anomaly_f': 'degF'}, baseline="anomaly_f: each series' own 1951–2010 mean (only where ≥ 20 valid years exist in 1951–2010)", description='Ventura County nClimGrid, nearby station annual means, short RAWS records, and gridded PRISM/Livneh values at the Thousand Oaks and Simi Valley coordinates.', method='Station annual means use the missing-data rule; PRISM via ACIS grid 21 (1981–2025); Livneh (Cal-Adapt) converted °C→°F, 1950–2011 only.', notes=['No station in Thousand Oaks or Simi Valley has a record long enough for a climate trend; RAWS rows are shown only as short segments.', 'A station trend needs at least 8 valid years in every ten-year window; a record that fails is compared with the county across its longest gap instead.', 'PRISM and Livneh are interpolations of largely the same station network, not independent evidence, and get no trend.', 'Livneh 2012–2013 excluded: Tmax departs from PRISM by +1.1 to +2.1 °C against a 1981–2011 offset near −0.4/+1.0 °C, found by the automated validation pass over the raw files.'])
inv = pd.DataFrame(inv_rows)
write_table(inv, 'ventura_station_inventory', script=SCRIPT, inputs=all_inputs, units={'station_id': 'id', 'name': 'name', 'network': 'name', 'lat': 'degrees', 'lon': 'degrees', 'elev_ft': 'feet', 'km_to_thousand_oaks': 'km', 'km_to_simi_valley': 'km', 'first_year': 'year', 'last_year': 'year', 'valid_tavg_years': 'years', 'valid_tmin_years': 'years', 'sparsest_decade_tavg_years': 'years', 'trend_allowed': 'boolean'}, description='Stations used for the Ventura County / Thousand Oaks / Simi Valley comparison, with distances and complete years.')
for _, row in inv.iterrows():
num.add(f'{row.station_id}.km_to_thousand_oaks', row.km_to_thousand_oaks, units='km', decimals=0, inputs=[SRC['inventory']], description=f"Distance from {row['name']} to Thousand Oaks (34.17 N, 118.84 W)")
num.add(f'{row.station_id}.valid_tavg_years', row.valid_tavg_years, units='years', decimals=0, kind='count', inputs=[f'ghcnd/{row.station_id}'], description=f"Complete annual Tavg years at {row['name']}")
def main() -> int:
num = Numbers('stations', SCRIPT)
fresno(num)
fresno_threadex(num)
ventura(num)
num.save()
print(f'stations: {len(num.items)} numbers')
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/us_ca.py102 lines
from __future__ import annotations
import numpy as np
import pandas as pd
from scripts.lib import readers as R
from scripts.lib import stats
from scripts.lib.io import Numbers, write_table
SCRIPT = 'scripts/process/us_ca.py'
SRC = {'global': 'noaa_cag/global_land_ocean_12mo_dec_1850-2025.csv', 'ca_tavg': 'noaa_cag/CA_tavg_ann_1895-2025.csv', 'ca_tmax_ao': 'noaa_cag/CA_tmax_apr-oct_1895-2025.csv', 'ca_pcp': 'noaa_cag/CA_pcp_oct-sep_1896-2025.csv', 'fc_tavg': 'noaa_cag/CA-019_tavg_ann_1895-2025.csv', 'fc_tmax': 'noaa_cag/CA-019_tmax_ann_1895-2025.csv', 'fc_tmin': 'noaa_cag/CA-019_tmin_ann_1895-2025.csv', 'fc_cdd': 'noaa_cag/CA-019_cdd_ann_1895-2025.csv', 'fc_hdd': 'noaa_cag/CA-019_hdd_ann_1895-2025.csv', 'vc_tavg': 'noaa_cag/CA-111_tavg_ann_1895-2025.csv', 'vc_tmax': 'noaa_cag/CA-111_tmax_ann_1895-2025.csv', 'vc_tmin': 'noaa_cag/CA-111_tmin_ann_1895-2025.csv', 'nti_tavg': 'noaa_nti/conus_anom_tavg_ann.csv', 'nti_tmax': 'noaa_nti/conus_anom_tmax_ann.csv', 'nti_tmin': 'noaa_nti/conus_anom_tmin_ann.csv'}
BASE = (1901, 2000)
FIRST30, LAST30 = ((1895, 1924), (1996, 2025))
F_PER_C = 1.8
def cag(key: str) -> pd.Series:
return R.cag(R.RAW / SRC[key]).df.set_index('year')['value']
def add_change_and_trend(num: Numbers, key: str, s: pd.Series, units: str, inputs: list[str], label: str, kind: str='delta_temp', first=FIRST30, last=LAST30, trend_span=(1895, 2025)) -> dict:
change = stats.period_mean_difference(s.index.values, s.values, first, last)
num.add(f'{key}.change_{first[0]}_{first[1]}_to_{last[0]}_{last[1]}', change['difference'], units=units, decimals=2, kind=kind, ci=(change['ci_low'], change['ci_high']), n_eff=change['n_eff'], inputs=inputs, description=f'{label}: mean {last[0]}–{last[1]} minus mean {first[0]}–{first[1]} (AR(1)-adjusted 95% CI)')
span = s.loc[trend_span[0]:trend_span[1]].dropna()
trend = stats.ols_trend(span.index.values, span.values)
num.add_trend_result(f'{key}.trend_{trend_span[0]}_{trend_span[1]}', trend, units=f'{units}/decade', decimals=3, kind=kind, inputs=inputs, description=f'{label}: OLS trend {trend_span[0]}–{trend_span[1]} per decade (AR(1)-adjusted 95% CI)')
return {'change': change, 'trend': trend}
def main() -> int:
num = Numbers('us', SCRIPT)
glob = cag('global')
frame = pd.DataFrame(index=pd.RangeIndex(1850, 2026, name='year'))
frame['globe_c'] = glob - glob.loc[BASE[0]:BASE[1]].mean()
local = {'california': cag('ca_tavg'), 'fresno_county': cag('fc_tavg'), 'ventura_county': cag('vc_tavg')}
for name, series in local.items():
anomaly_f = series - series.loc[BASE[0]:BASE[1]].mean()
frame[f'{name}_f'] = anomaly_f
frame[f'{name}_c'] = anomaly_f / F_PER_C
inputs_v2 = [SRC['global'], SRC['ca_tavg'], SRC['fc_tavg'], SRC['vc_tavg']]
write_table(frame.reset_index(), 'local_vs_global_anomalies', script=SCRIPT, inputs=inputs_v2, units={'year': 'year', 'globe_c': 'degC', 'california_f': 'degF', 'california_c': 'degC', 'fresno_county_f': 'degF', 'fresno_county_c': 'degC', 'ventura_county_f': 'degF', 'ventura_county_c': 'degC'}, baseline='1901-2000 (each series relative to its own 1901–2000 mean)', description='Annual mean temperature anomalies: globe (NOAAGlobalTemp), California, Fresno County and Ventura County (nClimGrid).', method='Anomaly = annual value − own 1901–2000 mean; °C = °F anomaly / 1.8 (no offset for differences).', notes=['County and state series are nClimGrid gridded analyses, not single stations.', 'V1 uses a 1850–1900 baseline for the globe; this table uses 1901–2000 so local and global share one period.'])
for name, series in local.items():
add_change_and_trend(num, name, series, 'degF', [SRC[f"{('ca' if name == 'california' else name[:1] + 'c')}_tavg"]], f"{name.replace('_', ' ').title()} annual mean temperature")
glob_c = frame['globe_c']
add_change_and_trend(num, 'globe_1901_2000', glob_c.loc[1895:2025], 'degC', [SRC['global']], 'Global (NOAAGlobalTemp) annual anomaly, same periods as the local series')
period_rows = []
for name in ('globe', 'california', 'fresno_county', 'ventura_county'):
series = frame[f'{name}_c']
for period in (FIRST30, LAST30):
m = stats.mean_ci(series.loc[period[0]:period[1]].values)
period_rows.append({'series': name, 'period_start': period[0], 'period_end': period[1], 'mean_c': m['mean'], 'ci_low_c': m['ci_low'], 'ci_high_c': m['ci_high'], 'mean_f': m['mean'] * F_PER_C, 'ci_low_f': m['ci_low'] * F_PER_C, 'ci_high_f': m['ci_high'] * F_PER_C, 'n_years': m['n'], 'n_eff': m['n_eff']})
write_table(pd.DataFrame(period_rows), 'local_period_means', script=SCRIPT, inputs=inputs_v2, units={'series': 'name', 'period_start': 'year', 'period_end': 'year', 'mean_c': 'degC', 'ci_low_c': 'degC', 'ci_high_c': 'degC', 'mean_f': 'degF', 'ci_low_f': 'degF', 'ci_high_f': 'degF', 'n_years': 'years', 'n_eff': 'years (AR(1) effective)'}, baseline='1901-2000 (each series relative to its own 1901–2000 mean)', description='First and last 30-year mean anomalies (1895–1924, 1996–2025) for the globe, California, Fresno County and Ventura County.', method='Mean of annual anomalies; 95% interval uses the AR(1) effective sample size and t with n_eff − 1 degrees of freedom.')
ca = local['california'].loc[:2025]
ranked = ca.sort_values(ascending=False, kind='stable')
top10 = pd.DataFrame({'rank': np.arange(1, 11), 'year': ranked.index[:10].astype(int), 'tavg_f': ranked.values[:10], 'anomaly_f': ranked.values[:10] - ca.loc[BASE[0]:BASE[1]].mean()})
write_table(top10, 'california_top10_warmest', script=SCRIPT, inputs=[SRC['ca_tavg']], units={'rank': 'rank', 'year': 'year', 'tavg_f': 'degF', 'anomaly_f': 'degF'}, baseline='1901-2000 for anomaly_f', description="The ten warmest complete years in California's statewide nClimGrid record, 1895–2025.")
ca_table = pd.DataFrame({'year': ca.index.astype(int), 'tavg_f': ca.values, 'anomaly_f': ca.values - ca.loc[BASE[0]:BASE[1]].mean()})
ca_table['anomaly_c'] = ca_table['anomaly_f'] / F_PER_C
trend = stats.ols_trend(ca_table.year, ca_table.tavg_f)
ca_table['trend_f'] = trend['intercept'] + trend['slope'] * ca_table.year
write_table(ca_table, 'california_tavg_annual', script=SCRIPT, inputs=[SRC['ca_tavg']], units={'year': 'year', 'tavg_f': 'degF', 'anomaly_f': 'degF', 'anomaly_c': 'degC', 'trend_f': 'degF'}, baseline='1901-2000 for anomalies', method='OLS trend line over 1895–2025.', description='California statewide annual mean temperature (nClimGrid) with anomaly and fitted OLS trend.', notes=['NCEI publishes no uncertainty estimate for statewide values; the trend CI (numbers registry) is statistical, not measurement uncertainty.'])
num.add('california.top10_since_2000', int((top10.year >= 2000).sum()), units='years', decimals=0, kind='count', inputs=[SRC['ca_tavg']], description="How many of California's ten warmest years (1895–2025) occurred in 2000 or later")
num.add('california.warmest_year', int(top10.year.iloc[0]), units='year', decimals=0, kind='year', inputs=[SRC['ca_tavg']], description="Warmest year in California's statewide record, 1895–2025")
num.add('california.years_in_record', int(len(ca)), units='years', decimals=0, kind='count', inputs=[SRC['ca_tavg']], description='Complete years in the statewide record')
for key, label in (('fc_tmax', 'Fresno County annual Tmax'), ('fc_tmin', 'Fresno County annual Tmin'), ('vc_tmax', 'Ventura County annual Tmax'), ('vc_tmin', 'Ventura County annual Tmin')):
add_change_and_trend(num, key, cag(key), 'degF', [SRC[key]], label)
cdd, hdd = (cag('fc_cdd'), cag('fc_hdd'))
dd = pd.DataFrame({'year': cdd.index.astype(int), 'cdd': cdd.values, 'hdd': hdd.reindex(cdd.index).values})
write_table(dd, 'fresno_county_degree_days', script=SCRIPT, inputs=[SRC['fc_cdd'], SRC['fc_hdd']], units={'year': 'year', 'cdd': 'degF-days (base 65 degF)', 'hdd': 'degF-days (base 65 degF)'}, description='Fresno County annual cooling and heating degree days (nClimGrid-derived, NCEI Climate at a Glance).', notes=['Degree days are a temperature index of heating/cooling demand, not measured energy use.'])
for key, label in (('fc_cdd', 'Fresno County cooling degree days'), ('fc_hdd', 'Fresno County heating degree days')):
add_change_and_trend(num, key, cag(key), 'degree-days (base 65 degF)', [SRC[key]], label, kind='value')
ws = cag('ca_tmax_ao')
ws_table = pd.DataFrame({'year': ws.index.astype(int), 'tmax_apr_oct_f': ws.values, 'anomaly_f': ws.values - ws.loc[BASE[0]:BASE[1]].mean()})
write_table(ws_table, 'california_warm_season_tmax', script=SCRIPT, inputs=[SRC['ca_tmax_ao']], units={'year': 'year', 'tmax_apr_oct_f': 'degF', 'anomaly_f': 'degF'}, baseline='1901-2000 for anomaly', description='California statewide April–October mean maximum temperature (nClimGrid), the fire-season heat index available from NCEI.', notes=['This is temperature, not vapor pressure deficit or fuel aridity; no VPD series was obtained from a primary source in this build.'])
add_change_and_trend(num, 'ca_tmax_apr_oct', ws, 'degF', [SRC['ca_tmax_ao']], 'California April–October Tmax')
pcp = cag('ca_pcp')
p = pd.DataFrame({'year': pcp.index.astype(int), 'pcp_in': pcp.values})
p['rolling30_sd_in'] = p['pcp_in'].rolling(30).std()
p['rolling30_mean_in'] = p['pcp_in'].rolling(30).mean()
p['rolling30_cv'] = p['rolling30_sd_in'] / p['rolling30_mean_in']
write_table(p, 'california_precip_water_year', script=SCRIPT, inputs=[SRC['ca_pcp']], units={'year': 'year (water year ending September)', 'pcp_in': 'inches', 'rolling30_sd_in': 'inches', 'rolling30_mean_in': 'inches', 'rolling30_cv': 'dimensionless'}, description='California statewide October–September precipitation with trailing 30-year standard deviation, mean and coefficient of variation (descriptive).', method="Rolling window = the 30 water years ending in the row's year.")
early = pcp.loc[1896:1960].values
late = pcp.loc[1961:2025].values
bf = stats.brown_forsythe(early, late)
for field, units, dec, desc in (('p', 'p-value', 3, 'Brown–Forsythe p-value, water years 1896–1960 vs 1961–2025 (pre-registered)'), ('sd_a', 'inches', 2, 'Standard deviation of water-year precipitation 1896–1960'), ('sd_b', 'inches', 2, 'Standard deviation of water-year precipitation 1961–2025'), ('cv_a', 'ratio', 2, 'Coefficient of variation 1896–1960'), ('cv_b', 'ratio', 2, 'Coefficient of variation 1961–2025'), ('mean_a', 'inches', 1, 'Mean water-year precipitation 1896–1960'), ('mean_b', 'inches', 1, 'Mean water-year precipitation 1961–2025')):
num.add(f'ca_precip.bf_{field}', bf[field], units=units, decimals=dec, inputs=[SRC['ca_pcp']], description=desc)
nti = {el: R.nti(R.RAW / SRC[f'nti_{el}']).df.set_index('year') for el in ('tavg', 'tmax', 'tmin')}
rows = pd.DataFrame(index=nti['tavg'].index)
for el, table in nti.items():
rows[f'climdiv_{el}'] = table['climdiv']
rows[f'uscrn_{el}'] = table['uscrn']
rows[f'diff_{el}'] = table['uscrn'] - table['climdiv']
rows = rows.loc[2005:2025].reset_index()
inputs_nti = [SRC['nti_tavg'], SRC['nti_tmax'], SRC['nti_tmin']]
write_table(rows, 'conus_uscrn_vs_climdiv', script=SCRIPT, inputs=inputs_nti, units={c: 'year' if c == 'year' else 'degF' for c in rows.columns}, baseline='1991-2020 (NCEI, both networks)', description='Contiguous-US annual anomalies from USCRN (reference network, pristine sites) and ClimDiv (all stations, homogenized), and their difference.')
for el in ('tavg', 'tmax', 'tmin'):
r = rows.dropna(subset=[f'uscrn_{el}'])
for col, label in ((f'uscrn_{el}', 'USCRN'), (f'climdiv_{el}', 'ClimDiv'), (f'diff_{el}', 'USCRN minus ClimDiv')):
res = stats.ols_trend(r.year.values, r[col].values)
num.add_trend_result(f'conus_{col}.trend_2005_2025', res, units='degF/decade', decimals=2, inputs=inputs_nti, description=f'Contiguous US {el} {label} trend 2005–2025')
mean_diff = stats.mean_ci(r[f'diff_{el}'].values)
num.add(f'conus_diff_{el}.mean_2005_2025', mean_diff['mean'], units='degF', decimals=2, kind='delta_temp', ci=(mean_diff['ci_low'], mean_diff['ci_high']), n_eff=mean_diff['n_eff'], inputs=inputs_nti, description=f'Mean USCRN minus ClimDiv {el} anomaly, 2005–2025 (AR(1)-adjusted 95% interval)')
num.save()
print(f"us_ca: {len(num.items)} numbers; California change {num.items['us.california.change_1895_1924_to_1996_2025']['value']} °F")
return 0
if __name__ == '__main__':
raise SystemExit(main())
scripts/process/validate_raw.py379 lines
from __future__ import annotations
import json
import sys
from pathlib import Path
import numpy as np
import pandas as pd
from scripts.lib import readers as R
ROOT = Path(__file__).resolve().parents[2]
RAW = ROOT / 'data' / 'raw'
OUT = ROOT / 'data' / 'validation_printouts.md'
pd.set_option('display.width', 220)
pd.set_option('display.max_columns', 14)
PROBLEMS: list[str] = []
def fence(df: pd.DataFrame, n: int=5) -> list[str]:
return ['First rows:', '```', df.head(n).to_string(index=False), '```', 'Last rows:', '```', df.tail(n).to_string(index=False), '```']
def stamp(row: pd.Series, cols: list[str]) -> str:
parts = []
for col in cols:
value = row[col]
if isinstance(value, pd.Timestamp):
parts.append(value.date().isoformat())
elif isinstance(value, (float, np.floating)) and float(value).is_integer():
parts.append(str(int(value)))
else:
parts.append(str(value))
return '-'.join(parts)
def describe(label: str, table: R.Table, time_cols: list[str], value_cols: list[str], *, show: list[str] | None=None, baseline: tuple | None=None, extra: list[str] | None=None) -> list[str]:
df = table.df
out = [f'## {label}', '', f'- Units (provider/documentation): {table.units}']
for key, value in table.meta.items():
text = value if isinstance(value, str) else json.dumps(value, default=str)
if 0 < len(text) <= 400:
out.append(f'- {key}: {text}')
has = df[value_cols].notna().any(axis=1).to_numpy()
if not has.any():
PROBLEMS.append(f'{label}: no values present')
return out + ['- **No values present**', '']
idx = np.flatnonzero(has)
span = df.iloc[idx[0]:idx[-1] + 1]
out.append(f'- Period of record: {stamp(span.iloc[0], time_cols)} → {stamp(span.iloc[-1], time_cols)} ({len(span)} rows in span; {len(df)} rows in file)')
for col in value_cols:
out.append(f'- Missing `{col}` within span: {int(span[col].isna().sum())}')
if baseline:
col, y0, y1 = baseline
frame = df if 'month' not in df.columns else df.groupby('year', as_index=False)[col].mean()
sel = frame.loc[(frame['year'] >= y0) & (frame['year'] <= y1), col]
out.append(f'- Baseline check: mean of `{col}` over {y0}–{y1} = {sel.mean():+.3f} ({int(sel.notna().sum())} years; about 0 if {y0}–{y1} is the true baseline)')
out.extend(extra or [])
out.extend(fence(df[show] if show else df))
return out + ['']
def guarded(label: str, build) -> list[str]:
try:
return build(label)
except FileNotFoundError as exc:
PROBLEMS.append(f'{label}: NOT AVAILABLE ({exc.filename})')
return [f'## {label}', '', f'**NOT AVAILABLE** — missing file `{exc.filename}`', '']
except Exception as exc:
PROBLEMS.append(f'{label}: PARSE FAILURE ({type(exc).__name__}: {exc})')
return [f'## {label}', '', f'**PARSE FAILURE** — {type(exc).__name__}: {exc}', '']
def trailing_repeats(series: pd.Series) -> int:
values, count = (series.dropna().to_numpy(), 0)
while len(values) > count + 1 and values[-1 - count] == values[-2 - count]:
count += 1
return count
def global_temperature() -> list[str]:
out = ['# Global surface temperature', '']
cag_path = RAW / 'noaa_cag/global_land_ocean_12mo_dec_1850-2025.csv'
out += guarded('NOAAGlobalTemp via Climate at a Glance (global, annual)', lambda l: describe(l, R.cag(cag_path), ['year'], ['value'], baseline=('value', 1901, 2000)))
def v6(label):
table = R.noaa_globaltemp_annual(RAW / 'noaa_globaltemp/aravg.ann.land_ocean.90S.90N.v6.0.0.202512.asc')
merged = table.df.merge(R.cag(cag_path).df, on='year')
diff = merged['anomaly'] - merged['value']
extra = [f'- v6 file minus CAG series: mean {diff.mean():+.3f}, sd {diff.std():.4f} (a constant offset = same data, different baseline; CAG is rounded to 0.01)', f"- All error-variance columns missing: {bool(table.df['total_err_var'].isna().all())}"]
for y0, y1 in [(1991, 2020), (1971, 2000), (1901, 2000)]:
mean = table.df.loc[table.df.year.between(y0, y1), 'anomaly'].mean()
extra.append(f'- mean anomaly {y0}–{y1}: {mean:+.3f}')
return describe(label, table, ['year'], ['anomaly', 'total_err_var'], extra=extra)
out += guarded('NOAAGlobalTemp v6 annual file (error-variance columns)', v6)
out += guarded('HadCRUT5 summary series (global, annual)', lambda l: describe(l, R.hadcrut5_summary(RAW / 'hadcrut5/HadCRUT.5.0.2.0.analysis.summary_series.global.annual.csv'), ['year'], ['anomaly', 'lower95', 'upper95'], baseline=('anomaly', 1961, 1990)))
def ens(label):
table = R.hadcrut5_ensemble(RAW / 'hadcrut5/HadCRUT.5.0.2.0.analysis.ensemble_series.global.annual.csv')
members = [c for c in table.df.columns if c.startswith('Realization')]
table.df['ensemble_mean'] = table.df[members].mean(axis=1)
summary = R.hadcrut5_summary(RAW / 'hadcrut5/HadCRUT.5.0.2.0.analysis.summary_series.global.annual.csv').df
d = table.df.merge(summary, on='year')
extra = [f'- Realizations: {len(members)}', f'- Ensemble mean minus summary anomaly: max |diff| {float((d.ensemble_mean - d.anomaly).abs().max()):.4f}']
return describe(label, table, ['year'], ['ensemble_mean', 'coverage_sigma'], show=['year', 'coverage_fraction', 'coverage_sigma', 'Realization 1', 'Realization 200', 'ensemble_mean'], baseline=('ensemble_mean', 1961, 1990), extra=extra)
out += guarded('HadCRUT5 ensemble series (200 realizations)', ens)
def gis(label):
table = R.gistemp_table(RAW / 'gistemp/GLB.Ts+dSST.csv')
last = table.df.iloc[-1]
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
extra = [f"- Last row {int(last['year'])}: {int(last[months].notna().sum())} of 12 months present; J-D is {('present' if pd.notna(last['J-D']) else 'missing (partial year)')}"]
return describe(label, table, ['year'], ['J-D'], show=['year', 'Jan', 'Jul', 'Dec', 'J-D', 'DJF', 'JJA'], baseline=('J-D', 1951, 1980), extra=extra)
out += guarded('GISTEMP v4 global (GLB.Ts+dSST)', gis)
out += guarded('GISTEMP v4 northern hemisphere (NH.Ts+dSST)', lambda l: describe(l, R.gistemp_table(RAW / 'gistemp/NH.Ts+dSST.csv'), ['year'], ['J-D', 'DJF', 'JJA'], show=['year', 'J-D', 'DJF', 'JJA'], baseline=('J-D', 1951, 1980)))
out += guarded('GISTEMP v4 zonal annual means (ZonAnn)', lambda l: describe(l, R.gistemp_table(RAW / 'gistemp/ZonAnn.Ts+dSST.csv'), ['year'], ['Glob', '64N-90N', '90S-64S'], show=['year', 'Glob', '64N-90N', '24S-24N', '90S-64S'], baseline=('Glob', 1951, 1980)))
def ci(label):
table = R.gistemp_ci(RAW / 'gistemp/totalCI_ERA_v1.2.1.csv')
reps = trailing_repeats(table.df['ci95'])
extra = [f"- Trailing years whose ci95 repeats the previous year's value: {reps} (last distinct year: {int(table.df['year'].iloc[-1 - reps])})"]
glb = R.gistemp_table(RAW / 'gistemp/GLB.Ts+dSST.csv').df
d = table.df.merge(glb[['year', 'J-D']], on='year')
extra.append(f"- CI file `gistemp` minus current GLB J-D: mean {float((d.gistemp - d['J-D']).mean()):+.3f} (older GISTEMP vintage in the CI file)")
return describe(label, table, ['year'], ['gistemp', 'ci95'], extra=extra)
out += guarded('GISTEMP uncertainty v1.2.1 (totalCI_ERA)', ci)
for name in ('Land_and_Ocean_summary', 'Complete_TMAX_summary', 'Complete_TMIN_summary'):
def be(label, name=name):
table = R.berkeley_summary(RAW / f'berkeley/{name}.txt')
cols = [c for c in ('anomaly', 'unc95', 'anomaly_seaice_water') if c in table.df]
return describe(label, table, ['year'], cols, show=['year'] + cols, baseline=('anomaly', 1951, 1980))
out += guarded(f'Berkeley Earth {name}', be)
return out
CAG_FILES = [('California statewide Tavg (annual)', 'noaa_cag/CA_tavg_ann_1895-2025.csv'), ('California statewide Tmax (April–October)', 'noaa_cag/CA_tmax_apr-oct_1895-2025.csv'), ('California statewide precipitation (October–September water year)', 'noaa_cag/CA_pcp_oct-sep_1896-2025.csv'), ('Fresno County Tavg (annual)', 'noaa_cag/CA-019_tavg_ann_1895-2025.csv'), ('Fresno County Tmax (annual)', 'noaa_cag/CA-019_tmax_ann_1895-2025.csv'), ('Fresno County Tmin (annual)', 'noaa_cag/CA-019_tmin_ann_1895-2025.csv'), ('Fresno County cooling degree days (annual)', 'noaa_cag/CA-019_cdd_ann_1895-2025.csv'), ('Fresno County heating degree days (annual)', 'noaa_cag/CA-019_hdd_ann_1895-2025.csv'), ('Ventura County Tavg (annual)', 'noaa_cag/CA-111_tavg_ann_1895-2025.csv'), ('Ventura County Tmax (annual)', 'noaa_cag/CA-111_tmax_ann_1895-2025.csv'), ('Ventura County Tmin (annual)', 'noaa_cag/CA-111_tmin_ann_1895-2025.csv')]
def us_california() -> list[str]:
out = ['# United States and California (nClimGrid)', '']
for label, rel in CAG_FILES:
def build(l, rel=rel):
table = R.cag(RAW / rel)
end_months = sorted(table.df['end_month'].unique().tolist())
return describe(l, table, ['year'], ['value'], extra=[f'- End month(s) of averaging window: {end_months}', f'- 2026 present: {bool((table.df.year == 2026).any())}'])
out += guarded(label, build)
for element in ('tavg', 'tmax', 'tmin'):
def nti(l, element=element):
table = R.nti(RAW / f'noaa_nti/conus_anom_{element}_ann.csv')
both = table.df.dropna()
extra = [f'- Overlap years with both networks: {int(both.year.min())}–{int(both.year.max())} ({len(both)})', f'- USCRN minus ClimDiv over overlap: mean {float((both.uscrn - both.climdiv).mean()):+.3f} °F']
for y0, y1 in ((1991, 2020), (1981, 2010), (1971, 2000)):
mean = table.df.loc[table.df.year.between(y0, y1), 'climdiv'].mean()
extra.append(f'- Alternative baseline check: mean ClimDiv {y0}–{y1} = {mean:+.3f}')
return describe(l, table, ['year'], ['climdiv', 'uscrn'], baseline=('climdiv', 1901, 2000), extra=extra)
out += guarded(f'Contiguous US {element} anomaly: ClimDiv vs USCRN (NCEI National Temperature Index)', nti)
return out
STATIONS = [('USW00093193', "FRESNO YOSEMITE INT'L (primary Fresno station)"), ('USC00046399', 'OJAI (COOP)'), ('USC00049785', 'WOODLAND HILLS PIERCE COLLEGE (COOP)'), ('USW00023136', 'CAMARILLO AP'), ('USR0000CTHS', 'THOUSAND OAKS RAWS'), ('USR0000CSIV', 'SIMI VALLEY RAWS'), ('USC00048904', 'THOUSAND OAKS 1 SW (COOP)')]
def station_block(label: str, sid: str) -> list[str]:
table = R.ncei_daily(RAW / 'ghcnd' / sid)
df = table.df
days = pd.date_range(df.date.min(), df.date.max(), freq='D')
extra = [f'- Calendar days spanned: {len(days)}; days present in file: {len(df)}']
for element, months in (('TMAX', (5, 9)), ('TMIN', (6, 9))):
if element not in df:
continue
series = df.set_index('date')[element].reindex(days)
missing = series.isna()
by_month = missing.groupby([missing.index.year, missing.index.month]).sum()
season = missing[(missing.index.month >= months[0]) & (missing.index.month <= months[1])]
bad = season.groupby(season.index.year).sum()
years_bad = [int(y) for y in bad[bad > 0].index]
extra.append(f'- `{element}`: values {int(series.notna().sum())}; missing days {int(missing.sum())}; months with >3 missing days {int((by_month > 3).sum())} of {len(by_month)}; range {series.min():.0f} to {series.max():.0f} °F')
extra.append(f"- `{element}` years with any missing day in months {months[0]}–{months[1]}: {len(years_bad)} → {years_bad[:30]}{(' …' if len(years_bad) > 30 else '')}")
top, low = (series.nlargest(6), series.nsmallest(3))
extra.append(f'- `{element}` highest: ' + ', '.join((f'{d.date()}={v:.0f}' for d, v in top.items())) + ' | lowest: ' + ', '.join((f'{d.date()}={v:.0f}' for d, v in low.items())))
per_year = series.notna().groupby(series.index.year).sum()
thin = [int(y) for y in per_year[per_year < 330].index]
extra.append(f"- `{element}` years with < 330 daily values: {len(thin)} → {thin[:40]}{(' …' if len(thin) > 40 else '')}")
extra.append(f"- Values removed for failing NCEI QC: {json.dumps(table.meta['qc'])}")
return describe(label, table, ['date'], [c for c in ('TMAX', 'TMIN') if c in df], extra=extra)
def stations() -> list[str]:
out = ['# Station records', '']
for sid, name in STATIONS:
out += guarded(f'GHCN-Daily {sid} — {name}', lambda l, sid=sid: station_block(l, sid))
def threadex(label):
table = R.acis_threadex(RAW / 'acis/threadex_FATthr_daily.json')
present = table.df[table.df.maxt.notna()]
runs = (present.maxt_sid != present.maxt_sid.shift()).cumsum()
segments = present.groupby(runs).agg(sid=('maxt_sid', 'first'), start=('date', 'min'), end=('date', 'max'), n=('date', 'size'))
extra = ['- Contributing station id (per daily value) segments, maxt:']
extra += [f' - `{s.sid}` {s.start.date()} → {s.end.date()} ({s.n} days)' for s in segments.itertuples()][:40]
if len(segments) > 40:
extra.append(f' - … {len(segments) - 40} more segments')
return describe(label, table, ['date'], ['maxt', 'mint'], extra=extra)
out += guarded('ACIS ThreadEx FATthr (Fresno Area) daily', threadex)
def homr(label):
station = R.homr_station(RAW / 'homr/USW00093193_search.json')
lines = [f'## {label}', '']
for key in ('names', 'platforms', 'relocations', 'remarks', 'location'):
value = station.get(key)
lines.append(f'- {key}: {json.dumps(value, default=str)[:1500]}')
return lines + ['']
out += guarded('NCEI HOMR history — USW00093193', homr)
def inventories(label):
lines = [f'## {label}', '']
for name in ('stnmeta_conejo_simi', 'stnmeta_fresno', 'stnmeta_ventura_westla', 'stnmeta_FATthr'):
table = R.acis_stnmeta(RAW / f'acis/{name}.json')
lines += [f'### {name}', '```', table.df.to_string(index=False), '```']
return lines + ['']
out += guarded('ACIS station inventories (StnMeta)', inventories)
for city in ('thousand_oaks', 'simi_valley'):
out += guarded(f'PRISM annual at {city} coordinates (ACIS grid 21)', lambda l, city=city: describe(l, R.acis_grid_annual(RAW / f'acis/prism_{city}_annual_1981-2025.json'), ['year'], ['avgt', 'maxt', 'mint']))
for var in ('tasmax', 'tasmin'):
def livneh(l, city=city, var=var):
table = R.caladapt_events(RAW / f'caladapt/livneh_{var}_year_{city}.json')
meta = json.loads((RAW / 'caladapt/livneh_tasmax_year_series_meta.json').read_text(encoding='utf-8'))
keep = {k: meta[k] for k in meta if k not in ('rasters',)}
return describe(l, table, ['year'], ['value'], extra=[f'- Series metadata (tasmax series, rasters omitted): {json.dumps(keep)[:600]}'])
out += guarded(f'Livneh {var} yearly at {city} coordinates (Cal-Adapt)', livneh)
return out
def greenhouse() -> list[str]:
out = ['# Greenhouse gases, isotopes, oxygen, ice cores', '']
def co2_monthly(label):
path = RAW / 'noaa_gml/co2_mm_mlo.txt'
table = R.gml_text(path, R.CO2_MONTHLY_COLUMNS)
df = table.df
header = [line for line in path.read_text(encoding='utf-8').splitlines() if line.startswith('#')]
hints = [h for h in header if any((k in h.lower() for k in ('maunakea', 'interpol', 'missing', 'ndays', 'scripps')))]
no_obs = df[df.ndays.isna()]
extra = [f"- Months with ndays < 0 (no daily observations; provider value interpolated): {len(no_obs)} (first {int(no_obs.year.min())}-{(int(no_obs.month.min()) if len(no_obs) else '')}, last {(int(no_obs.year.max()) if len(no_obs) else '')})", '- Header lines mentioning Maunakea / interpolation / missing / Scripps:']
extra += [f' > {h[:220]}' for h in hints[:14]]
return describe(label, table, ['year', 'month'], ['average', 'deseasonalized'], show=['year', 'month', 'average', 'deseasonalized', 'ndays', 'unc'], extra=extra)
out += guarded('NOAA GML Mauna Loa CO2 monthly', co2_monthly)
for rel, label in (('co2_annmean_mlo', 'Mauna Loa CO2 annual mean'), ('co2_annmean_gl', 'Global CO2 annual mean'), ('ch4_annmean_gl', 'Global CH4 annual mean'), ('n2o_annmean_gl', 'Global N2O annual mean')):
out += guarded(f'NOAA GML {label}', lambda l, rel=rel: describe(l, R.gml_text(RAW / f'noaa_gml/{rel}.txt', R.ANNUAL_MEAN_COLUMNS), ['year'], ['mean', 'unc']))
out += guarded('NOAA AGGI table', lambda l: describe(l, R.aggi(RAW / 'noaa_gml/AGGI_Table.csv'), ['year'], ['co2', 'total_wm2']))
def scripps(label, rel):
table = R.scripps_monthly(RAW / rel)
df = table.df
measured = df[df.value.notna()]
future = df[(df.decimal_date > measured.decimal_date.max()) & df.fit.notna()]
extra = [f'- Rows after the last measured month that carry only fitted values (never used): {len(future)}', f'- Measured months: {len(measured)}']
notes = [c for c in table.meta['comment_lines'] if any((k in c.lower() for k in ('scale', 'per meg', 'per-mil', 'reference', 'vpdb', 'units')))]
extra += [f' > {c[:200]}' for c in notes[:8]]
table.meta = {}
return describe(label, table, ['year', 'month'], ['value', 'value_sa'], show=['year', 'month', 'decimal_date', 'value', 'value_sa', 'fit'], extra=extra)
for rel, label in (('scripps_co2/monthly_flask_c13_mlo.csv', 'Scripps d13C monthly flask, Mauna Loa'), ('scripps_co2/monthly_flask_c13_spo.csv', 'Scripps d13C monthly flask, South Pole'), ('scripps_o2/monthly_o2_ljo.csv', 'Scripps O2/N2 monthly, La Jolla'), ('scripps_o2/monthly_o2_alt.csv', 'Scripps O2/N2 monthly, Alert'), ('scripps_o2/monthly_o2_cgo.csv', 'Scripps O2/N2 monthly, Cape Grim')):
out += guarded(label, lambda l, rel=rel: scripps(l, rel))
def ice(label):
table = R.ncei_paleo_tab(RAW / 'ncei_paleo/antarctica2015co2composite.txt')
df = table.df
df['year_ce'] = 1950 - df['age_gas_calBP']
extra = [f'- Youngest gas age {df.age_gas_calBP.min():.0f} BP (≈ {1950 - df.age_gas_calBP.min():.0f} CE); oldest {df.age_gas_calBP.max():.0f} BP; samples {len(df)}', f'- CO2 range {df.co2_ppm.min():.1f}–{df.co2_ppm.max():.1f} ppm', f'- Samples dated 1850 CE or later: {int((df.year_ce >= 1850).sum())}; 1958 CE or later: {int((df.year_ce >= 1958).sum())}']
return describe(label, table, ['age_gas_calBP'], ['co2_ppm'], extra=extra)
out += guarded('Antarctic composite ice-core CO2 (Bereiter et al. 2015)', ice)
return out
def ocean_sun_satellite() -> list[str]:
out = ['# Ocean heat, solar irradiance, satellite temperatures', '']
out += guarded('IAPv4.2 ocean heat content (monthly)', lambda l: describe(l, R.iap_ohc(RAW / 'iap/IAPv4.2_OHC_estimate_update.txt'), ['year', 'month'], ['ohc_0_700', 'ohc_0_2000', 'ohc_0_2000_err'], show=['year', 'month', 'ohc_0_700', 'ohc_0_2000', 'ohc_0_2000_err', 'ohc_2000_6000'], baseline=('ohc_0_2000', 2006, 2015)))
out += guarded('LISIRD NRLTSI2 yearly TSI', lambda l: describe(l, R.lisird_tsi(RAW / 'lisird/nrl2_tsi_P1Y.csv'), ['year'], ['tsi', 'unc'], show=['year', 'tsi', 'unc']))
for code in ('lt', 'mt', 'ls'):
out += guarded(f'UAH v6.1 {code.upper()} (monthly)', lambda l, code=code: describe(l, R.uah(RAW / f'uah/uahncdc_{code}_6.1.txt'), ['year', 'month'], ['globe'], show=['year', 'month', 'globe', 'nh', 'sh', 'trpcs', 'nopol', 'sopol'], baseline=('globe', 1991, 2020)))
for code in ('TLT', 'TMT', 'TTT', 'TLS'):
def rss(l, code=code):
table = R.rss(RAW / f'rss/RSS_{code}_Land_and_Ocean_v04_0.txt')
band = table.meta['bands'][0]
annual = table.df.groupby('year')[band].mean()
extra = [f'- Global band used for this channel: `{band}`', f'- mean {band} 1979–1998: {annual.loc[1979:1998].mean():+.3f}; 1991–2020: {annual.loc[1991:2020].mean():+.3f}']
return describe(l, table, ['year', 'month'], [band], show=['year', 'month'] + table.meta['bands'][:4], extra=extra)
out += guarded(f'RSS v4.0 {code} (monthly)', rss)
return out
def sea_level_ice() -> list[str]:
out = ['# Sea level, sea ice, glaciers', '']
for kind in ('annual', 'monthly'):
out += guarded(f'PSMSL San Francisco RLR ({kind})', lambda l, kind=kind: describe(l, R.psmsl_rlr(RAW / f'psmsl/10_{kind}.rlrdata'), ['time'], ['mm']))
def star(label):
table = R.star_gmsl(RAW / 'noaa_star/slr_sla_gbl_free_all_66.csv')
ranges = table.df.groupby('mission')['time'].agg(['min', 'max', 'size'])
extra = [f"- Missions: {ranges.round(2).to_dict('index')}"]
table.meta = {'stated_trend': table.meta.get('stated_trend')}
return describe(label, table, ['time'], ['mm'], extra=extra)
out += guarded('NOAA LSA satellite global mean sea level', star)
def nsidc(label):
table = R.nsidc_extent(RAW / 'nsidc/N_09_extent_v4.0.csv')
sources = table.df.groupby('source_dataset')['year'].agg(['min', 'max']).to_dict('index')
return describe(label, table, ['year'], ['extent', 'area'], extra=[f'- Source datasets by year: {sources}'])
out += guarded('NSIDC Sea Ice Index v4.0, Arctic September', nsidc)
out += guarded('WGMS reference-glacier mass balance', lambda l: describe(l, R.wgms_ref(RAW / 'wgms/mb_ref_2026-02-10.csv'), ['year'], ['mb_mm_we', 'n_glaciers']))
return out
def attribution_models() -> list[str]:
out = ['# Attribution, models, forcing', '']
for rel, label in (('ar6_spm1/panel_b_gmst_changes_model_and_obs.csv', 'AR6 SPM.1 panel b (observed vs simulated)'), ('ar6_spm1/panel_a_SPM1_1-2000_recon.csv', 'AR6 SPM.1 panel a (1-2000 CE reconstruction)'), ('ar6_spm1/panel_a_SPM1_1850-2020_obs.csv', 'AR6 SPM.1 panel a (1850-2020 observations)')):
def badc(l, rel=rel):
table = R.badc_csv(RAW / rel)
first = table.df.columns[0]
table.meta = {'column_units': table.meta['column_units']}
return describe(l, table, [first], list(table.df.columns[1:]), extra=[f'- Columns: {list(table.df.columns)}'])
out += guarded(label, badc)
for name in ('model_obs_time_diffs', 'model_tcr_skill_scores', 'obs_time_trends', 'single_model_trends'):
def om(l, name=name):
table = R.oldmodels_csv(RAW / f'oldmodels/{name}.csv')
return [f'## {l}', '', f'- Shape: {table.df.shape}; columns: {list(table.df.columns)}'] + fence(table.df, 4) + ['']
out += guarded(f'Hausfather et al. 2020 table `{name}`', om)
def igcc(label):
path = RAW / 'igcc/ClimateIndicator-data-v2025.06.11.zip'
table = R.zip_member_csv(path, 'ERF_best_aggregates_1750-2024.csv')
lines = [f'## {label}', '', f"- Member: {table.meta['member']}", f'- Columns: {list(table.df.columns)}', '- metadata.yml:', '```', table.meta['metadata_yml'][:900], '```']
return lines + fence(table.df, 3) + ['']
out += guarded('IGCC 2024 effective radiative forcing aggregates', igcc)
return out
def extremes_fire_snow() -> list[str]:
out = ['# Hurricanes, fire, snowpack', '']
def hrd(label):
table = R.hrd_us_hurricanes(RAW / 'noaa_hrd/All_U.S._Hurricanes.html')
df = table.df
impacts = df[df.max_category >= 1]
by_decade = impacts.groupby(impacts.year // 10 * 10).size().to_dict()
extra = [f"- Lines parsed: {len(df)}; hurricane impacts (category ≥ 1): {len(impacts)}; 'None' years: {int(df.month.isna().sum())}; lines without a category (TS only): {int((df.month.notna() & df.max_category.isna()).sum())}", f'- Impacts by decade: {by_decade}', f'- Flags: {df.flag.value_counts().to_dict()}']
return describe(label, table, ['year'], ['max_category'], extra=extra)
out += guarded('NOAA HRD continental US hurricane impacts', hrd)
def frap(label):
table = R.frap_by_year(RAW / 'calfire_frap/acres_by_year.json')
df = table.df
extra = [f"- Rows without a year: {int(df.year.isna().sum())} ({df.loc[df.year.isna(), 'acres'].sum():.0f} acres)", f'- Years ≥ 1950 with data: {int((df.year >= 1950).sum())}']
named = R.frap_fires(RAW / 'calfire_frap/thomas_woolsey.json').df
extra += ['- Named fires:', '```', named.to_string(index=False), '```']
meta = json.loads((RAW / 'calfire_frap/layer_metadata.json').read_text(encoding='utf-8'))
desc = R.html.unescape(R.re.sub('<[^>]+>', ' ', meta.get('description') or ''))
extra.append(f"- Layer description (provider): {R.re.sub('\\s+', ' ', desc)[:700]}")
return describe(label, R.Table(df.dropna(subset=['year']).astype({'year': int}), table.units), ['year'], ['acres', 'n_fires'], extra=extra)
out += guarded('CAL FIRE FRAP burned area by year', frap)
def cdec(label):
rows = []
stations = {}
for page in sorted((RAW / 'cdec').glob('station_search_*.html')):
for s in R.cdec_station_search(page):
stations[s['id']] = s
for path in sorted((RAW / 'cdec/snow_wc_monthly').glob('*.csv')):
table = R.cdec_monthly(path)
april = table.df[(table.df.nominal.dt.month == 4) & table.df.value.notna()]
recent = april[(april.nominal.dt.year >= 1950) & (april.nominal.dt.year <= 2025)]
meta = stations.get(path.stem, {})
rows.append({'id': path.stem, 'basin': meta.get('basin'), 'elev_ft': meta.get('elev_ft'), 'first_april': int(april.nominal.dt.year.min()) if len(april) else None, 'last_april': int(april.nominal.dt.year.max()) if len(april) else None, 'april_1950_2025': len(recent), 'passes_90pct': len(recent) >= 69, 'units': table.units})
df = pd.DataFrame(rows)
lines = [f'## {label}', '', f'- Stations listed on search pages: {len(stations)}; station files: {len(df)}', f'- Stations with April values in ≥ 90% of 1950–2025 (≥ 69 of 76 years): {int(df.passes_90pct.sum())}', '```', df.to_string(index=False), '```', '']
return lines
out += guarded('CDEC April snow water content, Kings and San Joaquin basins', cdec)
return out
SECTIONS = [global_temperature, us_california, stations, greenhouse, ocean_sun_satellite, sea_level_ice, attribution_models, extremes_fire_snow]
def main() -> int:
if hasattr(sys.stdout, 'reconfigure'):
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
lines = ['# Raw data validation printouts', '', 'Generated by `python -m scripts.process.validate_raw` from `data/raw` (no network). Written findings accompany this table in the repository.', '']
for section in SECTIONS:
lines.extend(section())
lines += ['# Problems found', ''] + ([f'- {p}' for p in PROBLEMS] or ['- none'])
OUT.write_text('\n'.join(lines) + '\n', encoding='utf-8', newline='\n')
print(f'wrote {OUT.relative_to(ROOT)} ({len(lines)} lines); problems: {len(PROBLEMS)}')
for problem in PROBLEMS:
print(' -', problem)
return 0
if __name__ == '__main__':
sys.exit(main())