Skip to contents

Main dispatcher that runs the full IPCC 2019 livestock emissions pipeline: energy demand (Tier 2), enteric CH4, manure CH4, and manure N2O.

Selects tier automatically: Tier 2 when cohort-level data (weight, diet) are available; Tier 1 otherwise.

WHEP's Tier 2 energy balance covers cattle, buffalo, sheep and goats, the species ipcc_tier2_energy_coefs ships coefficients for. The IPCC 2019 Refinement (Vol. 4 Ch. 10, Table 10.9 (Updated)) suggests Tier 1 for camels, horses, mules and asses and swine, and develops no enteric method for poultry. At Tier 2 those species take Tier 1 by default, with a message and "IPCC_2019_Tier1" in each row's method_* columns, so a Tier 2 run covers the same animals as a Tier 1 run. options$tier2_uncovered selects "leave_na" or "abort" instead.

Usage

calculate_livestock_emissions(data, tier = NULL, options = list())

Arguments

data

Dataframe with at minimum species and heads. For Tier 2, also needs cohort, weight (or iso3), diet_quality, and production columns.

tier

Integer 1 or 2. If NULL (default), auto-selects based on data completeness.

options

A named list of manure-engine options. All but nine defaults reproduce the behaviour in force before whep#949. The exceptions are enteric_ef_source, ef3_source and slurry_crust, which since whep#601 read the 2019 Refinement's Tier 1 enteric factors and direct manure N2O EF3 and move Tier 1 enteric CH4 and both tiers' direct manure N2O, mcf_source, which moved from the shipped table to the 2019 Refinement in whep#1022 and does move Tier 2 manure CH4, mms_shares, which moved from the unsourced placeholder table to the GLEAM 2.0 ingest in whep#958 and does move both tiers' manure N2O, pasture_bo, which since whep#1137 pairs the 2019 pasture MCF with its published Bo and moves Tier 2 manure CH4, and tier2_uncovered, which since whep#1028 gives species with no Tier 2 method their Tier 1 values instead of NA, indirect_n2o_source, which since whep#1245 reads the 2019 Refinement's leaching factors and moves both tiers' indirect manure N2O, and indirect_n2o_fractions, which since whep#1365 weights the Table 10.22 fractions over the manure-management split and moves it again.

indirect_n2o_source selects the edition of indirect_n2o_ef the indirect manure N2O reads:

  • "ipcc_2019" (default): EF5 0.011 and FracLEACH-(H) 0.24, from Vol 4, Ch 11, Table 11.3 (Updated), p. 11.26 of the 2019 Refinement, the current IPCC guidance and the EF5 the nitrogen balance already uses.

  • "ipcc_2006": EF5 0.0075 and FracLEACH-(H) 0.30, from Table 11.3, p. 11.24 of the 2006 Guidelines. These are the values WHEP shipped before whep#1245 under a 2019 citation, kept selectable so earlier figures stay reproducible.

EF4 (0.010) is the same under both. The edition also selects the Ch 11 FracGASM (0.21 in 2019, 0.20 in 2006) the pasture stream is priced at.

indirect_n2o_fractions selects which nitrogen fractions the indirect manure N2O volatilises and leaches:

  • "per_mms" (default): IPCC 2019 Refinement, Vol 4, Ch 10, Eq. 10.26 and 10.27 (Updated), pp. 10.76-10.77. FracGasMS and FracLeachMS per animal category and system, from Table 10.22 (Updated), pp. 10.96-10.97, weighted over the row's own manure-management split, the same split the direct EF3 is weighted over. Pasture/range/paddock N, which Table 10.22 does not cover, is priced at the Ch 11 Table 11.3 FracGASM and FracLEACH-(H) (Eq. 11.9 and 11.10), as the IPCC prices grazing deposition; no other WHEP chain prices it, and the direct path prices the same N at EF3, so it is counted once. The managed-system fractions are the 2019 table's under either edition, as in apply_management_losses(): the 2006 Table 10.22 leaves most pairs blank.

  • "single": one FracGasMS 0.20 (assumed, unverified) and one FracLEACH-(H) on all excreted N, the form before whep#1365. Kept so earlier figures stay reproducible.

