Data Driven Modeling for Climate/Weather Research
Will Chapman
Climate and Global Dynamics Lab
NSF - National Center for Atmospheric Research
Dec. 09, 2024
Who am I?
Will Chapman - Project Scientist at NCAR in the Climate and Global Dynamics Lab (AMP / CAM)
Background:
Email: wchapman@ucar.edu
Website: willychap.github.io
Github: https://github.com/WillyChap
*concurrent
What I work on:
Currently:
Previously:
2
“Introduce the DCMIP participants to basic Machine Learning ideas and how machine learning is used in atmospheric science and modeling (e.g.: for post processing, in hybrid physics-ML models, full emulators, for process understanding, etc). Basically, this should be a high-level overview that should introduce various ML techniques, terminology, ML workflows, and applications.”
What am I talking about for the next hour:
3
Quick Poll
What is Machine Learning?
What is Machine Learning?
Machine Learning: Any optimized/optimizable statistical linking function that maps an input space to a desired (or targeted) output.
Input Vector (x)
Output Vector (y)
Input Vector (x)
Output Vector (y)
Some Function
Input Vector (x)
Output Vector (y)
Input Vector (x)
Output Vector (y)
Input Vector (x)
Output Vector (y)
Input Vector (x)
Output Vector (y)
*garbage
Input Vector (x)
Output Vector (y)
Input Vector (x)
Output Vector (y)
Input Vector (x)
Output Vector (y)
GOAL:
Input Vector (x)
Output Vector (y)
How?:
How?:
Input Vector (x)
Output Vector (y)
How?:
*less garbage
AI, Machine Learning, Deep Learning
Linear regression
Decision Tree
Neural Network
Chatbots
ARTIFICIAL INTELLIGENCE
Programs with the ability to mimic human intelligence
MACHINE LEARNING
Any optimized/optimizable statistical linking function that maps an input space to a desired (or targeted) output.
DEEP LEARNING
Artificial Neural Networks
(Machine learning on steroids)
Explosion of Machine Learning in Atm./Ocean Science
Fig. 4.
Number of AI presentations at the AMS AI conferences through time including a large increase starting in 2018. Non-AI-focused presentations are not included. The 2021 conference was impacted by the COVID-19 pandemic.
This interest in DL for ES problems that skyrocketed in the mid-2010s led to the AI Conference hosting dedicated DL sessions that covered the wide variety of applications where it has been applied. One remarkable aspect of DL adoption is how quickly some highly complex methods were widely adopted across the research community after being introduced the previous year.
For a continuous medium consisting of an ideal gas, (or mixture of ideal gases) these equations are derived from first principles and are certain
Fundamental set of equations:
Quick Primer on Traditional Prediction of Weather / Climate
How Large of a Box?
‘Dynamics’ Step
‘Physics’ Step
time 1
time 2
~fluid flow + thermo
~subgrid scales
Practically, how is this done?
State of the Art Climate Model (NCAR’s CAM6):
Challenges:
Practically, how is this done?
Challenges:
1.
2.
3/4.
Why is ML well posed to address these challenges?
Nonlinear Mappings
https://www.stefanmesken.info/machine%20learning/tensorflow-without-tears/
Challenges:
Why is ML well posed to address these challenges?
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
25
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
26
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
27
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
28
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
29
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
30
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
EXCITING!!!!
EXCITING!!!!
EXCITING!!!!
Old & Boring!!!
31
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
🤠Wild-West🐴
🤠Wild-West🐴
👨🏼🔬Rigorous👩🏽🔬
🤠Wild-West🐴
32
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
33
X1
time 2
time 3
time N
F(X1)
…
Here F is a LARGE neural network and the model is
”rolled out” in an autoregressive framework:
If X0 is the model state at time zero then:
Xn = F(... F(F(F(F(X0)))
F(X2)
F(XN)
Model Replacement
X1
time 2
time 3
time N
…
Here F is a neural network and the model is
used as a “one shot” predictor:
Xn = F(X0)
Model Replacement
F(X0)
Motivation:
“Physics based models are slow, resource intensive, don’t handle subgrid parameterizations well, and thus are poor at representing upscale error growth so they are inaccurate. Machine learning models derive their dynamics from observations and thus can more accurately represent weather prediction.”
– intentionally inflammatory Machine Learning person.
Motivation: Electricity costs for one year of forecasts1
Based on experiments on HoReKa by J. Quinting, for electricity costs of 50 Cents/kWh, 40 ensemble members, 2 model runs per day for 365 days. – Courtesy of Sebastian Lerch, images DALLE
Physics based Ensemble:
~440,000 €
AI Ensemble:
Motivation: Electricity costs for one year of forecasts1
Based on experiments on HoReKa by J. Quinting, for electricity costs of 50 Cents/kWh, 40 ensemble members, 2 model runs per day for 365 days. – Courtesy of Sebastian Lerch, images DALLE
Physics based Ensemble:
~440,000 €
AI Ensemble:
~200 €
0.04% of energy cost
Motivation: Electricity costs for one year of forecasts1
Based on experiments on HoReKa by J. Quinting, for electricity costs of 50 Cents/kWh, 40 ensemble members, 2 model runs per day for 365 days. – Courtesy of Sebastian Lerch, images DALLE
Physics based Ensemble:
~440,000 €
AI Ensemble:
~200 €
Training ~10,000 €
NCAR’s Weather ML Model (CREDIT-WXformer)
NCAR’s Weather ML Model (CREDIT-WXformer)
Figure 3: An example of 2m temperature forecasts and a corresponding SYNOP observation. (a) Evolution plots showing forecasts valid at Sodankylä (Finland) on 22 February 2022: the 15-day ensemble forecast in the form of the ensemble mean and quantile forecasts (box-plots showing the 5%, 25%, 75%, and 95%), the 10-day PGW and IFS forecasts. (b) PGW forecast at day 2, (c) IFS forecast at day 2, (d) PGW forecast at day 6, (e) IFS forecast at day 6 for Europe with the location of the Sodankylä SYNOP station indicated with a red cross.
ECMWF - Model Replacement
42
Hakim et al. 2023
Idealized extratropical cyclone development over the North Pacific ocean (mean sea level pressure contours every 2 hPa; 850 hPa specific humidity anomalies in colorfill, g/kg)
Model Replacement
Does it know “physics”?
43
Challenges with Pure ML Models
Model Replacement
44
�
Current Problems – Model Smoothing
Summary
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
47
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
48
Develop data-informed, interpretable & generalizable subgrid physics models (ocean, ice, atm)
Hybrid ML Modeling Vision (m2lines)
Slide Courtesy of Laure Zanna
49
Develop data-informed, interpretable & generalizable subgrid physics models (ocean, ice, atm)
Hybrid ML Modeling Vision (m2lines)
Produce error corrections derived from observational products for climate components
Slide Courtesy of Laure Zanna
50
Slide Courtesy of Laure Zanna
‘Physics’ Step
~subgrid scales
Sources of Error in Climate Models
51
Slide Courtesy of Laure Zanna
‘Dynamics’ Step
~fluid flow + thermo
‘Physics’ Step
~subgrid scales
Sources of Error in Climate Models
52
IPCC (AR4 WG 1 Chapter 1 page 113 Fig. 1.4).
Challenges in Hybrid Modeling
53
A Review of ESM Hybrid Work
54
Develop data-informed, interpretable & generalizable subgrid physics models (ocean, ice, atm)
Hybrid ML Modeling Vision (m2lines)
Slide Courtesy of Laure Zanna
55
Importance of the Ocean Boundary Layer
56
Learning Vertical Mixing in the Ocean BL
Courtesy of Aakash Sane
Sane et al. 2023 JAMES
57
Learning Vertical Mixing in the Ocean BL
Courtesy of Aakash Sane
Sane et al. 2023 JAMES
58
ANN trained from advanced turbulence model
Key Features
Courtesy of Aakash Sane
Sane et al. 2023 JAMES
Improving Ocean Biases
59
“The goal of this book is to conceptualize the problems associated with climate models within a simple and computationally accessible framework. We will introduce the readers to climate modeling by using a simple tool, the [Lorenz, 1995] (L96) two-timescale model. We discuss the numerical aspects of the L96 model, the approximate representation of subgrid processes (known as parameterizations or closures), and simple data assimilation problems (a data-model fusion method). We will then use the L96 results to demonstrate how to learn subgrid parameterizations from data with machine learning, and then test the parameterizations offline (apriori) and online (aposteriori), with a focus on the interpretability of the results.”
Co-Authors and I have a Book on Hybrid Modeling
60
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
61
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
62
Earth System
Model
Using your neural net to be an earth science detective.
The best use cases are around VERY intentional question design.
63
64
65
Montavon et al. (2017), Pattern Recognition; Montavon et al. (2018), Digital Signal Processing
Prediction: CAT ✓
Layerwise Relevance Propagation
Slide courtesy of KJ Mayer
66
where the network looked to determine it was a “cat”
Montavon et al. (2017), Pattern Recognition; Montavon et al. (2018), Digital Signal Processing
Prediction: CAT ✓
Prediction: CAT ✓
Back propagate ‘Relevance’
Layerwise Relevance Propagation
Slide courtesy of KJ Mayer
67
Example use of LRP
Figure 3 from Lapuschkin et al. (2019)
Q: is there a horse in the image?
A: yes.
Q: why does the NN think that?
Slide courtesy of KJ Mayer
68
Example use of LRP
Figure 3 from Lapuschkin et al. (2019)
Q: is there a horse in the image?
A: yes.
Q: why does the NN think that?
A: COPYRIGHT!?
relevant region for the correct prediction
Slide courtesy of KJ Mayer
69
OUTGOING LONGWAVE RADIATION
(OLR)
X
LRP HEATMAP
X
MAYER & BARNES 2021
Slide courtesy of KJ Mayer
70
What are relevant physical structures of OLR in the tropics
for prediction over the North Atlantic?
71
LRP map (shading) highlights OLR anomalies (contours) that looks like MJO phases 3-4
Positive Predictions
+
MAYER & BARNES 2021
Slide courtesy of KJ Mayer
72
MAYER & BARNES 2021
NEGATive Predictions
LRP map (shading) highlights OLR anomalies (contours) that looks like MJO phases 7-8
–
Slide courtesy of KJ Mayer
73
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
74
1. Model Replacement
4. Hybrid Modeling
2. Scientific Discovery
https://www.ecmwf.int/
Mayer et al 2021
Chapman et al 2019
3. Post-Model Run / Data Improvement
Courtesy of Laure Zanna
Four Areas of Machine Learning in Weather/Climate
Four Areas of Machine Learning in Weather/Climate
75
Ob.
Fcst.
76
Ob.
Fcst.
77
Ob.
Fcst.
Bias
78
Ob.
Fcst.
79
“It was obvious [NWP] was the way of the future. It was also obvious it would be a long time before “real weather” was forecast by the models, as they concentrated on the upper atmosphere. It was also obvious this was the place for statistics to play a role. The idea of Model Output Statistics (MOS) was quickly born.”
The Earliest ML Adopter!
80
“It was obvious [NWP] was the way of the future. It was also obvious it would be a long time before “real weather” was forecast by the models, as they concentrated on the upper atmosphere. It was also obvious this was the place for statistics to play a role. The idea of Model Output Statistics (MOS) was quickly born.”
The Earliest ML Adopter!
Old & Boring!!!
👨🏼🔬& Rigorous👩🏽🔬
81
This paradigm hasn’t changed in 50 years, the models have just gotten more complicated (and probabilistic), and the statistics to evaluate a forecast have advanced!
82
83
Generative AI and postprocessing?
The new frontier of model post-processing is leveraging generative AI + physical constraints to generate new, unbiased, probabilistic forecasts conditioned on a current forecast state.
To the right is work done by Tim Higgins (CU Boulder) to generate forecasts of atmospheric rivers from pure noise.
84
Model Replacement
Hybrid Modeling
Scientific Discovery
Post-Model Run / Data Improvement
Questions?