mario.Database.calc_ghg#
- Database.calc_ghg(profile=None, gwp=None, label='GHG', unit=None, time_horizon=100, ipcc_report='AR6', inplace=True)#
Aggregate satellite GHG accounts into a new
labelrow.Profile (and its default GWP factors) is auto-detected from the parser metadata when
profile=None. Passgwp={...}to use custom factors. The aggregation is appended to the baselineEandEYmatrices, registered as a new satellite account and followed by a recalculation of dependent matrices.- Parameters:
profile – Registered profile name (see
mario.ops.GHG_PROFILES).gwp – Optional
{satellite-account: factor}mapping that overrides the profile defaults.label – Satellite-account label used for the aggregated row.
unit – Optional unit override. When omitted, the new row reuses the shared unit of the aggregated satellite accounts.
time_horizon – Time horizon used to resolve built-in profile GWPs when available. Default is
100. At the moment this matters only for built-in profile gases whose factors vary across horizons, such asCH4andN2O. Ignored whengwp=...is provided.ipcc_report – IPCC assessment report used to resolve built-in profile GWPs when available. Supported built-in values currently are
AR4,AR5, andAR6. At the moment this matters only for gases whose factors vary across reports, such asCH4andN2O. Ignored whengwp=...is provided.inplace – When
Truemutate the database in place. WhenFalsereturn a modified copy.
- Returns:
Modified database when
inplace=False, otherwiseNone.- Return type:
Database | None
Note
time_horizon and ipcc_report are used only when
Database.calc_ghg(...) resolves a built-in profile. In the current
built-in registry this affects gases such as CH4 and N2O; scalar
entries such as CO2 and total GHG remain unchanged. When a custom
flat gwp={...} mapping is passed, the method keeps the previous
behavior and ignores these two arguments.