Skip to content

CH3CCl3 concentration constraint registered in C++ but no column in SSP CSVs #808

Description

@shyamperi

Summary

The C++ source registers a concentration-constraint input
CH3CCl3_constrain for the methyl chloroform (CH3CCl3) halocarbon
component — same shape as every other halocarbon component. But the
SSP CSVs under inst/input/tables/ ship only the CH3CCl3_emissions
column; there is no CH3CCl3_constrain column anywhere in the
shipped tables.

Effect: the constraint input is registered (it appears in init() +
getRegisteredInputs()) but cannot be bound from any default CSV
template. A user-supplied .ini that references
CH3CCl3_constrain=csv:tables/<file>.csv finds no matching column
and silently no-ops the constraint. Same observable symptom as #807,
different cause: there the column was misnamed; here it is absent.

Reproduction

$ git checkout 9631b05f6e139303436c48c9d80ebb8425e88708   # v3.5.0 commit

$ grep -n 'CH3CCl3' inst/include/component_data.hpp
89:#define D_RF_CH3CCl3         D_RF_PREFIX     CH3CCl3_COMPONENT_BASE
121:#define D_RFADJ_CH3CCl3     D_RFADJ_PREFIX  CH3CCl3_COMPONENT_BASE
150:#define D_EMISSIONS_CH3CCl3 CH3CCl3_COMPONENT_BASE EMISSIONS_EXTENSION
178:#define D_CONSTRAINT_CH3CCl3 CH3CCl3_COMPONENT_BASE CONC_CONSTRAINT_EXTENSION
218:#define D_HCRHO_CH3CCl3     D_HCRHO_PREFIX  CH3CCl3_COMPONENT_BASE
248:#define D_HCDELTA_CH3CCl3   D_HCDELTA_PREFIX CH3CCl3_COMPONENT_BASE

# D_CONSTRAINT_CH3CCl3 expands to "CH3CCl3_constrain" — registered.

$ awk -F',' 'NR==6 {for(i=1;i<=NF;i++) if ($i ~ /CH3CCl3/) print $i}' \
    inst/input/tables/ssp245_emiss-constraints_rf.csv | sort
CH3CCl3_emissions
# (CH3CCl3_constrain absent — every other halocarbon has both.)

Compare with a halocarbon that has both columns:

$ awk -F',' 'NR==6 {for(i=1;i<=NF;i++) if ($i ~ /CFC11_/) print $i}' \
    inst/input/tables/ssp245_emiss-constraints_rf.csv | sort
CFC11_constrain
CFC11_emissions

Reproduces in all 9 SSP CSVs (ssp119, ssp126, ssp245, ssp370,
ssp434, ssp460, ssp534-over, ssp585, picontrol).

Possible causes (need maintainer judgement)

  1. CSV generator omission. JGCRI/hectordata generates these
    tables; the column list may simply have skipped CH3CCl3. Fix is
    in hectordata: add the CH3CCl3_constrain column to the generator
    alongside CH3CCl3_emissions.
  2. Intentional emissions-only treatment. CH3CCl3 has been phased
    out under the Montreal Protocol; its post-2000 atmospheric burden
    is dominated by the residual emissions trajectory rather than any
    constraint scenario. If that's the policy choice, then the C++
    D_CONSTRAINT_CH3CCl3 macro should not be wired through
    registerInput() — leaving it dangling is the actual bug.

Proposed fix

Maintainer's call between two options:

Option A — add the column. Generate CH3CCl3_constrain in
hectordata for every SSP table, with concentration values matching
the modelled trajectory (zero post-phaseout is fine; users who want
a constraint can edit). Matches the symmetry of every other
halocarbon.

Option B — drop the constraint registration. Remove
D_CONSTRAINT_CH3CCl3 from CH3CCl3_halocarbon_component's
registerInput() calls. The registry now reflects only what the CSV
templates actually carry; downstream consumers stop seeing a
dangling input.

We slightly prefer A for consistency with the other 25 halocarbons,
but either is correct.

Impact

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions