GCAM input data flows through a multi-step pipeline before becoming model output:
Raw CSV data
-> R processing scripts (gcamdata package)
-> Intermediate R data objects
-> XML generation scripts
-> Model input XML files
-> GCAM solver (C++)
-> BaseX output database
-> XQuery extraction
input/gcamdata/inst/extdata/gcam-china/
detailed_industry_output.csv (historical province output, Mt)
IO_detailed_industry.csv (input-output coefficients)
A323.sector.csv (sector metadata: units, logit, etc.)
A323.globaltech_cost.csv (technology non-energy costs)
A323.efficiency_improve.csv (efficiency improvement rates)
input/gcamdata/R/
zgcamchina_L1323.Detailed_industry.R (process output and IO)
zgcamchina_L2323.Detailed_industry_CHINA.R (build TechCost, ShareWeights)
zgcamchina_xml_Detailed_industry_CHINA.R (write XML)
input/gcamdata/xml/detailed_industry_CHINA.xml
Queryable via XPath/XQuery:
collection()/scenario/world/*[@type="region"]/*[@type="sector"]
/cost (sector service price)
//physical-output (sector physical output)
//demand-physical (input demand)
The sector cost in BaseX output is NOT a copy of any input CSV value. It is the model-solved result, influenced by:
A323.globaltech_cost.csvIO_detailed_industry.csv)Even if all technology input costs are constant over time, sector/cost still varies across years and provinces because energy prices, carbon prices, and technology shares change.
To trace a specific output value (e.g., sector/cost for cement in Anhui in 2030):
gcam-china/A323.globaltech_cost.csvzgcamchina_L2323.Detailed_industry_CHINA.R reads this CSV and generates StubTechCost nodesdetailed_industry_CHINA.xml contains <region name="AH"><supplysector name="cement">...IO_detailed_industry.csv defines how much coal, electricity, etc. each ton of cement usesMarketplace/market[@name="ChinaCO2"]/price adds to sector costcement or cement CCS dominates, affecting average costThe final sector/cost integrates all these factors through the GCAM solver.
A systematic approach for any sector:
A323.sector_China.csv)output-unit and price-unit — these determine how to interpret output valuesGCAM-Core (JGCRI/gcam-core) and GCAM-China (umd-cgs/gcam-china) have different sector configurations. For example:
A323.sector.csv: iron and steel with price-unit=1975$/kgA323.sector_China.csv: iron and steel with price-unit=1975$/GJAlways check the local configuration files rather than assuming GCAM-Core defaults apply to GCAM-China. See ../references/gcam-china-vs-official.md for the full comparison.