Skip to content

JGCRI/sturtevant_food_ammonia

Repository files navigation

DOI

sturtevant-etal_202X_Journal

Food security impacts of ammonia energy transformation

Jillian Sturtevant1, Page Kyle2*, Paul Wolfram2, Hassan Niazi2, Xin Zhang1, Sarah Garvey1, et al.

1 Appalachian Laboratory, University of Maryland Center for Environmental Science (UMCES); 2 Joint Global Change Research Institute, Pacific Northwest National Laboratory (JGCRI-PNNL)

* corresponding authors: [email protected] | [email protected]

Abstract

Using ammonia to mitigate CO2 emissions from maritime shipping poses potentially major food security risks. Ammonia is the prime source of nitrogen used in fertilizers. At the same time, ammonia demands for decarbonizing shipping fuels may exceed those for agriculture. This study uses GCAM to provide a first integrated quantitative analysis of the net impacts of simultaneous supply and demand shocks to ammonia markets globally, together and in isolation, across food and energy systems through the mid-21st century.

This repository contains key data files, model, and scripts used to support the analysis in the manuscript referenced below.

Journal reference

TBD

Repository Overview

The folder structure and scripts used in this analysis are described below. Each folder contains a README.md file with more details.

Folders Description
data/ Input data files used in the analysis. See data readme for more details
model/ GCAM model used in the analysis. Should be cloned from the GCAM repository. See model for the version details and model readme for more information on the model setup
figures/ Figures from analysis scripts in the repo. See figures readme for more details

The main scripts and files used in the analysis are:

Files Description
load.R R script to extract GCAM output data using rgcam and load key environment variables
figures.R R script to generate figures in the manuscript
food_ammonia.proj GCAM output data project file generated from load.R using rgcam
queries_ammonia.xml XML file containing GCAM queries used in load.R

Reproduce my experiment

For first-time users of GCAM, follow the guidance on GCAM wiki to setup GCAM or for background knowledge.

Model

Model Version Repository Link DOI
GCAM v7.2 https://github.com/pkyle/gcam-core DOI
R 4.5.1 https://cran.r-project.org/ -

Steps

High-level steps to reproduce the analysis are:

  1. Clone this repository:
    git clone https://github.com/JGCRI/sturtevant_food_ammonia.git

You will not need raw GCAM model files to run the analysis scripts, but if you want to get them, initialize and update the submodules:

    cd sturtevant_food_ammonia
    git submodule update --init model/gcam-core
To regularly update the GCAM model To stay up to date with the latest GCAM model changes, you can periodically run:
    git submodule update --remote model/gcam-core

or manually update it by pulling changes in the folder by cd model/gcam-core, running git pull, and then returning to the root directory cd ../../ and registering the submodule git add model/gcam-core.

  1. Run figures.R to generate figures in the manuscript

  2. Run load.R to set up the R environment, install required packages, and load GCAM output data

    • Set INSTALL_PACKAGES <- TRUE in load.R to install required packages
    • Set QUERY_GCAM <- TRUE in load.R to re-query GCAM output data.

Detailed instructions are in the README.md files in each folder (e.g., in data, model, and figures folders).

Outputs

GCAM output project food_ammonia.proj contains the relevant results of the analysis.

The raw GCAM output database will be in the outputs/database_basexdb folder and could be produced by running GCAM with instructions in the model readme.

Analysis outputs food_ammonia.proj are generated by the load.R script. GCAM output database should be produced before running load.R with QUERY_GCAM <- TRUE.

Contact

Open an issue on this repository by navigating to the Issues tab or contact the corresponding author.

About

Food system implications of ammonia use in GCAM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages