My path…..
1997
M.S. UCSD
1995
B.S. MIT
1998
RSS
2003
U.Miami
2016
ESR
2020
Farallon
2007
PhD U.Miami
2022
NASA
2024
ICSI
My path…..
2012 NASEM CESAS
2013 AGU Falkenberg Award
2016 JPL Mission Invite
2017 NASEM Co-chair OSS policy for NASA
2018 Co-chair NASEM CESAS
2019 Testified House Committee
2021
2022 NASA HQ
$190M Butterfly Mission
NOAA SAB
2025 AGU Open Science Prize
Video credit: NASA SVS
Video credit: NASA SVS
What does the data say about our climate?
Keeling Curve
https://pubs.acs.org/doi/10.1021/ac1001492
Video credit: NASA SVS
Calculating the Greenhouse Effect
Goal 1: Calculate how the temperature is changing with increasing CO2.
The Planetary energy balance:
Energy (from the Sun) absorbed = Energy emitted
How does CO2 affects this?
Calculate energy in
Energy in equals the incoming sunlight (W/m2) multiplied by the area (m2) to get W
NASA illustrations by Robert Simmon
= Incoming sunlight x area
r
Some of the energy in is reflected by the atmosphere
NASA illustrations by Robert Simmon
r
Albedo = the fraction of radiation reflected back to space by the atmosphere
The amount that gets through:
Reflective surface
Calculate Energy out
B) The Earth emits blackbody radiation
Energy out equals the emitted radiation (W/m2) multiplied by the area (m2) to get W
NASA illustrations by Robert Simmon
= Outgoing radiation x area
r
The equation was actually a data science problem! 1864, John Tyndall measured the color and infrared emission of a platinum filament. Josef Stefan related the emission to the temperature to the fourth. Boltzmann then derived the theoretical model.
Energy in = Energy out
Goal 1: Calculate how the temperature is changing with increasing CO2
NASA illustrations by Robert Simmon
Reflective surface
Planetary energy balance
Calculating temperature
Goal 1: Calculate how the temperature is changing with increasing CO2
What is the Earth’s temperature?
~255 K
~-16 C
~1 F
Our atmosphere is like a blanket
without an atmosphere
Planetary energy balance
with an atmosphere
Calculating the Temperature dependence on CO2
Goal 1: Calculate how the temperature is changing with increasing CO2
CO2 is ~380ppm (parts per million)
As CO2 increases what happens to the temperature?
Plot the results
Use the equation to calculate the increase in temperature with time due to the increase in CO2
Global warming is a climate crisis
The equation provides solutions to global warming:
Change the planetary albedo to reflect more radiation to space (increase aerosols, clouds, make surface more reflective)
Reduce greenhouse gases (CO2, Methane)
Sun-shades in space?
Changing by Alisa Singer
"As we witness our planet transforming around us we watch, listen, measure … respond."
www.environmentalgraphiti.org – 2021 Alisa Singer.
AR6 Climate Change 2021:
The Physical Science Basis
Image credit: NOAA
With every increment of global warming, changes get larger
https://www.ipcc.ch/report/ar6/wg1/#FullReport
… in precipitation
https://www.ipcc.ch/report/ar6/wg1/#FullReport
CC-relationship water vapor - temperature - pressure : 6% per 1C https://www.jbarisk.com/news-blogs/the-physics-of-precipitation-in-a-warming-climate/
Our trajectory from data and models
https://raw.githubusercontent.com/BrodiePearson/IPCC_AR6_Chapter9_Figures/main/Plotting_code_and_data/Fig9_03_SST/Fig9_03_SST.png
our mean is shifting, what we consider normal is shifting
Extremes are the new normal
Extremes are the new normal
A decade ago - scientists would argue - we can’t attribute any single weather event to climate.
In the last decade, we have all experienced major shifts in our climate through changes in our local weather and scientists have figured out ‘climate event attribution’
They look at the probability of the occurrence of an event (eg. a temperature extreme) in models run without human-influence and then compare it to the probability in models run with human-influence.
How?
https://www.nature.com/articles/d41586-021-01142-4
https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2021GL092765
Extremes are the new normal
The probability of an event changes
https://www.nature.com/articles/s41467-019-09729-2/figures/1
Model runs with all forcings
Model runs with only natural
How likely is it that there will be a 2 degree anomaly?
Positive Feedbacks in the Climate System
Goal: Positive feedbacks in the climate system
The Earth is a system - a complicated game of dominos
As air temperature increases, sea ice concentration decreases…..
Goal: Arctic Amplification: a positive feedback
A positive feedback amplifies the initial perturbation
Albedo feedback:
reflectivity!
Goal: Arctic Amplification: a positive feedback
A positive feedback amplifies the initial perturbation
Cloud feedback:
Can we look at this ourselves? --- this is global data --- 3D data
….. Latitude, longitude, and time…. How do we handle that?
https://www.nature.com/articles/s41467-019-09729-2/figures/1
Model runs with all forcings
Model runs with only natural
How likely is it that there will be a 2 degree anomaly?
BREAK
Learning objective: climate data analysis
ERA5 - 5th gen ECMWF atmospheric global climate ReAnalyses
An ECMWF snow depth analysis for Scandinavia using ERA5 data shows the highest levels in a decade.
Vast amount of data
Data Frames are not enough: not all data is tabular
Xarray
Xarray introduces labels in the form of dimensions, coordinates and attributes on top of raw NumPy-like multidimensional arrays, which allows for a more intuitive, more concise, and less error-prone developer experience.
‘data variables’ : temperature and precipitation “data variables”
‘coordinate variables’: they label the points along the dimensions.
Xarray: Dataset
ERA5
Xarray Datasets are essentially groups of DataArrays.
This is really valuable when you are looking at datasets that have multidimensional groups of data, for example, temperature, precipitation, cloud cover.
Some Xarray methods can be applied to all that Dataset contains.
For example, you can subset a Dataset and the subset, interpolate, calculate a mean, and it will do this across all the DataArrays the Dataset contains.
Xarray read in a Dataset
import xarray as xr
ds = xr.open_dataset('./../data/era5_monthly_2deg_aws_v20210920.nc')
ds
Explore the data
Xarray allows you easily explore the data
Look at data attributes
Coordinates versus dimensions
Text from Xarray docs http://xarray.pydata.org/en/stable/user-guide/data-structures.html
DataArray are data variables in a Dataset
ds["air_temperature_at_2_metres"]
ds.air_temperature_at_2_metres
Text from Xarray docs http://xarray.pydata.org/en/stable/user-guide/data-structures.html
Review: DataFrame access: [], loc, iloc
iloc: integer/positional
loc: Labels
[]: flexible, confusing?
[]
List
[]
Numeric Slice
[]
Name
DataFrame
DataFrame
Series
Single Column Selection
Multiple Column Selection
(Multiple) Row Selection
New: DataArray access: [], sel, isel
isel: integer/positional
sel: coordinates
[]: flexible, confusing?
point = ds.isel(time=0,
latitude=26,
longitude=119)
point = ds.air_temperature_at_2_metres[0,26,119]
point = ds.sel(time="1979-01",
latitude=37.125,
longitude=238.875)
Find data at a point or in a region:
sel: coordinates
point = ds.sel(time="1979-01",
latitude=37.125,
longitude=238.875)
region = ds.sel(time="1979-01",
latitude=slice(30,40),
longitude=slice(230,250))
Xarray helps you understand your code.
Xarray has all sort of high-level cool tricks built in
Select data and plot data in one line (using matplotlib)
ds.air_temperature_at_2_metres.sel(time="1979-01").plot()
ds.air_temperature_at_2_metres.sel(
latitude=37.125,
longitude=238.875).plot()
Select a variable
Select coordinate
Apply a method()
Select a variable
Select coordinate
Apply a method()
Methods can be called across a DataArray or a Dataset -- LAZY
Select data and plot data in one line (using matplotlib)
Same thing, but across all variables
ds.air_temperature_at_2_metres.mean("time").plot()
mean_map = ds.mean("time")
mean_map.air_temperature_at_2_metres.plot()
Select a variable
Apply a method() across a coordinate
Apply a method()
Lazy
Plot the global trend in a variable
Goal: Calculate time series
Xarray has high level methods like .mean(), .std(), etc.
ave = ds.mean("time")
ave.air_temperature_at_2_metres.plot()
Take the mean across all time
ave = ds.mean(("latitude", "longitude"))
ave.air_temperature_at_2_metres.plot()
Take the mean across all locations
Does that look right?
Goal: Understand what .mean() does
With great power comes great responsibility
ave = ds.mean()
ave
Does that look right?
Take the mean across all coordinates
The map is flat - but the Earth is not - Gaussian grid
Programs aren’t smart - you are - so what went wrong?
Gridded data is nice to work with but what does it represent?
How many grid points are at 90N (the North Pole)?
How many grid points are at the Equator?
Weight your data
Xarray provides the ability to weight your data
weights = np.cos(np.deg2rad(ds.latitude))
weights.name = "weights"
weights.plot()
Goal: Examine average values - weighted version
Xarray methods like .weighted() can be combined with .mean()
ds_weighted = ds.weighted(weights)
weighted_mean = ds_weighted.mean()
weighted_mean
Does that look right?
Goal: Weighted global time series data
You can create means across coordinates: eg. latitude and longitude
ds_weighted = ds.weighted(weights)
weighted_mean = ds_weighted.mean(("latitude", "longitude"))
weighted_mean.air_temperature_at_2_metres.plot()
Take out the annual cycle using .groupby()
Use .groupby on a coordinate
Goal: Calculate annual cycle
Can use .groupby & .mean
annual_cycle = weighted_mean.groupby("time.month").mean()
annual_cycle.air_temperature_at_2_metres.plot()
Put it all together and plot the trend
Can use .groupby & .mean
weighted_mean = ds_weighted.mean(("latitude", "longitude")) #weighted mean time series
annual_cycle = weighted_mean.groupby("time.month").mean() #calculate annual cycle
annual_cycle += annual_cycle.mean() #add back in the mean value
weighted_trend = weighted_mean.groupby("time.month") - annual_cycle
weighted_mean.air_temperature_at_2_metres.plot()
weighted_trend.air_temperature_at_2_metres.plot()
Goal: Are extremes more likely? PDF analysis.
xr.plot.hist(darray,
bins=bin_array,
density=True,
alpha=.9,
color="b",
)
ERA5 temperature PDFs
bins = np.arange(284, 291)
xr.plot.hist(
weighted_mean.air_temperature_at_2_metres.sel(time=slice("1980","2000")),
bins=bins,
density=True,
alpha=.9,
color="b",
)
xr.plot.hist(
weighted_mean.air_temperature_at_2_metres.sel(time=slice("2000","2020")),
bins=bins,
density=True,
alpha=.85,
color="r",
)
plt.ylabel("Probability Density (/K)")
Goal: Can we plot the trend with our ERA5 data?
pfit = ds.air_temperature_at_2_metres.polyfit("time", 1)
pfit.polyfit_coefficients[0] *= 3.154000000101e+16
pfit.polyfit_coefficients[0].plot(cbar_kwargs={"label":"trend deg/yr"})
Goal: How about all fancy on a globe?
import cartopy.crs as ccrs
p = pfit.polyfit_coefficients[0].plot(
subplot_kws=dict(projection=ccrs.Orthographic(0, 55), facecolor="gray"),
transform=ccrs.PlateCarree(central_longitude=0),
cbar_kwargs={"label": "trend deg/yr"},
)
p.axes.coastlines()
Goal: Positive feedbacks in the climate system
The Earth is a system - a complicated game of dominos
As air temperature increases, sea ice concentration decreases…..
Satellite SSTs along the west coast of the US during the 2014-2016 northeast Pacific marine heat wave
Research supported by NASA Physical Oceanography, NASA Ocean Vector Winds Science Team, and NASA JPL
Image Credit: NASA JPL: C. Thompson & J. Hall
Air-Sea & Sea-Air
(Bond, 2015)
Reduced mixing
Reduced Ekman transport (wind driven currents)
Ridiculously Resilient Ridge (RRR)
Timeseries of SST
SST Anomaly (K)
Timeseries shown for Blob region, including all monthly data and EOF reconstruction. Data is smoothed.
HadiSST v2 data does not use EOF in it’s construction
Recent data uses AVHRR SSTs, prior to satellite data all in situ obs
More info: http://www.metoffice.gov.uk/hadobs/hadisst/
Photo by Paul Nicklen from the National Geographic, “The Blob that cooked the Pacific” full article at http://www.nationalgeographic.com/magazine/2016/09/warm-water-pacific-coast-algae-nino/
“Number of Starving Sea Lions in California 'Unprecedented‘” Nat. Geo. 2015
“California’s commercial Dungeness crab season to stay closed” SF Chronicle 2016
“Guadalupe fur seals UME 2015” - NOAA
“2015 Large Whale UME in the Western Gulf of Alaska” - NOAA
“California's New Era of Heat Destroys All Previous Records” Bloomberg 2015
“Shellfish harvest closures ordered along Oregon coast due to marine toxins” Daily Astorian 2015
“Cassin’s Auklet 2014 UME” - Henkel, et al. 2015
“Common Murre 2015 UME” - http://beachwatch.farallones.org/
SST and fuel for fishes
The Pacific Decadal Oscillation (upper), and northern copepod biomass anomalies (lower), from 1969 to present. Biomass values are log base-10 in units of mg carbon m–3.
Figure from: https://www.nwfsc.noaa.gov/research/divisions/fe/estuarine/oeip/eb-copepod-anomalies.cfm#NSC-01
The northern copepod biomass is an index of the amount of energy transferred up the food chain. These fatty compounds appear to be essential for many pelagic fishes if they are to grow and survive through the winter successfully
High Resolution SSTs
Image Credit: NASA JPL: C. Thompson & J. Hall
High temporal/spatial
Image Credit: NASA JPL: C. Thompson & J. Hall
Results
Brief periods of ‘normal’ SSTs
Alongshore warming
SSTs 2014-2016
Figure 3. Time series of daily SSTs, smoothed with a 30-day running mean, in the northern (left column) and southern (right column) parts of the CCUS. (a, e) SST 1000 km offshore. (b, f) SST 1 km. In each panel, light grey indicates the envelope of maximum and minimum values during 2002-2013; dark grey indicates the envelope of +/- 1 SD around the mean during 2002-2013; and the black, blue, red, and green lines indicate the mean during 2002–2013 and the values during 2014, 2015, and 2016, respectively. To emphasize anomalies >1 SD from the mean, the data are plotted so that the yearly lines are obscured when within 1 SD of the mean.
Coastal SSTs / winds
Results
Data: JPL MUR v4 global, daily, 1km multi-scale ultra-high resolution motion-compensated analysis; PMEL Bakun upwelling index, ECMWF ERA-interim 10 m wind
Jim Edson provided his MATLAB code for the COARE 3.5 drag coefficient
Funding: NASA Physical Oceanography, Ocean Vector Winds Science Team, JPL
Charles Thompson, JPL, provided Blue Marble SST image for May 2015
Thanks to:
Gentemann, C. L., M. R. Fewings, and M. García-Reyes (2016), Satellite sea surface temperatures along the West Coast of the United States during the 2014–2016 northeast Pacific marine heat wave, Geophys. Res. Lett., 43, doi:10.1002/2016GL071039.
Winners and Losers: biological impacts
Figure from Cavole, L. M., et al. (2016). "Biological Impacts of the 2013–2015 Warm-Water Anomaly in the Northeast Pacific: Winners, Losers, and the Future." Oceanography 29.
What is the future?
Climate change predicts overall increase in stratification and warming of the Pacific…
Increase in HABs
Changes to species distributions
Image Credit: NASA JPL: C. Thompson & J. Hall
What does the ocean look like now?
What does the ocean look like now?
Biological Pump
Models and data tell us about our weather and climate
I’m just an oceanographer
First: find the Maono
Read in a CSV file
Goal 1: Calculate how the temperature is changing with increasing CO2 by using actual CO2 data collected at Mauna Loa. Original (uncleaned) data is here.
file = "./data_d100/monthly_in_situ_co2_mlo_cleaned.csv"
data = pd.read_csv(file)
data.head()
SUGGEST this slide &* next 2 move to end ? do in lab?
Plot the CO2 timeseries
What is going on? Why are their drops in the data?
import matplotlib.pyplot as plt
plt.plot(data["fraction_date"], data["c02"])
Read in a CSV file
file = "./data/monthly_in_situ_co2_mlo_cleaned.csv"
data = pd.read_csv(file,na_values=-99.99)
plt.plot(data["fraction_date"], data["c02"])
Goal: Understand real data is often a hot mess
file = "./data/monthly_in_situ_co2_mlo.csv"
A lot of text describing how to cite the data at the top of the csv file
Even more text
Oh wait! Here is some data, but the column labels are split across multiple rows????
Goal: Recognize your real friends who are always there for you
Goal: Try to use the original data - you will want that citation info when you decide to publish results
Arguments
Filepath
header='infer'
names=<no_default>
skiprows=None
na_values=None
How do you calculate probability of event occurrence?
A histogram tells you how many times a particular value occurred in your dataset.
import numpy as np
plt.hist(data["c02"], bins=np.arange(310, 360, 1))
plt.ylabel("Occurrence (#)"), plt.xlabel("C02 (ppm)")
How do you calculate probability of event occurrence?
A probability density function (PDF) tells you the probability of a particular value occurred in your dataset.
plt.hist(data["c02"], bins=np.arange(310, 360, 1), density=True)
plt.ylabel("Probability (1/ppm)"), plt.xlabel("C02 (ppm)")
Extremes are the new normal
A decade ago - scientists would argue - we can’t attribute any single weather event to climate.
In the last decade, we have all experienced major shifts in our climate through changes in our local weather and scientists have figured out ‘climate event attribution’
Probability of 340 ppm?
Probability of 340 ppm?