method_manure_n2o records both choices, e.g. indirect_ipcc_2019_per_mms or indirect_ipcc_2006_single.

enteric_ef_source selects the Tier 1 enteric CH4 emission factors. Although it sits among the manure-engine options, it governs the enteric path only:

  • "ipcc_2019" (default): ipcc_enteric_ef_tier1, the 2019 Refinement's Tables 10.10 and 10.11 (Updated) as published: cattle and buffalo by IPCC region, and sheep, goats and swine at the productivity system the Table 10.10 footnote assigns the region (high in North America, Europe and Oceania, low elsewhere). A row the edition prices at nothing keeps the as-shipped factor, stamped enteric_ef_as_shipped_fallback.

  • "as_shipped": ipcc_2019_enteric_ef_cattle and ipcc_2019_enteric_ef_other, the 2006 Guidelines' factors with four cells in neither edition, read before whep#601. Kept so earlier figures stay reproducible.

method_enteric records which (enteric_ef_ipcc_2019 or enteric_ef_as_shipped). On FAOSTAT 2020 heads the default raises Tier 1 enteric CH4 from 110.8 to 125.3 Tg. Taking high productivity everywhere instead would give 134.2 Tg, low everywhere 124.2 Tg.

ef3_source selects the direct manure N2O emission factors, at both tiers: "ipcc_2019" (default) or "as_shipped", the two editions of ipcc_manure_ef3.

slurry_crust sets the share of liquid slurry with a natural crust, which mixes the 2019 Table 10.21 (Updated) EF3 with a crust (0.005) and without one (0) into the engine's single "Liquid/Slurry" label: "half" (default, 0.0025, GLEAM 2.0's stated assumption for its pig and chicken slurry, extended to the other species), "none" (0) or "all" (0.005). It has no effect under ef3_source = "as_shipped", whose 0.002 is a single row.

method_manure_n2o records the EF3 choice (ef3_ipcc_2019; slurry_crust_half or ef3_as_shipped). On FAOSTAT 2020 heads the default lowers Tier 1 direct manure N2O from 1.523 to 1.178 Tg.

mms_shares selects which half of regional_mms_distribution the split is read from: "gleam_2_0" (default) is the GLEAM 2.0 Supplement S1 Tab. 4.2-4.11 ingest, "placeholder" the unsourced table it replaced in whep#958. The placeholder stays selectable so the values WHEP published before that ingest remain reproducible and the sensitivity to it stays measurable; it is not a defensible alternative estimate.

mms_region selects how the manure-management split in regional_mms_distribution is keyed:

  • "as_available" (default): a row uses its own region when the frame already carries a region column, and the region == "Global" split otherwise. Tier 1 resolves a region for the (sourced) per-head N-excretion table and so takes the region-specific split; Tier 2 carries no region and so takes the Global one.

  • "resolve": the IPCC region is resolved from iso3, area_code or polity_area_code where it is missing, which makes the table's region-specific rows live on the Tier 2 path too. Opt-in because it changes which rows of the table apply, not because the rows are doubtful: since whep#958 they are the GLEAM 2.0 ingest.

  • "global": every row takes the region == "Global" split, whatever region column it carries.

