Skip to content

Official repository for the SAI Simulator, a new tool to explore the effects of stratospheric aerosol injection on the climate.

License

Notifications You must be signed in to change notification settings

reflective-org/sai-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sai-simulator

DOI

Official repository for the SAI Simulator, a new tool to explore the effects of stratospheric aerosol injection on the climate.

SAI Simulator

Table of Contents

Introduction

The SAI Simulator is a web-based tool that runs in your browser at simulator.reflective.org. If you would like to reproduce the steps to prepare the data presented in the simulator, you can follow the instructions below.

📁 Data Preparation

A. Environment Setup

Create a new conda environment and install the required packages by running the following commands:

conda create -n sai-simulator python=3.11 esmpy=8.6.1 -c conda-forge
conda activate sai-simulator
pip install -r requirements.txt

B. Data Download

Download the GAUSS data from Globus (requires around 140GB of disk space):

  1. First install the Globus CLI:
    pip install globus-cli
  2. Log in to Globus:
    globus login
  3. Download the data:
    sh scripts/download_gauss.sh 2e01e83a-5180-47f7-a6ab-c98b626ad9e4 <YOUR ENDPOINT ID> data/gauss/

C. Data Processing

  1. Process the daily data to create monthly values. You can process all the daily data (both tas and pr) using:

    sh scripts/process_all_daily.sh data/gauss

    Or you can process the daily data for a specific variable (e.g. tas) using:

    python scripts/process_daily_gauss.py --var tas --data_dir data/gauss
  2. Process the monthly data to create annual values ready for model fitting. You can process all the monthly data using:

    sh scripts/process_all_monthly.sh data/gauss data/processed

    Or you can process the monthly data for a specific variable using:

    python scripts/process_monthly_gauss.py  --var tas --data_dir data/gauss --output_dir data/processed

D. Fit the Regression Models

We fit linear regression models to (1) estimate a gridded map of each variable given a global temperature output by FaIR and (2) estimate a gridded delta of each variable given a global temperature delta. The models are trained using the GAUSS simulation data.

You can fit the regression models for all variables using:

sh scripts/fit_all.sh data/processed data/models

Or you can fit the regression models for a specific variable using:

python scripts/fit_map.py --var tas --data_dir data/processed --output_dir data/models
python scripts/fit_delta.py --var tas --data_dir data/processed --output_dir data/models

E. Cache the Data

The simulator caches all the data to be loaded more efficiently by the frontend. You can cache the data by running the following command:

python scripts/cache.py --data_dir data/processed --model_dir data/models --output_dir data/cache

🔒 License

This project is released under the Apache 2.0 License - see the LICENSE file for details.

✏️ Citation

If you use the SAI Simulator in your work, please cite the following:

Jeremy Irvin, Jake Dexheimer, Ali Akherati, Dakota Gruener, Charlotte DeWald, Daniele Visioni, Duncan Watson-Parris, Douglas MacMartin, Joshua Elliott, Juerg Luterbacher, Kion Yaghoobzadeh. (2024). SAI Simulator (Version 1.2.0) [Software]. Available at GitHub: https://github.com/Reflective-org/sai-simulator. Hosted at: https://simulator.reflective.org and https://planetparasol.ai.  DOI: https://doi.org/10.5281/zenodo.15531372

About

Official repository for the SAI Simulator, a new tool to explore the effects of stratospheric aerosol injection on the climate.

Resources

License

Stars

Watchers

Forks

Packages

No packages published