HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Earth Data with Python: Trends, Anomalies and Models
  1. 1Time series, trends and the seasonal cycle
  2. 2Anomalies, baselines and uncertainty
  3. 3Simple models of Earth data
  1. Earth and Environmental Science
  2. /Earth Data with Python: Trends, Anomalies and Models
  3. /Anomalies, baselines and uncertainty

Course 12.3·Lesson 2 of 3

Anomalies, baselines and uncertainty

An anomaly is a value minus the mean of a baseline for the same place and month. A different baseline shifts all anomalies by one constant and leaves the trend unchanged. A trend has a standard error s/Sxxs/\sqrt{S_{xx}}s/Sxx​​

Lesson 2 of 3Show all lessonsHide
Earth Data with Python: Trends, Anomalies and Models
  1. 1Time series, trends and the seasonal cycle
  2. 2Anomalies, baselines and uncertainty
  3. 3Simple models of Earth data

Try the code and the simulations beside the lesson.

Why anomalies?

A hill station and a coastal town can differ by 10 ∘C10\ ^\circ\text{C}10 ∘C every day of the year. If we want to know whether the climate of both places is warming, we do not need the difference. We need to know how each place changes against its own usual level. That change is an anomaly.

anomaly=value−baseline mean\displaystyle \text{anomaly} = \text{value} - \text{baseline mean}anomaly=value−baseline mean

The baseline is the mean of the same quantity, for the same place and the same calendar month, over a fixed set of years. Taking each month against its own baseline removes the seasonal cycle too.

Anomalies have a second use. A hill station and a coastal town near it have different absolute temperatures, but their anomalies agree closely. So a few stations can describe a wide area.

Baselines

A baseline is a choice. Different groups use different ones.

RecordBaseline years
NASA GISS1951 to 1980
HadCRUT51961 to 1990
Copernicus ERA51991 to 2020
IPCC change since1850 to 1900

The World Meteorological Organization now uses the thirty years 199119911991 to 202020202020 for the current climate normal, and keeps 196119611961 to 199019901990 as the reference for climate change. A change of baseline adds one constant to every anomaly. It moves the zero line. It does not change the trend, nor the shape of the curve. So to compare two records, put them on the same baseline first.

A bar chart of the yearly temperature anomalies of a station for 2001 to 2020, in degrees Celsius from minus 0.3 to plus 0.65 up the side. Bars below zero are blue and bars above zero are red. The first years are small and mixed, with blue bars in 2001, 2002, 2003, 2006 and 2012, and the last years are mostly large red bars, the highest near 0.63 in 2020. A dark line is the five-year running mean, which rises from about minus 0.06 to about 0.43. An orange dashed line is the trend, 0.32 degrees Celsius per decade, with a pale orange band round it for twice its standard error.

Standardised anomalies

An anomaly of 1 ∘C1\ ^\circ\text{C}1 ∘C means little in a place where the temperature varies by 3 ∘C3\ ^\circ\text{C}3 ∘C from year to year, and a great deal where it varies by 0.5 ∘C0.5\ ^\circ\text{C}0.5 ∘C. The standardised anomaly divides by the standard deviation σ\sigmaσ of the baseline:

z=x−μσ\displaystyle z = \dfrac{x - \mu}{\sigma}z=σx−μ​

A value of zzz above 222 is rare, with about 2.3 %2.3\ \%2.3 % of baseline values above it if they follow the normal curve. Rainfall droughts are measured in the same way. The standardised precipitation index is a zzz score of the rainfall of a period. A value of −1-1−1 is dry and −2-2−2 is extremely dry. The Oceanic Niño Index is the anomaly of the sea surface temperature of the Niño 3.4 region, 5∘5^\circ5∘ N to 5∘5^\circ5∘ S and 120∘120^\circ120∘ to 170∘170^\circ170∘ W. A value of +0.5 ∘C+0.5\ ^\circ\text{C}+0.5 ∘C or more, for five seasons in a row, marks an El Niño.

Averaging over the globe

To find a global mean from stations or grid cells, we weight each by the area that it stands for. Cells of equal longitude and latitude are smaller towards the poles. The area of a band between two latitudes is proportional to sin⁡φ2−sin⁡φ1\sin\varphi_2 - \sin\varphi_1sinφ2​−sinφ1​. A common shortcut is the weight cos⁡φ\cos\varphicosφ at the centre of each narrow band. If the poles are sparsely measured, an average without weights gives them too large a say.

The uncertainty of a trend

The slope bbb found from a record is a sample. A different set of years would give a different slope. Its standard error is

s=SSEn−2\displaystyle s = \sqrt{\dfrac{\text{SSE}}{n - 2}}s=n−2SSE​​
SE(b)=sSxx\displaystyle \text{SE}(b) = \dfrac{s}{\sqrt{S_{xx}}}SE(b)=Sxx​​s​

The scatter sss uses n−2n - 2n−2 because two numbers, aaa and bbb, were fitted. Roughly, the true trend lies within b±2 SEb \pm 2\,\text{SE}b±2SE with 95 %95\ \%95 % confidence. The exact factor is the ttt value for n−2n - 2n−2 degrees of freedom, for instance 2.3062.3062.306 for 888 degrees. For years one apart, Sxx=n(n2−1)/12S_{xx} = n(n^2 - 1)/12Sxx​=n(n2−1)/12. It grows as n3n^3n3, so the standard error falls fast as the record grows. Doubling the record shortens the interval by a factor of nearly 2.82.82.8.

There is a second problem. In a climate record, one warm year tends to be followed by another. This is autocorrelation. The lag-1 value r1r_1r1​ of the residuals eie_iei​ of a least-squares line, which have a mean of zero, is

