This project can be used to prepare the Hector .ini
file and emissions .csv
table from the 2024-07-08 CEDS release. The tentative plan is for this workflow to eventually be incorporated into gcam-data, but for now, it is a standalone workflow. Setup instructions are written for macOS users; Windows users may need to make some adjustments.
This project can be used to prepare the Hector ini file and emissions csv table using from the 2024-07-08 CEDS release, the tentative plan is for this workflow to eventual be incorporated in gcam-data but for now this is a stand alone workflow. Set up instructions are written for mac users, window users may have to make some adjustments.
Getting started
- Clone the Repository Clone a copy of this repository to your local machine.
- Download Raw Data Files The raw data files are too large to be committed to the Git repository. You can download them from Zenodo by running the following command in your terminal:
sh hector-CEDS/raw-data/get-raw-data.sh
- Install Dependencies Install the required packages listed in
hector-CEDS/scripts/constants.R
Run Workflow
To run the entire workflow at once, execute the following command in R. This will run all scripts in the correct order, generating Hector inputs in the hector-CEDS/inputs
directory:
source("hector-CEDS/scripts/run_all.R")
Using CEDS emissions in Hector
The Hector inputs generated by this workflow are included in this repository. Most users can use the default hector-CEDS/inputs/hector_ceds_historical.ini
file unless they want to modify the input time series. Here’s an example of how to use this .ini
file in R:
# Load Hector package
library(hector)
# Define the path to the hector_ceds_historical ini file
# Replace PATH/TO with the path to where you installed hector-CEDS on your local machine
ini <- "PATH/TO/hector-CEDS/inputs/hector_ceds_historical.ini"
# Create a new Hector core with the specified ini file
hc <- newcore(ini)
# Run Hector up to the end of CEDS emissions data in 2022
run(hc, runtodate = 2022)
# Use fetchvars to examine Hector results
# For more examples, visit https://github.com/JGCRI/hector