airmosaic-ai

Sector Naming Conventions in GCAM-China

Internal names, mappings, and conventions that agents must know before writing queries or modifying configurations.

Sector Names vs Display Names

GCAM-China uses internal sector names that may differ from human-readable names:

Internal Name Display / Common Name Sector File
ammonia N fertilizer / nitrogen fertilizer Fert_CHINA.xml
cement cement cement_CHINA.xml
iron and steel iron and steel detailed_industry_CHINA.xml
chemical chemical energy use detailed_industry_CHINA.xml
coke coke detailed_industry_CHINA.xml
other industry other industry detailed_industry_CHINA.xml
aluminum aluminum detailed_industry_CHINA.xml
paper paper detailed_industry_CHINA.xml
food processing food processing detailed_industry_CHINA.xml

Always use the internal name in XQuery. The display name may appear in documentation or output labels but is not the queryable identifier.

The ammonia / N fertilizer Mapping

The R constant confirms the internal name:

# From input/gcamdata/R/constants.R
gcamchina.FERT_NAME <- "ammonia"

XML files generated by GCAM-China R scripts use ammonia, but some externally sourced or older CCS files may use N fertilizer. When in doubt, query the database:

distinct-values(collection()/scenario/world/*/*[@type="sector"]/@name)

Province Codes

GCAM-China uses two-letter abbreviation codes for Chinese provinces:

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. It is treated as a region but serves a different role:

Province Code Mapping File

Located at database_R/Prov_code_china.csv, with columns:

Technology Naming Patterns

Technologies follow these patterns:

Pattern Example Sector
Base name only cement cement
Base + CCS cement CCS cement with CCS
Process variant BLASTFUR, EAF with DRI iron and steel
Feedstock variant coal, gas, hydrogen ammonia

Technology names include spaces and are case-sensitive in XQuery.

Node Type Names

GCAM XML nodes use specific @type values:

@type Element Description
region region Top-level region node
sector supplysector, pass-through-sector Sector node
subsector subsector Subsector node
technology technology, stub-technology Technology node
output output-primary, output Output node
input input Input node
resource resource, renewresource, unlimited-resource Resource node

Use @type in XPath for reliable node selection:

$r/*[@type="sector" and @name="cement"]

This is more robust than matching on element name because GCAM-China uses both supplysector and pass-through-sector for sectors.

Common Query Pitfalls

  1. Using display names instead of internal names: Query ammonia, not N fertilizer
  2. Querying China node for province data: The China node has national aggregate values, not province-level data
  3. Assuming all provinces have all sectors: Not all sectors exist in every province
  4. Case sensitivity: "Cement" != "cement" in XQuery string comparisons