Open In Colab   Open in Kaggle

Tutorial 2: Reconstructing Past Changes in Ocean Climate#

Week 1, Day 4, Paleoclimate

Content creators: Sloane Garelick

Content reviewers: Yosmely Bermúdez, Dionessa Biton, Katrina Dobson, Maria Gonzalez, Will Gregory, Nahid Hasan, Sherry Mi, Beatriz Cosenza Muralles, Brodie Pearson, Jenna Pearson, Chi Zhang, Ohad Zivan

Content editors: Yosmely Bermúdez, Zahra Khodakaramimaghsoud, Jenna Pearson, Agustina Pesce, Chi Zhang, Ohad Zivan

Production editors: Wesley Banfield, Jenna Pearson, Chi Zhang, Ohad Zivan

Our 2023 Sponsors: NASA TOPS and Google DeepMind

Tutorial Objectives#

In the previous days, you learned about the El Niño–Southern Oscillation (ENSO), and have explored how satellite data can be employed to track this phenomenon during the instrumental period. In this tutorial, you will explore how oxygen isotopes of corals can record changes in temperature associated with the phase of ENSO even further back in time.

By the end of this tutorial you will be able to:

  • Understand the types of marine proxies that are used to reconstruct past climate

  • Create a stacked plot and warming stripe to visualize ENSO temperature reconstructions

An Overview of Isotopes in Paleoclimate#

In this tutorial, and many of the remaining tutorials in this day, you will be looking at data of hydrogen and oxygen isotopes (δD and δ18O). As you learned in the video, isotopes are forms of the same element that contain the same numbers of protons but different numbers of neutrons. The two oxygen isotopes that are most commonly used in paleoclimate are oxygen 16 (16O), which is the which is the “lighter” oxygen isotope, and oxygen 18 (16O), which is the “heavier” oxygen isotope. The two hydrogen isotopes that are most commonly used in paleoclimate are hydrogen (H), which is the “lighter” oxygen isotope, and deuterium (D), which is the “heavier” oxygen isotope.


Credit: NASA Climate Science Investigations


Credit: NASA Climate Science Investigations

Changes in the ratio of the heavy to light isotope can reflect changes in different climate variables, depending on geographic location and the material being measured. The ratio represented in delta notation (δ) and in units of per mille (‰), and is calculated using the equation below (the same applies to the ratio of the heavy and light hydrogen isotopes):


The terminology for discussing δ18O and δD can be a bit confusing and there are multiple ways to reference the same trends in the data. The most common terms used to describe isotopic compositions are “depleted” and “enriched”. These terms refer to the relative amout of the heavy isotopes. Therefore, a “more depleted” isotopic value is more depleted in the heavy isotope (i.e., there is less of the heavy isotope), whereas a “more enriched” isotopic value is more enriched in the heavy isotope (i.e., there is more of the heavy isotope). Other terms that are sometimes used to describe whether isotopes are depleted or enriched are “more negative” or “more positive”. Isotopic values can be both positive and negative, so using “more negative” and “more positive” can be a bit confusing. For example, if we have isotopic values are of -15‰ and -9‰, the value of -9‰ is “more enriched” (i.e., has more of the heavy isotope) or “more positive” (i.e., is closer to zero and positive values) than -15‰. Finally, the terms “smaller” or “larger” isotopic values can also be used to reference isotopes.

Additional information about the use of isotopes in paleoclimate can be found here.


# installations ( uncomment and run this cell ONLY when using google colab or kaggle )

# !pip install cartopy
# !pip install pyleoclim
# imports
import pandas as pd
import numpy as np
import pooch
import os
import tempfile
import cartopy
import pyleoclim as pyleo
import matplotlib.pyplot as plt
import cartopy
import as ccrs
import cartopy.feature as cfeature
from matplotlib import patches

Helper functions#

Hide code cell source
# @title Helper functions

def pooch_load(filelocation=None, filename=None, processor=None):
    shared_location = "/home/jovyan/shared/Data/tutorials/W1D4_Paleoclimate"  # this is different for each day
    user_temp_cache = tempfile.gettempdir()

    if os.path.exists(os.path.join(shared_location, filename)):
        file = os.path.join(shared_location, filename)
        file = pooch.retrieve(
            fname=os.path.join(user_temp_cache, filename),

    return file

Video 1: Ocean Climate Proxies#

Section 2: Plot the Data Using Multiseries#

We will utilize the built in features of a multiseries object to plot our coral proxy data side by side. To create a pyleo.MultipleSeries, we first create a list with our pyleo.Series objects and then pass this into a pyleo.MultipleSeries.

# combine into a list
nino_comparison = [palmyra_stnd, line_stnd]
# create multiseries
nino = pyleo.MultipleSeries(nino_comparison, name="El Nino Comparison")
/tmp/ipykernel_109698/ DeprecationWarning: `name` is a deprecated property, which will be removed in future releases. Please use `label` instead.
  nino = pyleo.MultipleSeries(nino_comparison, name="El Nino Comparison")
# plot the time series of both datasets
fig, ax = nino.stackplot(time_unit="year", xlim=[1960, 2000], colors=["b", "g"])

Questions 2: Climate Connection#

Recall that as SST becomes colder, δ18O becomes more positive, and vice versa. Compare the figure below of the ONI to the time series of coral δ18O you plotted above and answer the questions below.

Credit: UCAR

  1. Do the ENSO events recorded by the ONI agree with the coral data?

  2. What are some considerations you can think of when comparing proxies such as this to the ONI?

Click for solution

Section 1.3: Make Warming Stripes Plot#

We can also make a warming stripe for this data Series using the .stripes() method, where darker red stripes indicate a warmer eastern Pacific and possibly an El Niño phase, and darker blue stripes indicate a cooler eastern Pacific and possibly La Niña phase. Can you see the trend present in the data?

fig, ax = nino.stripes(
    ref_period=(1960, 1990), time_unit="year", show_xaxis=True, cmap="RdBu"


In this tutorial, we discovered how oxygen isotopes within corals serve as a valuable archive, recording changes in temperature associated with ENSO phases.

During our explorations,

  • We ventured into the study of proxy-based coral δ18O records, gaining insights into the rich historical climate data encapsulated within these marine structures.

  • We compared these records to noted ENSO events over a few decades, offering us a glimpse into the dynamic nature of this influential climate phenomenon.


Code for this tutorial is based on existing notebooks from LinkedEarth that uses the Pyleoclim package to assess variability in the El Nino.

Data from the following sources are used in this tutorial: