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 label row.

Profile (and its default GWP factors) is auto-detected from the parser metadata when profile=None. Pass gwp={...} to use custom factors. The aggregation is appended to the baseline E and EY matrices, 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 as CH4 and N2O. Ignored when gwp=... is provided.

  • ipcc_report – IPCC assessment report used to resolve built-in profile GWPs when available. Supported built-in values currently are AR4, AR5, and AR6. At the moment this matters only for gases whose factors vary across reports, such as CH4 and N2O. Ignored when gwp=... is provided.

  • inplace – When True mutate the database in place. When False return a modified copy.

Returns:

Modified database when inplace=False, otherwise None.

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.