Git Product home page Git Product logo

co2projections's Introduction

CO2projections

This code is designed for generating probabilistic CO2 projections in paper Less Than 2C Warming by 2100 Unlikely

Code Usage

This code is mostly meant to be run sequentially.

For use of this code, one should load all required packages in the first 30 lines, and load all functionals in constructing the model from line 32 to 1785, including population projection, fit and project the complete model, and evaluation of prediction by summarizing statistics in projections.

Users should also load lines between line 1786 to 1998 for data loading, cleaning and loading of countries.

Population projections are conducted via function predict.population and the predicted trajectories are extracted via find.pop.trajectories. For example,

preds.countries <- predict.population(year.present=2010, year.end=2100,
                                               make.new=TRUE)
pred.pop <- preds.countries$pred.pop
names.countries.tmp <- as.character(unique(subset(data.medium, Isocode != "USA")$Isocode))
preds.countries.trajs <- find.pop.trajectories(data.medium, pred.pop, n.trajectories=1000,
                                               c("USA", names.countries.tmp), year.start=2010, year.end=2100)

This model is estimated via MCMC and JAGS software is used in the estimation process. This is wrapped by function fit.project.model and summary statistics are grabbed by function evaluate.projections. Before running these functions, please make sure that file corr_model_ar1trend_const.bug for describing models for JAGS is in the directory, and for predicting CO2 emissions from year a to b, please predict population with the above codes and save them with name "poppreds_formatted_a_b.rda". For example, if we want to predict CO2 emissions with this model from year 2010 to 2100, we should have "poppreds_formatted_2010_2100.rda" in NatureData/ directory, and use:

model.ar1.const.results.2010 <- fit.project.model(data.medium, fit.ar1.const=T)
proj.evals.2010.ar1.const <- evaluate.projections(data.medium, model.ar1.const.results.2010,
                                                  year.start=2010, year.end=2100,
                                                  outofsample.validate=F,
                                                  quantiles=c(0.025, 0.05, 0.5, 0.95, 0.975))

Codes between line 2104 to 3145 are for creating plots in the paper. It includes:

  • Past and Present GDP plots by countries.
  • Current Carbon Intensities.
  • Yearly Carbon Emissions Predictions (World and Sub-Saharan Areas).
  • Cumulative Carbon Emissions Predictions (World and Sub-Saharan Areas).
  • IPAT Components Projections (Intensity, Population and GDP per capita)
  • Out of Sample Validations
  • Projections of Carbon Emissions by Regions.

Codes between line 3146 to 3248 are for modeling for temperature changes based on Figure SPM.5 of AR5 Summary Report

Codes between line 3249 to 3635 are for predicting the probability that 6 main countries and regions meet their objective in Paris Agreement, including China, India, European Union, United States, Russia and Japan.

Codes between line 3636 to 3743 are for plots in supplementary data, including predictions for 15 countries.

co2projections's People

Contributors

peiranliustat avatar

Watchers

James Cloos avatar Sc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.