June 6, 2025
Inside the CESM Factory:
Model Development and Tuning
Cécile Hannay and Brian Medeiros (CGD/NCAR) �
This material is based upon work supported by the National Center for Atmospheric Research, which is a major facility sponsored by the National Science Foundation under Cooperative Agreement No. 1852977.
Outline
Timeline of building CESM2
The art of tuning
Model development tales
Tuning in the ML era (Brian Medeiros)
Timeline of building CESM2
CESM2: Development of the individual components
Atmosphere
CAM6
Land Ice�CISM2
Land�CLM5
Sea-ice
CICE5
Ocean
POP2
Phase 1: “Let’s build the model components” (5 years)
CESM2: Development of the individual components
Phase 1: “Let’s build the model components” (5 years)
�During the building phase, working groups focus on aspects of their model they want to improve
Dynamical core, resolution
Atmosphere
CAM
Physical parameterizations
Many uncoupled �simulations + analysis
CESM2: Coupling of the individual components
Phase 2: “Let’s put it together” (3 years)
CESM2 Release: June 2018
Building CESM2 Timeline
2018
2010
Along the way:
Model Tuning
The Art of Tuning
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Tuning knobs = parameters weakly constrained by observations
Dcs = Threshold diameter to convert cloud ice particles to snow
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Tuning knobs = parameters weakly constrained by observations
Dcs = Threshold diameter to convert cloud ice particles to snow
Cirrus clouds
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Tuning knobs = parameters weakly constrained by observations
Dcs = Threshold diameter to convert cloud ice particles to snow
Cirrus clouds
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Tuning knobs = parameters weakly constrained by observations
Dcs = Threshold diameter to convert cloud ice particles to snow
Cirrus clouds
big ice crystals fall out of the cloud�=> cloud ice “converts” to snow
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Tuning knobs = parameters weakly constrained by observations
Dcs = Threshold diameter to convert cloud ice particles to snow
Cirrus clouds
big ice crystals fall out of the cloud�=> cloud ice “converts” to snow
Dcs = threshold diameter
Model tuning
Dcs = Threshold diameter to convert cloud ice particles to snow
Smaller Dcs
Larger Dcs
Less cloud ice
More cloud ice
What is the impact on climate ?
Model tuning
Dcs = Threshold diameter to convert cloud ice particles to snow
Smaller Dcs
Larger Dcs
Less cloud ice
More cloud ice
More cloud ice => less infrared radiation (IR) go to space
IR
IR
IR
IR
Model tuning
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.
Top of atmosphere radiative balance should be near zero
Adjust Dcs
Model tuning
Why is it so important to tune atmosphere radiative balance ?
Radiative balance (W/m2)
years
T ocean (°C)
years
If the atmosphere radiative balance is positive, the ocean is warming
Model tuning
Other targets when tuning
Top of atmosphere radiative balance should be near zero
Dilemmas while tuning
Tuning involves choices and compromises� Overall, tuning has limited effect on model skills
Pre-industrial: Radiative equilibrium � Present day: Available observations
Tuning individual components is fast� But no guarantee that results transfer to coupled model
We learn a lot about the model during the tuning phase.
Model development tales
Coupling = Unleashing the Beast
AMIP run
Coupled run
SSTs = Sea Surface Temperatures�AMIP = type of run when SSTs are prescribed
Example of unleashing the beast (1)
Tuning CAM5 (CESM1 development, 2009)
Evolution of the SST errors (K)
Mean SST errors (K)
Courtesy Rich Neale
CAM = Community Atmospheric Model�SST = Sea Surface Temperature
AMIP = type of run when SST are prescribed
Example of unleashing the beast (1)
Colder
SSTs
�More cloud in
North Pacific
Sea-ice �grows
Tuning CAM5 (CESM1 development, 2009)
Evolution of the SST errors (K)
Courtesy Rich Neale
Example of unleashing the beast (2)
Spectral Element dycore development (CESM1.2, 2013)
SSTs stabilize but too cold compared to obs�SST: 0.5K colder than FV
Finite Volume (FV)
Spectral Element (SE)
Example of unleashing the beast (2)
Spectral Element dycore development (CESM1.2, 2013)
SSTs stabilize but too cold compared to obs�SST: 0.5K colder than FV
Bias = -0.38K
RMSE = 0.96
FV
SE
SSTs (K)
Years
0.5K
Global Ocean Temperature (°C)
FV
SE
Example of unleashing the beast (2)
Spectral Element dycore development (CESM1.2, 2013)
SSTs stabilize but too cold compared to obs�SST: 0.5K colder than FV
Bias = -0.38K
RMSE = 0.96
FV
SE
SSTs (K)
Years
0.5K
Global Ocean Temperature (°C)
FV
SE
What is different (Finite Volume ⬄ Spectral Element) ?
Tuning parameters
Slight difference in Southern Oceans
Surface Stress
| FV | SE |
rhminl | 0.8925 | 0.884 |
rpen | 10 | 5 |
dust_emis | 0.35 | 0.55 |
Grid differences at high latitudes
Red: SE grid�Blue: FV grid �(at about 2 degree)
Courtesy: �Peter Lauritzen
New software to generate topography
(accommodate unstructured grids and enforce more physical consistency)
Topography
Remapping differences (ocn ⬄ atm)
State variables: FV uses “bilinear” and SE “native” �
Can you guess?
What is different (Finite Volume ⬄ Spectral Element) ?
Tuning parameters
Slight difference in Southern Oceans
Surface Stress
| FV | SE |
rhminl | 0.8925 | 0.884 |
rpen | 10 | 5 |
dust_emis | 0.35 | 0.55 |
Grid differences at high latitudes
Red: SE grid�Blue: FV grid �(at about 2 degree)
Courtesy: �Peter Lauritzen
New software to generate topography
(accommodate unstructured grids and enforce more physical consistency)
Topography
Remapping differences (ocn ⬄ atm)
State variables: FV uses “bilinear” and SE “native” �
Zonal Surface Stress (N/m2)
FV
SE
Max moves North
Mechanism responsible of SST cooling in SE
Wind stress curl anomaly
(year 1-10)
wind stress curl difference at 50S
CORE FV SE
100-m vertical velocity anomaly
upwelling of cold water anomaly at 50S
Changes in location of upwelling zones associated with ocean circulation is responsible of the SST cooling
SST anomaly from CORE
CORE FV SE
Cold SSTs are advected
north by ocean circulation
South
North
Ocean circulation
Similar behavior in GFDL model
CM2.0�Eulerian dycore
CM2.1�FV dycore
SST cooling
warm layer at 750m
Reduced �biases in FV
Zonal wind stress
FV
Eulerian
South
North
Example of unleashing the beast (3)
The Labrador Sea issue (CESM2 development, 2016)
Sea-ice extent is close to obs.�Labrador sea is ice free
Observed
sea-ice extent
(black line)
CESM1
Labrador sea is ice-covered.
Labrador sea
CESM2_dev
Sea-ice extent
Example of unleashing the beast (3)
CESM1
The Labrador Sea issue (CESM2 development, 2016)
CESM2_dev
Too warm and salty
Too cold and too fresh
Too cold and too fresh South of Greenland => Labrador Sea freezes
SST bias
Salinity bias
Example of unleashing the beast (3)
CESM1
The Labrador Sea issue (CESM2 development, 2016)
CESM2_dev
Too warm and salty
Too cold and too fresh
Too cold and too fresh South of Greenland => Labrador Sea freezes
SST bias
Salinity bias
Trouble in the Labrador Sea
Sea-ice extent is close to obs Labrador sea is ice free
(also true for LENS) �
Extensive sea-ice cover�Labrador sea is ice covered
Timeseries of sea ice thickness in Labrador sea
Sea ice is building up in Labrador sea
This can happen after 1 yr, 40 yr, 100+ yr
It is was very robust feature in CESM2_dev
Multiple attempts to fix the issue
EBM
Estuary Box Model
Estuary Box Model (EBM) to the rescue!
Sea surface salinity
Sea surface temperature
EBM – CONTROL (COUPLED)
Courtesy: Gokhan Danabasoglu
EBM – CONTROL (COUPLED)
Coupling = Unleashing the Beast
Summary
Building of CESM happens in two phases (building and coupling components)�
�
Phase 2: Let’s couple the components
Phase 1: Let’s build the components
2010
2018
Summary
The Art of Tuning�
Tuning = adjusting parameters (“tuning knobs”) � to achieve best agreement with observations.�
The Art of Coupling�
Three examples of coupling challenges
Thanks !
Cartoons by non artificial intelligence:�Kolya Dols and Vincent Dols
Calibrating ESMs in the ML era
Brian Medeiros & Linnia Hawkins
Challenges of “hand tuning”
Totally fake picture
Exploring Parameter Sensitivities
Totally fake picture
CAM6 Perturbed Parameter Ensemble
micro_mg_max_nicons | micro_mg_effi_factor | Micro_mg_vtrmi_factor | Micro_mg_iaccr_factor | micro_mg_berg_eff_factor | micro_mg_accre_enhan_fact |
micro_mg_autocon_fact | micro_mg_autocon_nd_exp | micro_mg_autocon_lwp_exp | micro_mg_homog_size | micro_mg_dcs | clubb_c1 |
clubb_C8 | clubb_c11 | clubb_c14 | clubb_c_K10 | clubb_gamma_coef | clubb_C2rt |
clubb_wpxp_L_thresh | clubb_beta | clubb_C6rt | clubb_C6rtb | zmconv_c0_lnd | zmconv_c0_ocn |
zmconv_ke | zmconv_ke_lnd | zmconv_dmpdz | cldfrc_dp1 | cldfrc_dp2 | zmconv_num_cin |
zmconv_momcu | zmconv_momcd | zmconv_tiedke_add | zmconv_capelmt | seasalt_emis_scale | dust_emis_fact |
sol_factb_interstitial | sol_factic_interstitial | microp_aero_wsub_min | microp_aero_wsubi_min | microp_aero_wsub_scale | microp_aero_wsubi_scale |
microp_aero_npccn_scale | | | | | |
CLM Perturbed Parameter Ensembles
Calibrating ESMs in the ML era
Emulators are fast surrogates for climate models, mapping parameters to output (usually statistics of model variables)
Emulators can be used in any traditional calibration method (e.g., Markov Chain Monte Carlo [MCMC], approximate Bayesian computation[ABC])
Emulators are also differentiable, so the gradients can be taken advantage of and the calibration doesn’t have to be fully numerical.
Surrogate based calibration
ESM calibration methods
NN-derived emulator based MCMC (Elsaesser et al., 2025)
Calibrate Emulate Sample (Cleary et al., 2021) - Gaussian Process emulator based on Ensemble Kalman sampling�“The overarching approach is to first use ensemble Kalman sampling (EKS) to calibrate the unknown parameters to fit the data; second, to use the output of the EKS to emulate the parameter-to-data map; third, to sample from an approximate Bayesian posterior distribution in which the parameter-to-data map is replaced by its emulator.”
History Matching (Williamson et al., 2013; Hourdin et al., 2021)(closely related to ABC)
CLM simulates far more processes than are observed
CLM simulates far more processes than are observed
Carbon cycle uncertainty in land model projections
32 parameters in the Community Land Model
500 member perturbed parameter ensemble
Unconstrained parametric uncertainty
Source
Sink
CMIP5: RCP8.5
Friedlingstein et al. (2014)
Constraining parametric uncertainty
Generate a perturbed parameter ensemble
56 parameters
1500 ensemble members
�
Train Emulator
Emulate a dense sample
Rule out implausible parameter sets
Constrain parameter posteriors
Constraining parametric uncertainty
Generate a perturbed parameter ensemble
56 parameters
1500 ensemble members
�
Train Emulator
Emulate a dense sample
Rule out implausible parameter sets
Constrain parameter posteriors
Constraining parametric uncertainty
Generate a perturbed parameter ensemble
56 parameters
1500 ensemble members
�
Train Emulator
Emulate a dense sample
Rule out implausible parameter sets
Constrain parameter posteriors
History Matching
Constraining uncertainty in land carbon sink
Unconstrained parametric uncertainty
Leaf area constraint
Biomass, GPP, leaf area constraints
Calibrating CLM6
Default
Leaf Area Bias
Calibrated
Leaf Area Bias
Mean �absolute
error = 1.36
Mean
absolute
error = 0.60
Unexpected improvements & Structural Error
Challenges with ML calibration
Methods
Computation
Culture
Coupling
ESM Calibration Evolved