Skip to content

HFC245fa concentration constraint column missing 'fa' suffix in SSP CSVs #807

Description

@shyamperi

Summary

The C++ source registers the HFC-245fa concentration-constraint input as
HFC245fa_constrain. Every SSP CSV that ships under
inst/input/tables/ exposes the column as HFC245_constrain (missing
the fa suffix). Same CSV uses the correct HFC245fa_emissions for
the emissions column — so the inconsistency is within a single header.

Effect: setData of HFC245fa_constrain from a CSV-backed binding
silently fails to find a matching column. Constraint never binds.

Reproduction

$ git checkout 9631b05f6e139303436c48c9d80ebb8425e88708   # v3.5.0 commit

$ grep -n 'D_CONSTRAINT_HFC245' inst/include/component_data.hpp
170:#define D_CONSTRAINT_HFC245fa HFC245fa_COMPONENT_BASE CONC_CONSTRAINT_EXTENSION

$ grep -n 'HFC245fa_COMPONENT_BASE' inst/include/component_names.hpp
...:#define HFC245fa_COMPONENT_BASE "HFC245fa"

# CONC_CONSTRAINT_EXTENSION is "_constrain", so D_CONSTRAINT_HFC245fa
# expands to the string "HFC245fa_constrain".

$ head -7 inst/input/tables/ssp245_emiss-constraints_rf.csv | tail -1 | tr ',' '\n' | grep HFC245
HFC245fa_emissions    <-- correct "fa" suffix
HFC245_constrain      <-- BUG: missing "fa"

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

Proposed fix

Rename the column from HFC245_constrainHFC245fa_constrain in
every SSP CSV in inst/input/tables/. Matches the C++ constant + the
existing HFC245fa_emissions column in the same header.

If the CSVs are regenerated by JGCRI/hectordata rather than maintained
by hand, the fix lives in hectordata's generation logic — likely a
column-name list using HFC245 where it should use HFC245fa. Happy
to file in hectordata instead if maintainers prefer.

Why "fa" is the canonical form

HFC-245fa is the IUPAC-style designation for 1,1,1,3,3-pentafluoropropane;
the trailing fa isn't optional — it disambiguates from other
pentafluoropropanes (e.g. HFC-245ca, HFC-245eb). The C++ uses the
canonical form (HFC245fa everywhere); the CSV column is the typo.

Impact

  • Direct: Users can't constrain HFC-245fa concentration via the
    standard CSV path. Workaround: rename the column locally + add an
    .ini binding pointing at the renamed column.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions