Skip to content

Codes to reproduce the paper "A subjective Bayesian framework for synthesizing deep uncertainties in climate risk management" by James Doss-Gollin and Klaus Keller

License

Notifications You must be signed in to change notification settings

jdossgollin/2022-elevation-robustness

Repository files navigation

A subjective Bayesian framework for synthesizing deep uncertainties in climate risk management

Permanent code archive: DOI

This is the GitHub repository for the paper A subjective Bayesian framework for synthesizing deep uncertainties in climate risk management by James Doss-Gollin and Klaus Keller. This code is developed by James Doss-Gollin and has been reproduced by Sitara Baboolal. If you use our code, please cite our paper as something like:

@article{doss-gollin_subjective:2022,
  title = {A Subjective {{Bayesian}} Framework for Synthesizing Deep Uncertainties in Climate Risk Management},
  author = {Doss-Gollin, James and Keller, Klaus},
  date = {2022-12-26},
  journaltitle = {Earth's Future},
  doi = {10.1029/2022EF003044},
}

Reproducibility

This section provides guidance on reproducing our results. We do not purport to achieve bitwise reproducibility, so your results may vary slightly, but you should be able to follow the above steps to get highly similar results. If you are unable to reproduce our results, please open an Issue. You may also send a Tweet to @jdossgollin. The more detail you are able to provide, the more readily we can track down any potential problems.

Install Julia

All code has been developed using Julia 1.6, specifically version 1.6.5. We recommend using JuliaUp to install this version of Julia. If you run Julia using VS Code's Julia extension, this version will be selected automatically (see .vscode/settings.json).

Install Packages

This repository uses a Julia environment. To download all required packages, run the following in a Julia session (i.e, the REPL).

  1. Open a Julia REPL. If you've never used Julia before, there are some helpful resources posted on the course site of the Rice course CEVE 543 Environmental Data Science.

  2. Open Pkg mode in the REPL (by typing ]) and make sure you see something that looks like

    (2022-elevation-robustness) pkg>
  3. Activate the environment. Now that you are in Pkg mode, run activate . (and hit Enter)

  4. Instantiate to set up the packages. To do this, just run instantiate (and hit Enter)

  5. Leave Pkg mode by hitting Backspace

If you don't want to use Pkg mode, you can run the following in the Julia REPL

pwd() # make sure it looks like /path/to/folder/2022-elevation-robustness
using Pkg
Pkg.activate(".")
Pkg.instantiate()

Running

In a Julia REPL, make sure that you have activated the project environment (see above) and run

include("scripts/main.jl")

to run everything. You can also run the lines in main.jl interactively. Alternatively, you can run all analysis as a script from the command line with

julia --project scripts/main.jl

Code organization

This section provides some additional details on how code is organized in this repository.

All code is written in Julia and can be run through one file. The HouseElevation folder provides a local module. Essentially, this module contains abstract code for a generic house elevation problem.

The results of this paper are produced by running the files in scripts/ in numerical order. The main.jl script accomplishes this, along with all necessary imports. As suggested above, the best way to run our codes is to run this main.jl file. The scripts/ directory also includes plotutils.jl, which provides some functions used in the other scripts. We did not feel that creating a package for these functions added value.

The folder data/raw contains required input data that we provide. As you run scripts, intermediate results will be cached in data/external/ or data/processed/. If you delete these intermediate files, they will be re-created as needed.

The folder papers/ contains LaTeX code used to create the manuscript of this file, as well as a poster presented at AGU 2021.

The folder plots/ contains the figures and tables used in our paper. If you re-run the codes, these may change slightly. You are welcome to reuse these figures, but please cite our work and note that copyright of these figures technically belongs to the journal.

The folder tikz/ contains some code to produce figures directly in LaTeX.

DOI Releases

This repository contains a live repository of our code, incorporating updates and suggestions made over time. We have used Zenodo to archive the precise versions of our code used to generate journal submissions. Please see:

  1. 10.5281/zenodo.6799457: code for generating preprint

About

Codes to reproduce the paper "A subjective Bayesian framework for synthesizing deep uncertainties in climate risk management" by James Doss-Gollin and Klaus Keller

Resources

License

Stars

Watchers

Forks

Packages

No packages published