Users will often want to make changes to gcamdata code or add new "chunks". Below we offer some advice and tips about how to achieve this.

What is a Chunk?

A chunk is just our term for a unit of code corresponding to a single R file in gcamdata. A chunk will normally comprise a single function, chunks are separated into files according to what module they belong to: aglu, emissions, energy, gcam-usa, modeltime, and socioeconomics.

Chunks know how to respond to three messages sent by the driver: driver.DECLARE_INPUTS: The chunk returns the names of its required inputs.. driver.DECLARE_OUTPUTS: The chunk returns the names of the outputs it will produce. * driver.MAKE: The chunk builds its data outputs and returns them.

Code Style

Basic Chunk Debugging

Input Data

Writing Chunks



JGCRI/gcamdata documentation built on March 21, 2023, 2:19 a.m.