mcf_source selects which methane conversion factor table the Tier 2 manure CH4 weighting reads:

  • "ipcc_2019" (default): the matching edition rows of climate_mcf_ipcc, read off Table 10.17 (Updated) of the 2019 Refinement, which is the current IPCC guidance.

  • "ipcc_2006": the matching edition rows of climate_mcf_ipcc, read off Table 10.17 of the 2006 Guidelines.

  • "as_shipped": climate_mcf, whose live rows are predominantly the 2006 Guidelines Table 10.17 but with six cells that match no published IPCC value (whep#601, whep#1022). Kept selectable so an older run can be reproduced; it is no longer the default, because values whose provenance could not be established should not be what ships.

Neither edition publishes one number per Cool/Temperate/Warm zone for every system, so both as-published tables apply a stated collapse rule; see climate_mcf_ipcc. Both rules are WHEP's, not the IPCC's, and the default makes them live. method_manure_ch4 records the table used.

pasture_bo selects the methane potential (Bo) the Tier 2 manure CH4 prices the pasture/range/paddock stream at. The 2019 Refinement publishes its single 0.47 percent pasture MCF as half of a pair that "must always be used in conjunction with a B0 value of 0.19" (Vol 4, Ch 10, Table 10.17 (Updated) footnote 2, p. 10.70; Section 10.4.2, p. 10.66); the pair is the paired_bo_m3_kg_vs column of climate_mcf_ipcc (whep#1137).

  • "paired" (default): a stream whose MCF row carries a paired Bo is priced at it, every other stream at the animal-category Bo of ipcc_tier2_bo_values. Only mcf_source = "ipcc_2019" publishes a pair, so under the other two sources this changes nothing.

  • "species": every stream takes the animal-category Bo, the behaviour before whep#1137. Under "ipcc_2019" that is the hybrid the Refinement rejects; kept so the earlier figures stay reproducible and the sensitivity to the pairing stays measurable.

method_manure_ch4 records per row which applied (pasture_bo_paired or pasture_bo_species) wherever the row has manure on a stream that carries a published pair.

climate_source selects where the climate zone the methane conversion factors in the MCF table are read at comes from. A climate_zone a row already carries is always used and stamped climate_from_data; the option governs only the rows left without one, whether that is a hole in a supplied column or a wholly absent column.

  • "assumed" (default): fill with assumed_climate_zone.

  • "from_data": abort instead of assuming.

assumed_climate_zone is the zone "assumed" fills in: "Cool", "Temperate" (default) or "Warm". It is an assumption, not a measurement; method_manure_ch4 records per row which of the sources applied, and this argument exists so the sensitivity to the assumption can be measured (whep#949).

tier2_uncovered says what the Tier 2 path does with a species WHEP has no Tier 2 method for. The energy balance needs the maintenance and activity coefficients of Tables 10.4 and 10.5, which ipcc_tier2_energy_coefs ships for cattle, buffalo, sheep and goats only; the 2019 Refinement itself suggests Tier 1 for camels, horses, mules and asses and swine and has no enteric method for poultry (Vol. 4 Ch. 10, Table 10.9 (Updated)), and its Tier 2 manure equations for swine and poultry need a country-specific dry-matter intake (Equation 10.32A) that WHEP does not hold. Although it sits among the manure-engine options, it governs the enteric path too.

  • "tier1" (default): those species take the Tier 1 enteric CH4, manure CH4 and manure N2O, written into the Tier 2 output columns and stamped "IPCC_2019_Tier1" in method_enteric, method_manure_ch4 and method_manure_n2o, with a message naming them. This is the IPCC's own suggested method for them, so a Tier 2 inventory keeps the whole herd rather than silently covering fewer animals than Tier 1.

  • "leave_na": they keep NA emissions, the behaviour before whep#1028, with a warning naming them. Kept so a ruminant-only Tier 2 figure stays reproducible.

  • "abort": any such species aborts, naming it.

Value

Dataframe with all emission columns, method tracking, and original data columns preserved.

Examples

tibble::tibble(
  species = "Dairy Cattle",
  cohort = "Adult Female",
  heads = 1000,
  weight = 600,
  diet_quality = "High",
  milk_yield_kg_day = 20
) |>
  calculate_livestock_emissions() |>
  dplyr::select(species, cohort, heads,
    enteric_ch4_tier2, manure_ch4_tier2,
    manure_n2o_total)
#> # A tibble: 1 × 6
#>   species      cohort  heads enteric_ch4_tier2 manure_ch4_tier2 manure_n2o_total
#>   <chr>        <chr>   <dbl>             <dbl>            <dbl>            <dbl>
#> 1 Dairy Cattle Adult …  1000           126919.           16287.            1983.