calc_emissions_soil: Calculate soil N2O emissions

View source: R/calc_emissions_soil.R

calc_emissions_soilR Documentation

Calculate soil N2O emissions

Description

Estimates direct and indirect N2O emissions from soils due to fertilisation, excreta deposition and crop residues, following a Tier 1-style IPCC approach.

Usage

calc_emissions_soil(
  n_fertilizer_synthetic = 0,
  n_fertilizer_organic = 0,
  n_excreta_pasture = 0,
  n_crop_residues = 0,
  area_ha = NULL,
  soil_type = "well_drained",
  climate = "temperate",
  ef_direct = NULL,
  include_indirect = TRUE,
  gwp_n2o = 273,
  boundaries = NULL
)

Arguments

n_fertilizer_synthetic

Numeric. Synthetic N fertiliser applied (kg N/year). Default = 0.

n_fertilizer_organic

Numeric. Organic N fertiliser applied (kg N/year). Default = 0.

n_excreta_pasture

Numeric. N excreted directly on pasture (kg N/year). Default = 0.

n_crop_residues

Numeric. N in crop residues returned to soil (kg N/year). Default = 0.

area_ha

Numeric. Total farm area (ha). Optional, for per-hectare metrics.

soil_type

Character. "well_drained" or "poorly_drained". Default = "well_drained".

climate

Character. "temperate" or "tropical". Default = "temperate".

ef_direct

Numeric. Direct EF for N2O-N (kg N2O-N per kg N input). If NULL, uses IPCC-style values by soil/climate.

include_indirect

Logical. Include indirect N2O (volatilisation + leaching)? Default = TRUE.

gwp_n2o

Numeric. GWP of N2O. Default = 273 (IPCC AR6).

boundaries

Optional. Object from set_system_boundaries(). If soil is excluded, returns co2eq_kg = 0.

Details

IMPORTANT: When system boundaries exclude soil, this function must return a list with source = "soil" and co2eq_kg = 0 (numeric zero) to match partial-boundaries integration tests.

Value

A list with at least source="soil" and co2eq_kg (numeric), plus detailed breakdown metadata when included by boundaries. Absolute emissions are annual farm-level emissions (kg CO2eq yr-1) within the defined system boundaries.

Examples


# Direct + indirect (default), temperate, well-drained
calc_emissions_soil(
  n_fertilizer_synthetic = 2500,
  n_fertilizer_organic   = 500,
  n_excreta_pasture      = 1200,
  n_crop_residues        = 300,
  area_ha                = 150
)

# Direct-only
calc_emissions_soil(n_fertilizer_synthetic = 2000, include_indirect = FALSE)

# Boundary exclusion example
b <- list(include = c("energy", "manure")) # soil not included
calc_emissions_soil(n_fertilizer_synthetic = 1000, boundaries = b)$co2eq_kg # 0


cowfootR documentation built on Jan. 13, 2026, 5:07 p.m.