GCAM — Global Change Analysis Model
Loading runs...
#Changelog
- GCAM 7.1 — Added forestry product-pool detail, a hydrogen-economy update, and ammonia trade.
- GCAM 7.0 (2023) — Added global iron-and-steel trade and a macro-economic (KLEM) module, and updated the bundled Hector to v3.
- GCAM 6.0 — Added an expanded residential floorspace model.
#How to run GCAM locally
GCAM isn't a pip-installable package -- it's a compiled C++17 program that reads a multi-gigabyte input database generated by a separate R data pipeline (one that genuinely needs more memory than a typical machine has, see docs/gcam/architecture.md). Docker is the only realistic path here: the prebuilt image already has the compiled binary and that full database baked in. This runs the "Reference" scenario (the only one currently supported -- see docs/gcam/known-gaps.md) and prints the result as JSON once it finishes.
docker pull possibleplanets/gcam docker run --rm possibleplanets/gcam # -> {"status": "succeeded", "scenario": "Reference", "result": {"csv": "...\n..."}} # SCENARIO_PARAMS works the same way as every other model here, but "Reference" is # the only scenario currently supported (see docs/gcam/known-gaps.md), so this is # equivalent to the bare command above, not a different result: docker run --rm -e SCENARIO_PARAMS='{"scenario": "Reference"}' possibleplanets/gcamResource footprint
The image is several GB (the baked-in input database alone is 5.2GB). A run uses close to 4 CPUs and several GB of memory for about 30 minutes -- GCAM is solving a real multi-region economic equilibrium across 21 time periods (1975-2100), not a closed-form calculation like every other model here.
#How to run GCAM through the REST API
Submit a run with your API key, then poll it until it finishes.
curl -X POST https://possibleplanets.org/v1/models/gcam/runs \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{"params": {"scenario": "Reference"}}' # -> {"run_id": "a1b2c3d4-5e6f-4789-9abc-def012345678", "status": "queued"} curl https://possibleplanets.org/v1/runs/a1b2c3d4-5e6f-4789-9abc-def012345678 \ -H "Authorization: Bearer YOUR_API_KEY" # -> { # "status": "succeeded", # "result": { "csv": "# Output from hector version ...\nscenario,run_name,spinup,year,variable,value,units\nReference,none,0,1850,Tgav,0.0,degC\n...\nReference,none,0,2100,Tgav,...,degC\n" // ILLUSTRATIVE shape -- see docs/api-examples/README.md }, # "duration_seconds": 1860 # } # GCAM runs its own internal Hector instance for climate -- result.csv is Hector's own standard long-format output file (scenario/run_name/spinup/year/variable/value/units), returned as raw text rather than parsed rows, not independently re-executed -- see docs/api-examples/README.mdCached results don't need an API key.
Cost
This model runs on 4 vCPUs and 8 GiB of memory for about 31 minutes per run, which costs roughly $0.172 (~17.2¢) per run on Daytona. Results that are already cached are free.
Possible Planets