Skip to content

Notebooks for the code used to perform regime-oriented causal model evaluation of CMIP6 LEs

License

Notifications You must be signed in to change notification settings

EyringMLClimateGroup/karmouche23esd_CausalModelEvaluation_Modes

Repository files navigation

08.08.2022 @Soufiane Karmouche (SK), Institute of Environmental Physics (IUP), University of Bremen

  • This repository presents a sample of the regime-oriented causal model evaluation (CME) in the form of jupyter notebooks. The main set of code is used to produce most of the figures on the paper "karmouche23esd_CausalModelEvaluation_Modes"

Karmouche, S., Galytska, E., Runge, J., Meehl, G. A., Phillips, A. S., Weigel, K., and Eyring, V.: Regime-oriented causal model evaluation of Atlantic–Pacific teleconnections in CMIP6, Earth Syst. Dynam., 14, 309–344, https://doi.org/10.5194/esd-14-309-2023, 2023.

Corresponding DOI: DOI

I. INSTALLATION

1. Clone the repository:

git clone https://github.com/EyringMLClimateGroup/karmouche23esd_CausalModelEvaluation_Modes

2. Create conda environment from environment.yml:

cd karmouche23esd_CausalModelEvaluation_Modes

conda env create -f environment.yml

conda activate causalenv

cd ..

3. Install the TIGRAMITE package to use PCMCI+: please follow instructions: here

git clone https://github.com/jakobrunge/tigramite.git

cd tigramite   

python setup.py install

cd ..

It is the User's responsibility to install TIGRAMITE. Results of the paper have been produced using version: 5.0.1.17

After installing Tigramite in the conda environment, add environment to jupyter kernels:

python -m ipykernel install --user --name=causalenv   

II. DOWNLOADING DATA

The complete CVDP-LE diagnostic for the 1900-2014 historical CMIP6 comparison run can be found on: CESM CVCWG CVDP-LE Data Repository

- Alternatively through command line:

1. Download:

wget http://webext.cgd.ucar.edu/Multi-Case/CVDP-LE_repository/CMIP6_Historical_1900-2014/CMIP6_Historical_1900-2014.cvdp_data.tar

2. Extract:

tar -xvf CMIP6_Historical_1900-2014.cvdp_data.tar

After installing TIGRAMITE and downloading the data, it is time to slightly edit the jupyter notebooks before running them.


III. EDITTING JUPYTER NOTEBOOKS

  1. In the first code cell (Imports): Remove the hashtag (#) at the beginning of last four lines in the Imports cell (e.g. from tigramite...)
  2. Change the path_to_data in Data PATH cell to where CMIP6_Historical_1900-2014.cvdp_data is saved.
  1. In the first code cell (Imports): Remove the hashtag (#) at the beginning of last line in the Imports cell (e.g. from tigramite import plotting as tp)
  1. Change the path_to_data in Data PATH cell to where CMIP6_Historical_1900-2014.cvdp_data is saved.

IV. RUNNING JUPYTER NOTEBOOKS

First create a directory where results will be saved:
mkdir Results_DIR/

We recommend running the notebooks in the order below:
(some notebooks require results from other notebooks)

         1. Pattern_correlation.ipynb

         2. OBS_CMIP6_pcmciplus.ipynb

         3. F1_score.ipynb

         4. Ensemble_graphs.ipynb


V. RESULTS

Results from running the jupyter notebooks will be saved under the Results_DIR/ directory

          To refer to figures from the paper, please see overview_figures to locate the notebook needed to produce a specific plot.


REFERENCES:

Phillips, A. S., C. Deser, J Fasullo, D. P. Schneider and I. R. Simpson, 2020: Assessing Climate Variability and Change in Model Large Ensembles: A User’s Guide to the “Climate Variability Diagnostics Package for Large Ensembles”, doi:10.5065/h7c7-f961

PCMCI+: J. Runge (2020): Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets. Proceedings of the 36th Conference on Uncertainty in Artificial Intelligence, UAI 2020,Toronto, Canada, 2019, AUAI Press, 2020.