r1=∑ei ei+1∑ei2\displaystyle r_1 = \dfrac{\sum e_i\,e_{i+1}}{\sum e_i^2}r1​=∑ei2​∑ei​ei+1​​

If r1r_1r1​ is positive, neighbouring years carry less than their share of fresh information. A common rule replaces the number of years by the effective sample size,

neff=n 1−r11+r1\displaystyle n_{\text{eff}} = n\,\dfrac{1 - r_1}{1 + r_1}neff​=n1+r1​1−r1​​

and the standard error grows by the factor n/neff\sqrt{n/n_{\text{eff}}}n/neff​​. Ignoring this makes trends look more certain than they are.

Worked example: a dry June

The June rainfall at a station was 164 mm164\ \text{mm}164 mm. Over the baseline its mean is 190 mm190\ \text{mm}190 mm with a standard deviation of 52 mm52\ \text{mm}52 mm. Describe the month.

  1. The anomaly. 164−190=−26 mm164 - 190 = -26\ \text{mm}164−190=−26 mm.
  2. The percent of normal. 164/190=86.3 %164/190 = 86.3\ \%164/190=86.3 %.
  3. The standardised anomaly. z=−26/52=−0.5z = -26/52 = -0.5z=−26/52=−0.5.
  4. The meaning. A zzz of −0.5-0.5−0.5 is only a little dry. About 31 %31\ \%31 % of Junes are drier. The month is not a drought.
  5. Check. The anomaly is 14 %14\ \%14 % below normal, yet zzz is small, because the rainfall of this station varies a lot from year to year.

Keep the scatter at 0.12 ∘C0.12\ ^\circ\text{C}0.12 ∘C and a trend of 0.2 ∘C0.2\ ^\circ\text{C}0.2 ∘C per decade. How many years are needed for the range to leave zero? Now double the scatter. How does that number change?

Practise with new numbers

Try it in Python

The program works out the baseline of a station, its anomalies, a running mean and the trend with its uncertainty.

Predict first. Is the trend larger than its uncertainty? Then run it. Check with Show the answer.

1. Change the baseline to the first four years, temps[:4], and divide by 4. Which numbers change, and which stay the same?

2. Add a value 23.1 at the end of temps, and the year 2021. What happens to the trend and its range?

Common mistakes

  • Comparing anomalies of two records with different baselines. Put both on one baseline first.
  • Averaging latitude bands without area weights. Polar bands are small.
  • Reading a trend without its uncertainty. A short record can give a large slope by chance.
  • Treating neighbouring years as independent. Autocorrelation widens the true range.

Remember these

  • Anomaly === value −-− baseline mean. A new baseline shifts anomalies but not the trend.
  • z=(x−μ)/σz = (x - \mu)/\sigmaz=(x−μ)/σ.
  • SE(b)=s/Sxx\text{SE}(b) = s/\sqrt{S_{xx}}SE(b)=s/Sxx​​, with s=SSE/(n−2)s = \sqrt{\text{SSE}/(n - 2)}s=SSE/(n−2)​. A range of ±2 SE\pm 2\,\text{SE}±2SE is about 95 %95\ \%95 %.
  • neff=n(1−r1)/(1+r1)n_{\text{eff}} = n(1 - r_1)/(1 + r_1)neff​=n(1−r1​)/(1+r1​).

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. A month had a mean temperature of 31.6 ∘C31.6\ ^\circ\text{C}31.6 ∘C. The baseline mean is 30.2 ∘C30.2\ ^\circ\text{C}30.2 ∘C and σ=0.7 ∘C\sigma = 0.7\ ^\circ\text{C}σ=0.7 ∘C. What is its zzz?
  1. A record is moved from the baseline 195119511951 to 198019801980 to the baseline 199119911991 to 202020202020. The mean of the new baseline is 0.6 ∘C0.6\ ^\circ\text{C}0.6 ∘C higher. What happens to every anomaly?
  1. The effective sample size of a record is much smaller than the number of years. What does that say about the neighbouring years?
  1. A trend is 0.20 ∘C0.20\ ^\circ\text{C}0.20 ∘C per decade with a standard error of 0.120.120.12. Is it clearly different from zero?

References

  • WMO, WMO Guidelines on the Calculation of Climate Normals (WMO-No. 1203, 2017).
  • D. S. Wilks, Statistical Methods in the Atmospheric Sciences (4th edition, Elsevier, 2019), the sections on anomalies and on trend uncertainty.
  • B. D. Santer and others, Statistical significance of trends and trend differences in layer-average atmospheric temperature time series, Journal of Geophysical Research 105 (2000), pages 7337 to 7356, for the effective sample size.
  • IPCC, Climate Change 2021: The Physical Science Basis, Chapter 2, for the baselines of the global temperature records.

Enroll free in Earth Data with Python: Trends, Anomalies and Models

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

The mean temperature of June at a city, in degrees Celsius, was as follows…Hard · High School (11–12) · by StemPy Lab
A temperature anomaly is known for six bands of latitude…Advanced · High School (11–12) · by StemPy Lab
The yearly global temperature anomalies of a ten-year period, in °C, are: 0.56, 0.61, 0.59, 0.54…Advanced · High School (11–12) · by StemPy Lab
Next: lesson 3Simple models of Earth data
← Earth Data with Python: Trends, Anomalies and Models
← Time series, trends and the seasonal cycleSimple models of Earth data →

Discussion (0)

Log in to join the discussion.

Loading…

, and the noise of neighbouring years, called autocorrelation, makes the true error larger.
about 35 min1 simulation2 practice questions1 Python program5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Python Labs (1)

Anomalies, a running mean and a trendPython Lab · by StemPy Lab