Based on a typical GCAM-China output database (database_basexdb).
collection()
-> scenario
@name: scenario identifier
@date: run timestamp
model-version: text value
world:
-> region
@type = "region"
@name = "AH" / "BJ" / ... / "China"
supplysector or pass-through-sector
resource / renewresource / unlimited-resource
final-demand
demographics
nationalAccount
gcam-consumer
The most common XPath start for exploratory queries:
collection()/scenario/world/*[@type="region"]
To target only one province:
collection()/scenario/world/*[@type="region" and @name="AH"]
To target the China aggregate node:
collection()/scenario/world/*[@type="region" and @name="China"]
Chinese provinces are identified by GCAM_name from a province code mapping file. Typical region-level children:
| child_type | xml_node | description |
|---|---|---|
sector |
supplysector |
main supply/demand sector; most commonly queried |
sector |
pass-through-sector |
pass-through sector for intermediate energy distribution |
resource |
resource |
conventional resource |
resource |
renewresource |
renewable resource |
resource |
unlimited-resource |
unlimited supply resource |
final-demand |
energy-final-demand |
final energy demand |
| (none) | demographics |
population |
| (none) | nationalAccount |
national accounts / macro |
| (none) | gcam-consumer |
consumer node |
List all top-level sectors in province AH:
for $s in collection()/scenario
for $sec in $s/world/*[@type="region" and @name="AH"]/*[@type="sector"]
return concat($s/@name, ",", $sec/@name)
An industrial sector typically looks like:
region
-> sector / supplysector
@type = "sector"
@name = "cement" / "iron and steel" / ...
cost:
@year
@unit
text() = price or cost value
-> subsector
@type = "subsector"
@name
cost / share-weight / ...
-> technology
@type = "technology"
@name
-> output-primary or output
-> physical-output
@vintage
@unit
text() = physical output value
-> input
-> demand-physical
@vintage
@unit
text() = physical input demand
Key points:
sector//output-primary/physical-outputsector/costsector//input/demand-physicalsector/cost in BaseX output is NOT a copy of any input CSV value. It is the model-solved sector service price or generalized cost, influenced by:
StubTechCost or input-cost in XML, sourced from globaltech_cost.csvglobaltech_coef.csvMarketplace/market[@name="ChinaCO2"] multiplied by emissions intensityConsequence: Even if all technology input costs are constant, sector/cost varies across years and provinces because energy prices, carbon prices, technology shares, and demand levels change. Do not expect sector/cost to match any single input CSV value.
Not all provinces have all sectors. For example, aluminum, paper, and food processing may exist at national level but not always at provincial level in some GCAM-China versions.
Province codes in GCAM-China are standard abbreviations: AH, BJ, CQ, FJ, GS, GD, GX, GZ, HI, HE, HL, HA, HB, HN, NM, JS, JX, JL, LN, NX, QH, SN, SD, SH, SX, SC, TJ, XZ, XJ, YN, ZJ.
The China node is the national aggregate, not a province. See province-region-mapping.md for the full mapping table and aggregation conventions.
The Marketplace section records inter-sectoral transactions:
scenario/world/Marketplace/
-> market
@type = "market"
@name = "ChinaCO2" / sector-market names
@year
MarketRegion: region name
MarketGoodOrFuel: good being traded
price: equilibrium price
supply: quantity supplied
-> Info
-> Pair[Key = "output-unit"]/Value
-> Pair[Key = "price-unit"]/Value
Marketplace prices are equilibrium transaction prices, distinct from sector costs. For sectors where price-unit and output-unit are incompatible (e.g., iron and steel with 1975$/GJ price and Mt output), marketplace prices may provide a more interpretable price signal — but always verify marketplace price-unit before use.