Skip to content
Ben Bond-Lamberty edited this page Jan 23, 2017 · 4 revisions

A chunk is just our term for a unit of code corresponding to a single file in the original GCAM data system.

In the new data system, a chunk will normally comprise a single function, but may sometimes encompass multiple functions. Chunks don't have any particular relationship to files in the new data system, except that chunks are separated into files according to what module they belong to: aglu, emissions, energy, gcam-usa, modeltime, and socioeconomics.

Chunks' names must follow a defined convention, so that the driver is able to automatically find and run them. This is spelled out on the Workflow page.

Chunks know how to respond to three messages sent by the driver:

  • driver.DECLARE_INPUTS: The chunk returns the names of its required inputs. See Chunk Inputs and Globals.
  • driver.DECLARE_OUTPUTS: The chunk returns the names of the outputs it will produce. These names should match, 1-to-1, the outputs produced by each script in the original data system.
  • driver.MAKE: The chunk builds its data outputs and returns them.