Recently, I've been learning a lot about Integrated Assessment Models (IAMs). IAMs are computer models of the world: They integrate ideas from multiple disciplines (such as physics and economics) so we can explore how different decisions could shape the future.
The IPCC uses IAMs to understand how different policies could help limit global warming. They search the space of possible futures, exploring how policy choices influence global temperatures:
Running models in the cloud
IAMs are just computer programs, and they need access to CPU and memory to run. They can run on a desktop or laptop computer, but many researchers use a dedicated research cluster.
In my work, I often use cloud sandboxes as a way to run AI agents in the cloud. Fortunately, cloud sandboxes also work great for IAMs. The main advantage to cloud sandboxes over traditional infrastructure is the cold start time, which is under one second, and the pricing model:1
Model complexity and cost
An IAM like GCAM or DICE links models of the economy, energy and land use to a climate component, while an emulator is just that climate component on its own—a simpler model that estimates temperature from emissions using statistical fits rather than simulating the underlying physical processes.
Because of this difference in complexity, the models also take very different amounts of compute to run, from under a second to tens of minutes.
Emulators
I ran five IAM emulators, in order of least to most complex:
- Two Layer — Simple climate model with a surface layer and a deep-ocean layer
- HECTOR — Simple climate model that converts CO₂ emissions into temperature rise
- MAGICC — Simple climate model that converts emissions data into temperature rise
- FaIR — Ensemble climate model that runs 66 sets of assumptions to give a spread of warming outcomes
- OSCAR — Earth system model with linked carbon cycle, ocean, ice, and vegetation components
Two Layer, HECTOR, MAGICC and FaIR ran quickly, and adding any more than 2 vCPU and 1 GiB did not speed them up much. OSCAR ran out of memory with 1 GiB of RAM, but worked with 4 vCPU and 8 GiB.
DICE
I've previously run the Dynamic Integrated Climate-Economy model (DICE) in a Jupyter notebook. DICE is a climate and economy model that weighs the costs and benefits of emissions reductions. It's a low-resolution model with a simple climate component, so it can't capture much detail.
GCAM
The next challenge was to run the Global Change Analysis Model (GCAM), a climate and economy model that links energy, agriculture and land use over decades. GCAM is a widely used, open-source model written in C++.
Getting GCAM working was a little less straightforward than the other models. However, GCAM uses the climate model Hector, so we already had one component working.
Building scenario files
To run GCAM (the C++ program), one must first prepare a "database" of about 5.7 GB XML files. This data comes from 380MB of raw CSV files which are included with GCAM. The easy way to do this is to download the full release from GitHub.
The hard way to do this is to build the XML files with gcamdata (an R package) that uses drake. The GCAM documentation says "at least 5 GB available RAM" is needed to run gcamdata. However, even when using the minimal settings (jobs=1, memory_strategy="autoclean") 8 GiB of RAM was insufficient, and running gcamdata took 13.5GB of memory at its peak. It took about 75 minutes to complete.2
Running simulations
When running GCAM, I again encountered issues with memory. GCAM 9.1's official documentation says:
Warning: GCAM requires significant computational resources. A GCAM model simulation will utilize over 8 GB of system RAM and storing the full results of the simulation will take around 3 GB of disk space per scenario.
The warning says that simulations use over 8 GB of RAM. However, by adjusting GCAM's parallelism settings, I was able to run it with under 8GB of RAM. GCAM defaults to all CPU cores available, and each core in use adds an additional amount of RAM.
In the GCAM Dockerfile, I added a config_overrides parameter to the run.py script, which allows me to override custom parts of the XML files such as max-parallelism. I reduced the number of cores by using the max-parallelism setting. It used 7.3 GiB with one core, and 7.9 GiB with two cores. The latter setting (while precariously close to 8 GiB) continued to work for me across runs and scenarios.
Orchestrating IAM runs
To run multiple IAMs and scenarios in parallel and capture the output, I made a simple app using NextJS and Postgres. In this UI, I can select multiple models and scenarios to run simultaneously.

Each run shows a progress indicator and how long it has been running, and when it is finished the output can be viewed:

While the web app is open, updates are streamed from the sandbox to the dashboard. A webhook is triggered from the sandbox to the backend after each run completes. That way, the results are always saved in the database and the sandbox is deleted. The sandbox is also deleted automatically after a set period of time in case the model hangs, to prevent unexpected costs.
AI and IAM development
AI is very quickly starting to affect the development of IAMs. At the 19th IAMC annual meeting, a lot of concern was expressed about the use of AI and how this would affect our understanding of IAMs.
Soon, large IAM codebases will be refactored and rewritten by AI. Care will need to be taken that this actually improves our understanding of what is being modeled. Additionally, ensure our models are still accurate, we need to verify changes against past versions.
So far, I only used Claude Code to set up the models, but I could also use it to optimize and improve them. Cloud sandboxes can help with both of these processes because it allows us to run more models in parallel. This can speed up the entire development process, when testing is usually the slower part of development.
Trying it yourself
The web app is open source and available here on GitHub.
You can also run each of the models on your own infrastructure or locally using the Dockerfiles I've created, published on Docker Hub.
Each Dockerfile includes a run.py which standardizes the input parameters for the models.
Footnotes
-
In the future, I want to try using burstable pricing on Daytona to see if I can run models with even less than 1 vCPU. ↩
-
During testing, I also discovered some memory and data processing bugs in
gcamdata, which I hope to return to later to create fixes for. ↩