Livestock & Grazing

Overview

The livestock module models animal product production (meat, dairy, eggs) through two distinct production systems:

  • Grazing-based: Animals feed on managed grasslands

  • Feed-based: Animals consume crops as concentrated feed

Animal Products

The model includes seven major animal product categories configured in config/default.yaml:

animal_products:
  include:
  - meat-cattle
  - meat-pig
  - meat-chicken
  - dairy
  - eggs
  - dairy-buffalo
  - meat-sheep
  # GLEAM 3.0 production system → model product mapping.
  # Defines which model products each (Animal, LPS) system contributes to.
  # Multi-product systems (e.g. cattle grazing → dairy + meat) are split
  # using FCR-weighted shares in the feed baseline.
  #
  # Sheep/goat milk is proxied through "dairy" (cattle milk pathway) rather
  # than modeled as a separate product. At ~3-4% of global milk production
  # the volume doesn't justify a distinct product with its own efficiency,
  # emissions, and nutritional profile. The feed accounting is still correct:
  # GLEAM3 sheep/goat feed intake is captured in the dairy baseline, and
  # FAOSTAT dairy production (see faostat_items.dairy) includes sheep/goat
  # milk. The production-based scaling step reconciles any efficiency mismatch.
  gleam3_system_product_map:
    Cattle:
      Grassland: [dairy, meat-cattle]
      Mixed: [dairy, meat-cattle]
      Feedlots: [meat-cattle]
    Buffalo:
      Grassland: [dairy-buffalo, meat-cattle]
      Mixed: [dairy-buffalo, meat-cattle]
    Sheep:
      Grassland: [dairy, meat-sheep]
      Mixed: [dairy, meat-sheep]
    Goats:
      Grassland: [dairy, meat-sheep]
      Mixed: [dairy, meat-sheep]
    Chicken:
      Broiler: [meat-chicken]
      Layer: [eggs]
      Backyard: [eggs, meat-chicken]
    Pigs:
      Backyard: [meat-pig]
      Intermediate: [meat-pig]
      Industrial: [meat-pig]
  # For multi-product species (cattle, buffalo, chicken, sheep/goats),
  # the Wirsenius scaling factor f splits total GLEAM3 feed between
  # co-products. Countries with f far from the regional median likely
  # reflect GLEAM3 data quality issues rather than real efficiency
  # differences. This factor clamps f to [median/k, median*k] where k
  # is the value below. Set to a large value (e.g. 100) to disable.
  me_scaling_clamp_factor: 2.0
  # Ruminant net-to-metabolizable energy conversion efficiency factors
  # Used to convert net energy (NE) requirements to metabolizable energy (ME) requirements
  # Based on NRC (2000) typical values for mixed diets
  # ME_required = NE_m/k_m + NE_g/k_g (+ NE_l/k_l for dairy)
  # TODO: Should check the reference for this.
  net_to_metabolizable_energy_conversion:
    k_m: 0.60  # Maintenance efficiency
    k_g: 0.40  # Growth efficiency
    k_l: 0.60  # Lactation efficiency (dairy)
  # Carcass-to-retail meat conversion factors
  carcass_to_retail_meat:
    meat-cattle: 0.67  # kg boneless retail beef per kg carcass (OECD-FAO 2023)
    meat-pig: 0.73     # kg boneless retail pork per kg carcass (OECD-FAO 2023)
    meat-chicken: 0.60 # kg boneless retail chicken per kg carcass (OECD-FAO 2023)
    eggs: 1.00         # No conversion needed (whole egg = retail product)
    dairy: 1.00        # No conversion needed (whole milk = retail product)
    meat-sheep: 0.63   # kg boneless retail lamb per kg carcass (slightly lower than beef)
    dairy-buffalo: 1.00 # No conversion needed (whole milk = retail product)
  # FAOSTAT QCL item names to aggregate for each model product.
  # First item is the primary product; additional items are proxied species
  # whose production is lumped into the model product.
  faostat_items:
    dairy:
      - "Raw milk of cattle"
      - "Raw milk of goats"       # proxy: goat milk → dairy
      - "Raw milk of sheep"       # proxy: sheep milk → dairy
      - "Raw milk of camel"       # proxy: camel milk → dairy
    meat-cattle:
      - "Meat of cattle with the bone, fresh or chilled"
      - "Meat of buffalo, fresh or chilled"   # proxy: buffalo → cattle
    meat-pig:
      - "Meat of pig with the bone, fresh or chilled"
    meat-chicken:
      - "Meat of chickens, fresh or chilled"
      - "Meat of ducks, fresh or chilled"            # proxy: duck → chicken
      - "Meat of turkeys, fresh or chilled"           # proxy: turkey → chicken
      - "Meat of pigeons and other birds n.e.c., fresh, chilled or frozen"
    eggs:
      - "Hen eggs in shell, fresh"
    dairy-buffalo:
      - "Raw milk of buffalo"
    meat-sheep:
      - "Meat of sheep, fresh or chilled"
      - "Meat of goat, fresh or chilled"              # proxy: goat → sheep
  residue_crops:
  - banana
  - barley
  - chickpea
  - cowpea
  - dry-pea
  - dryland-rice
  - foxtail-millet
  - gram
  - maize
  - oat
  - pearl-millet
  - phaseolus-bean
  - pigeonpea
  - rye
  - sorghum
  - sugarcane
  - wetland-rice
  - wheat

fodder_decomposition:
  fdd_crops:
    - alfalfa
    - silage-maize
  eurostat:
    averaging_years: 5
  suitability_blend_weight: 0.7
  yield_corrections:
    enabled: true
    eurostat_moisture: 0.65
    floor: 0.2
    ceiling: 2.0

grazing:
  enabled: true
  isimip_utilization_rate: 0.60 # Applied to ISIMIP yields in merge step
  forage_overlap_crops:
  - alfalfa
  - silage-maize
  - biomass-sorghum
  grassland_forage_calibration:
    enabled: true
    generate: false
    grassland_yield_correction: "data/curated/calibration/grassland_yield.csv"
    fodder_conversion_correction: "data/curated/calibration/fodder_conversion.csv"
    exogenous_forage: "data/curated/calibration/exogenous_forage.csv"
    scenario: "default"

Each product can be produced via either production system, with different feed requirements and efficiencies.

Production Systems

Grazing-Based Production

Concept: Animals graze on managed grasslands, converting grass biomass to animal products.

Inputs:
  • Land (per region and resource class, similar to cropland)

  • Managed grassland yields from ISIMIP LPJmL model

Process:
  1. Grassland yields (t dry matter/ha/year) are computed per region and resource class

  2. Feed conversion ratios translate grass biomass → animal products

  3. Land allocation to grazing competes with cropland expansion

Configuration: Enable/disable grazing with grazing.enabled: true

Feed-Based Production

Concept: Animals consume crops (grains, soybeans, etc.) as concentrated feed.

Inputs:
  • Crops from crop production buses

  • Feed conversion ratios (kg crop → kg animal product)

Process:
  1. Crops are allocated to animal feed (competing with direct human consumption)

  2. Feed conversion links transform crop inputs to animal products

  3. Multiple crops can contribute (e.g., maize + soybean for poultry)

Grassland Yields

Grazing supply is determined by managed grassland yields from the ISIMIP LPJmL historical simulation.

Data Source

Dataset: ISIMIP2b managed grassland yields (historical)

Resolution: 0.5° × 0.5° gridded annual yields

Variable: Above-ground dry matter production (t/ha/year)

Processing: workflow/scripts/build_grassland_yields.py

Aggregation follows the same resource class structure as crops:

  1. Load grassland yield NetCDF

  2. Aggregate by (region, resource_class) using area-weighted means

  3. Output CSV with yields in t/ha/year

Pasture Utilization

The model assumes that only a portion of the total grassland biomass production is available for grazing livestock. This reflects the need to leave biomass for regrowth, soil protection, and ecosystem function (“take half, leave half” principle). The correction is applied upstream in the merge_grassland_yields step so that the yield column in the merged output is already effective feed yield:

  • LUIcube rows: yield is multiplied by the per-cell grazing_intensity from LUIcube data.

  • ISIMIP rows: yield is multiplied by a fixed utilization rate (default 50%).

  • Parameter: grazing.isimip_utilization_rate in configuration (applied to ISIMIP fallback yields).

This value is consistent with the GLOBIOM model, which assumes a 50% grazing efficiency for grass in native grasslands [3]. While intensive dairy systems can achieve higher utilization (up to 70-80%), global rangeland management guidelines typically recommend utilization rates below 50% to prevent degradation.

Managed grassland yield potential

Global distribution of managed grassland yield potential (tonnes dry matter per hectare per year) from ISIMIP LPJmL historical simulations

Feed Conversion

The model uses feed conversion ratios to link feed inputs to animal outputs, with explicit categorization by feed quality to enable accurate CH₄ emissions tracking.

Feed System Architecture

The feed system uses seven distinct feed pools that combine animal type with feed quality:

  • Ruminant pools: ruminant_roughage, ruminant_forage, ruminant_grain, ruminant_protein

  • Monogastric pools: monogastric_low_quality, monogastric_grain, monogastric_protein

This categorization enables the model to:

  1. Differentiate methane emissions using GLEAM feed digestibility classes (roughage/forage vs. grain/protein)

  2. Route crops, residues, and processing byproducts to appropriate feed pools based on nutritional properties

  3. Model production system choices (e.g., roughage-dominated beef vs. high-grain finishing rations)

  4. Distinguish between grazing (grassland) and confinement feeding systems for nitrogen management

Feed Properties (Generated from GLEAM)

Feed properties (digestibility, metabolizable energy, protein content) are automatically generated from GLEAM 3.0 data during workflow execution. The workflow produces two files in processing/{name}/:

  • ruminant_feed_properties.csv: Properties for all feeds used by ruminants

  • monogastric_feed_properties.csv: Properties for all feeds used by monogastrics

Each file contains:

  • feed_item: Item name (e.g., “maize”, “wheat-bran”)

  • source_type: Either “crop” or “food” (byproduct)

  • digestibility: Digestible fraction (0-1)

  • ME_MJ_per_kg_DM: Metabolizable energy (MJ per kg dry matter)

  • CP_pct_DM: Crude protein (% of dry matter)

  • ash_pct_DM: Ash content (% of dry matter)

  • NDF_pct_DM: Neutral detergent fiber (% of dry matter)

These properties are extracted from the GLEAM 3.0 supplement using data/curated/gleam/feed_mapping.csv to map between model feed items and GLEAM feed categories.

Feed quality categories (assigned based on nitrogen content and digestibility):

  • Ruminant feeds:

    • Protein: High nitrogen content (>50 g N/kg DM) - protein meals such as rapeseed-meal, oilseed-meal, soybean meal (assigned by N content; takes precedence over digestibility)

    • Roughage: Low digestibility (<0.55), high-fiber forages (crop residues, straw)

    • Forage: Medium digestibility (0.55-0.70), improved forages and grassland (silage maize, alfalfa, pasture)

    • Grain: High digestibility (0.70-0.90), energy concentrates (maize, wheat, barley)

  • Monogastric feeds:

    • Protein: High nitrogen content (>35 g N/kg DM) - protein meals such as soybean meal, fish meal, rapeseed-meal (assigned by N content; takes precedence over energy)

    • Low quality: Low metabolizable energy (<11 MJ/kg DM), bulky feeds and byproducts

    • Grain: Medium energy (11-15.5 MJ/kg DM), cereal grains

    • Energy: High energy (>15.5 MJ/kg DM), fats and high-energy feeds

Categorization logic: Both ruminant and monogastric feeds prioritize nitrogen content to identify protein feeds, ensuring high-protein oilseed meals are correctly classified regardless of digestibility. For feeds below the nitrogen threshold, ruminants use digestibility ranges while monogastrics use metabolizable energy thresholds.

Byproducts from food processing (with source_type=food) are automatically excluded from human consumption and can only be used as animal feed.

Feed Conversion Efficiencies

Feed conversion efficiencies (tonnes retail product per tonne feed DM) are derived per country from GLEAM 3.0 feed intake and production data, combined with GLEAM 3.0 feed category energy values. The pipeline has two stages: first, per-country ME requirements are computed from GLEAM3; then, these are combined with per-category feed energy contents to produce conversion efficiencies.

ME Requirements from GLEAM3

The script compute_gleam3_me_requirements.py derives metabolizable energy (ME) requirements per kg product for each country and product. For each country, the total feed ME intake of a species is computed from GLEAM3 intake data (kg DM × ME per kg DM for each feed category), then divided among the species’ products to obtain ME per kg product output.

Backyard “Other non-edible” correction. GLEAM3 reclassifies regular grains and crops (wheat, maize, barley, etc.) as “Other non-edible” in Backyard monogastric systems, because these feeds are locally sourced or scavenged rather than commercially purchased. In non-Backyard systems, the same category contains only genuinely non-feed supplements (synthetic amino acids, fishmeal, limestone) plus swill. The ME computation accounts for this LPS-dependent composition: Backyard “Other non-edible” uses the grain category ME (since reclassified grains dominate ~93% of backyard non-edible intake globally), while non-Backyard “Other non-edible” uses swill ME from GLEAM Table S.3.4 (13.0 MJ/kg DM for chicken, 10.5 MJ/kg DM for pigs).

Multi-product splitting. Most animal species produce multiple model products simultaneously (e.g. cattle produce both dairy and meat). The total system ME must be allocated between these co-products. Wirsenius (2000) [1] provides regional dairy-to-meat energy ratios (see table below) that serve as the proportional guide, while GLEAM3 sets the absolute level:

\[f_\text{cattle} = \frac{\text{ME}_\text{feed,GLEAM3}} {W_\text{dairy} \times \text{prod}_\text{milk} + W_\text{meat} \times \text{prod}_\text{meat}}\]

where \(W_\text{dairy}\) and \(W_\text{meat}\) are Wirsenius reference ME values, and \(f\) is a country-specific scaling factor applied to both products. This preserves the Wirsenius dairy:meat ratio while anchoring the absolute ME to observed GLEAM3 feed intake.

For ruminant products, the Wirsenius net-energy values (NE) are first converted to metabolizable energy using NRC (2000) efficiency factors from config (animal_products.net_to_metabolizable_energy_conversion):

  • k_m = 0.60 — maintenance efficiency

  • k_g = 0.40 — growth efficiency

  • k_l = 0.60 — lactation efficiency (dairy only)

For monogastric products (pigs, chicken), Wirsenius values are already in ME and the conversion step is skipped. Single-product species (pigs) are computed directly as total feed ME / total production.

Sheep/goat milk proxy. Sheep and goat milk (~3–4% of global production) is proxied through the cattle dairy product rather than modeled separately. For ME derivation, the Wirsenius cattle dairy:meat ME ratio is used to split sheep/goat system feed between milk (folded into the dairy product) and meat-sheep, using the same scaling-factor approach as for cattle. This replaces an earlier residual method that was numerically unstable for countries with extreme sheep milk:meat ratios. See the config comment on gleam3_system_product_map for the rationale.

Scaling-factor clamping. The factor \(f\) measures how much a country’s total feed intensity deviates from its Wirsenius regional average. Small countries with limited GLEAM3 data can produce extreme \(f\) values that translate to unrealistic per-product ME (e.g. Montenegro at \(f = 0.24\) would imply a dairy ME of 4.1 MJ/kg). To guard against this, \(f\) is clamped to the range \([\text{median}/k,\; \text{median} \times k]\) where the median is taken over countries in the same Wirsenius region and \(k\) is the config parameter animal_products.me_scaling_clamp_factor (default 2.0). The clamping applies to all multi-product species groups (cattle, buffalo, chicken, sheep/goats).

Fallback. Countries without sufficient GLEAM3 data for a species receive the production-weighted global average ME for that product.

Output: processing/{name}/gleam3_me_requirements.csv with columns animal_product, country, ME_MJ_per_kg (at carcass/farm-gate level).

Efficiency Calculation

The script build_feed_to_animal_products.py converts ME requirements to feed conversion efficiencies. Units at each stage:

  • Feed inputs: Dry matter (tonnes DM)

  • Animal product outputs: Fresh weight, retail meat (tonnes fresh weight)

    • For meats: retail/edible meat weight (boneless, trimmed) — not carcass

    • For dairy: whole milk (fresh weight)

    • For eggs: whole eggs (fresh weight)

GLEAM3 ME requirements are at carcass/farm-gate level. Carcass-to-retail conversion factors (from OECD-FAO Agricultural Outlook 2023-2032, Box 6.1 [2]) are applied to obtain feed requirements per kg retail meat:

  • Cattle meat: 0.67 kg boneless retail per kg carcass

  • Sheep meat: 0.63 kg boneless retail per kg carcass

  • Pig meat: 0.73 kg boneless retail per kg carcass

  • Chicken meat: 0.60 kg boneless retail per kg carcass

  • Eggs, dairy, & buffalo milk: 1.00 (no conversion, already retail products)

This increases feed requirements per kg retail meat by ~33–50% compared to per kg carcass, reflecting bone removal and trimming losses.

The final efficiency for each (country, product, feed_category) triple:

\[\text{efficiency} = \frac{\text{ME}_\text{feed} \;[\text{MJ/kg DM}]} {\text{ME}_\text{product,retail} \;[\text{MJ/kg retail}]}\]

This gives tonnes of retail product per tonne of feed DM. Each product × feed-category combination yields a distinct efficiency, allowing the model to represent different production systems (grass-fed vs. grain-finished beef, pasture vs. intensive dairy, etc.).

Output: processing/{name}/feed_to_animal_products.csv with columns:

  • country: ISO 3166-1 alpha-3 country code

  • product: Product name (e.g., “meat-cattle”, “dairy”)

  • feed_category: Feed pool (e.g., ruminant_forage, monogastric_grain)

  • efficiency: Feed conversion efficiency (t product / t feed DM)

Regional Feed Energy Requirements (Wirsenius reference)

Feed requirements vary significantly by region due to differences in production systems, genetics, and environmental conditions. Wirsenius (2000) [1] provides estimated feed energy requirements per unit of commodity output. These values serve as reference ratios for splitting multi-product systems in the GLEAM3 ME derivation described above:

Feed energy requirements per unit of animal product output (Wirsenius 2000, Table 3.9)

Commodity

Unit

East Asia

East Europe

Latin America & Carib.

North Africa & W. Asia

North America & Oc.

South & Central Asia

Sub- Saharan Africa

West Europe

Cattle milk & cow carcass (MJ per kg whole milk & carcass as-is)

NE_l NE_m NE_g

8.2 2.3 0.46

8.2 1.3 0.45

11 1.9 0.30

12 2.0 0.32

5.3 1.1 0.50

11 2.5 0.32

23 5.4 0.70

5.6 1.3 0.52

Dairy bulls & heifers carcass (MJ per kg carcass as-is)

NE_m NE_g

187 22

47 14

143 24

130 21

53 16

344 19

211 20

41 16

Beef carcass (MJ per kg carcass as-is)

NE_m NE_g

288 25

141 19

236 28

262 23

109 23

479 20

352 21

103 23

Pig carcass (MJ per kg carcass-side as-is)

ME

86

84

131

86

65

115

123

64

Eggs & hen carcass (MJ per kg whole egg & carcass as-is)

ME

43

42

39

43

32

53

56

30

Meat-type chicken carcass (MJ per kg eviscerated carcass as-is)

ME

60

56

51

61

42

72

77

38

Energy types:
  • NE_l: Net energy for lactation (dairy production)

  • NE_m: Net energy for maintenance (basic metabolism)

  • NE_g: Net energy for growth (body mass gain)

  • ME: Metabolizable energy (for monogastrics)

Notes:
  • Values calculated from productivity estimates in Wirsenius (2000) Table 3.8

  • Regional variation reflects differences in production systems, breed genetics, climate, and management practices

  • Sub-Saharan Africa shows significantly higher requirements due to less intensive production systems

  • North America and Western Europe have lowest requirements, reflecting highly optimized industrial systems

Baseline Feed Intake

To ground the livestock module in observed feed flows, the model constructs a country-level baseline from FAO’s GLEAM 3.0 model [4] [5] that describes how much dry-matter feed of each category each animal product consumed in the reference year. GLEAM 3.0 provides country-level data for 229 countries (reference year 2015), eliminating the need for the OECD/Non-OECD disaggregation required by the earlier GLEAM 2.0 data. In validation mode this baseline can pin the model to observed feed mixes; in optimisation runs it serves as a reference point for comparison with solved results.

The script workflow/scripts/prepare_feed_baseline.py produces processing/{name}/feed_baseline.csv.

Data Sources

  • GLEAM 3.0 feed intakes (data/bundled/gleam3/intakes.csv): Country-level dry-matter feed intake by species (Cattle, Buffalo, Sheep, Goats, Chicken, Pigs), production system (Grassland, Mixed, Feedlots, Layer, Broiler, Backyard, Intermediate, Industrial), and feed category (Grains, Oil seed cakes, Grass and leaves, Crop residues, Fodder crop, By-products, Other edible, Other non-edible). Global total: ~6,208 Mt DM.

  • GLEAM 3.0 production (data/bundled/gleam3/production.csv): Country-level animal product output (meat carcass weight, milk/egg weight) per species and production system, used for FCR-weighted product splitting.

  • Feed fractions (processing/{name}/gleam3_feed_fractions.csv): Pre-computed mapping from GLEAM3 aggregate feed categories to model feed categories, produced by compute_gleam3_feed_fractions.py. Most categories have constant 1:1 mappings; By-products and Other edible use country-varying fractions estimated from FAOSTAT crop production volumes.

  • GLEAM3-derived ME requirements (processing/{name}/gleam3_me_requirements.csv): Per-country metabolizable energy requirements per kg product, used as FCR weights for product splitting.

  • FAOSTAT QCL: National animal product output for 2015 (the GLEAM 3.0 reference year) and the model’s configured reference year (baseline_year). Used for product splitting and temporal scaling.

Processing Pipeline

GLEAM 3.0 country-level intakes are converted to a country × product × feed-category matrix through the following steps.

Step 1 — Product split for multi-product systems

The mapping from GLEAM3 (Animal, LPS) systems to model products is defined in animal_products.gleam3_system_product_map in the configuration. Several systems serve more than one model product simultaneously: Cattle Grassland and Mixed systems supply dairy and meat-cattle; Buffalo systems supply dairy-buffalo and meat-cattle; Sheep and Goat systems supply dairy and meat-sheep (sheep/goat milk is proxied through the cattle dairy pathway); Chicken Backyard systems supply both eggs and meat-chicken.

Feed is allocated between co-products in proportion to their energy demand, using GLEAM3 per-LPS production data and per-country ME requirements:

\[\text{product\_share}_{p} = \frac{\text{production}_{c,p,\text{LPS}} \times \text{ME}_{c,p}} {\sum_{p'} \text{production}_{c,p',\text{LPS}} \times \text{ME}_{c,p'}}\]

Countries with no GLEAM3 production data for a system fall back to FAOSTAT production ratios. Cattle Feedlots map 100% to meat-cattle (finishing only).

Step 2 — Feed category mapping

Each GLEAM3 aggregate feed category is mapped to one or more model feed categories using pre-computed fractions:

GLEAM3 category

Animal type

Model category

Exogenous

Grains

ruminant / monogastric

ruminant_grain / monogastric_grain

No

Oil seed cakes

ruminant / monogastric

ruminant_protein / monogastric_protein

No

Crop residues

ruminant / monogastric

ruminant_roughage / monogastric_low_quality

No

Grass and leaves

ruminant / monogastric

ruminant_forage / monogastric_low_quality

No

Fodder crop

ruminant

ruminant_forage

No

By-products

both

Country-varying (bran → grain, DDGS → forage/protein, molasses → grain)

No

Other edible

monogastric

Country-varying (cassava/banana → grain, soy/pulses → protein)

No

Other non-edible

monogastric

monogastric_low_quality

Yes

Other non-edible (~180 Mt DM, ~14% of monogastric feed). In non-Backyard systems this consists of synthetic amino acids, minerals, limestone, fishmeal, and swill. In Backyard systems, GLEAM3 additionally reclassifies locally sourced grains and crops into this category (see the backyard correction in Feed Conversion Efficiencies). The entire amount is marked as exogenous in the feed baseline since these feeds have no endogenous crop-based production route in the model.

Grass and leaves maps 100% to ruminant_forage. The grassland forage calibration mechanism (see Grassland Forage Calibration) detects any forage shortfall from the leaves/browse component and creates exogenous supply to compensate.

Step 3 — Scaling to the reference year

The GLEAM 3.0 baseline reflects 2015 conditions. If the configured reference year differs from 2015, country- and product-level feed intakes are scaled using FAO production trends:

\[\text{feed}_{\text{ref}} = \text{feed}_{2015} \times \frac{\text{production}_{\text{ref}}} {\text{production}_{2015}}\]

Step 4 — Production-based feed scaling

The pipeline rescales feed quantities per (country, product) so that the implied animal output matches FAOSTAT production data. This preserves GLEAM 3.0’s feed composition (the relative split across feed categories) while correcting absolute feed levels to observed production:

\[\begin{split}\begin{aligned} \text{implied}_{c,p} &= \sum_f \text{feed}_{c,p,f} \times \text{efficiency}_{c,p,f} \\[6pt] \text{scale}_{c,p} &= \frac{\text{FAOSTAT}_{c,p}} {\text{implied}_{c,p}} \\[6pt] \text{feed_scaled}_{c,p,f} &= \text{feed}_{c,p,f} \times \text{scale}_{c,p} \end{aligned}\end{split}\]

The efficiencies used here are the uncalibrated values from feed_to_animal_products.csv. Scale factors outside the range [0.3, 3.0] are logged as potential data inconsistencies in the GLEAM disaggregation (e.g., a mismatch between GLEAM’s regional feed totals and FAOSTAT’s country-level production data). If FAOSTAT reports zero production for a (country, product) pair, all feed is set to zero; if the implied production is zero but FAOSTAT is positive, the scale factor defaults to 1.0 and a warning is logged.

Output

processing/{name}/feed_baseline.csv contains one row per (country, product, feed category) combination:

  • country: ISO 3166-1 alpha-3 country code

  • product: Animal product (dairy, dairy-buffalo, meat-cattle, meat-sheep, eggs, meat-chicken, meat-pig)

  • feed_category: Feed pool (e.g., ruminant_forage, ruminant_grain, monogastric_protein)

  • feed_use_mt_dm: Dry-matter feed consumption (Mt DM) in the reference year

  • exogenous_mt_dm: Portion of feed demand that must be supplied exogenously (Mt DM) — primarily Other non-edible for monogastrics (synthetic amino acids, minerals, limestone, fishmeal)

All (country, product, feed category) combinations are always present, including zeros, so every animal production link in the model has an explicit baseline entry.

When feed efficiency calibration is enabled (see Calibration), the calibrated baseline is written to processing/{name}/feed_baseline.csv and the calibrated efficiencies to processing/{name}/feed_to_animal_products.csv.

Model Integration

The baseline participates in the model in two distinct ways:

  1. Validation mode: When validation.enforce_baseline_feed: true, the baseline feed quantities are imposed as equality constraints on the model, fixing the feed mix to GLEAM-derived estimates. This removes a degree of freedom and is useful for diagnosing supply-side inconsistencies—any imbalance shows up as feed slack (see Feed Breakdown).

  2. Optimisation mode: The model is free to choose any feed mix within the bounds set by available supply and feed conversion efficiencies. The baseline is not enforced but is available for post-hoc comparison with solved solutions.

Exogenous Feed Supply

Some GLEAM 3.0 feed types have no endogenous supply route in the model:

  • Other non-edible (~180 Mt DM globally): Synthetic amino acids, minerals, limestone, and fishmeal consumed by monogastrics, mapped to monogastric_low_quality.

These are tracked in the exogenous_mt_dm column of the baseline and supplied via exogenous_feed generators on the corresponding feed buses (named supply:exogenous_{category}:{country}).

In validation mode, these generators are fixed at the baseline amount (forced dispatch). In optimisation mode, they are extendable up to the baseline amount at zero marginal cost, allowing the solver to use them if beneficial but not requiring it.

Calibration

The uncalibrated baseline and feed efficiencies inevitably produce supply–demand gaps when tested in the full model: regional mismatches between grassland output and ruminant forage demand are the primary source. The calibration pipeline uses a validation solve to diagnose these gaps via slack variables and compute corrections.

Grassland Area Determination

The model uses two independent corrections to determine grassland area and production:

  1. Area: FAOSTAT “permanent meadows and pastures” (Item 6655) provides ground-truth pasture area per country. Satellite-derived grassland area (from ESA CCI / LUIcube) is scaled down uniformly per country to match FAOSTAT, since satellite data systematically overestimates agricultural pasture by including non-agricultural grassland (alpine meadows, CRP land, ungrazed shrub-grassland).

  2. Production balance: A proportional forage calibration adjusts grassland yield and fodder conversion efficiency to match supply to demand.

The FAOSTAT area cap is applied in build_model.py before any downstream functions, so all components (generators, spare links, land budget) inherit the corrected area.

Grassland Forage Calibration

Grassland forage calibration addresses remaining mismatches between forage supply (grassland + fodder crops) and ruminant forage demand after the FAOSTAT area cap.

Algorithm (implemented in workflow/scripts/compute_grassland_calibration.py):

  1. Solve the model with uncalibrated parameters (FAOSTAT area cap applied, but no yield/efficiency corrections).

  2. Per country, extract forage slack from feed:ruminant_forage:{country} buses and attribute surplus proportionally between grassland and fodder crops based on their shares of total supply:

    • Surplus countries (supply > demand): Both grassland yield and fodder conversion efficiency receive the same correction factor:

      \[\text{factor}_c = \frac{\text{demand}_c}{\text{total\_supply}_c}\]

      This produces yield_correction (applied to grassland_production link efficiencies) and fodder_conversion_correction (applied to feed_conversion link efficiencies for forage crops).

    • Deficit countries (demand > supply): An exogenous forage source covers the shortfall:

      \[\text{exogenous\_forage}_c = \text{deficit}_c\]
  3. Three separate output files:

    • grassland_yield_correction.csv — per-country factor [0, 1]

    • fodder_conversion_correction.csv — per-country factor [0, 1]

    • exogenous_forage.csv — per-country Mt DM

Configuration:

grazing:
  grassland_forage_calibration:
    enabled: true
    generate: false
    grassland_yield_correction: "data/curated/calibration/grassland_yield.csv"
    fodder_conversion_correction: "data/curated/calibration/fodder_conversion.csv"
    exogenous_forage: "data/curated/calibration/exogenous_forage.csv"
    scenario: "default"

The figure below shows the grassland calibration results. yield_correction is one-sided: values run from 0 to 1 and only reduce effective grassland yield (never increase it). Countries with forage deficits are additionally flagged via hatching, indicating reliance on exogenous_forage_mt_dm after endogenous grassland supply is exhausted.

Map of grassland forage yield correction by country

Grassland forage calibration by country. Colour indicates the yield_correction factor applied to grassland yields (1.0 = no adjustment; lower values = stronger downward correction). Countries receiving exogenous forage (exogenous_forage_mt_dm > 0) are marked with hatching.

Calibration Pipeline

The calibration pipeline avoids circular dependencies by defining a dedicated uncalibrated scenario whose effective configuration disables grassland forage calibration:

  1. Phase 1 — Uncalibrated solve: The uncalibrated scenario sets grassland_forage_calibration.enabled: false. Building and solving this scenario produces the uncalibrated model with the FAOSTAT area cap but no yield/efficiency corrections. compute_grassland_calibration writes yield corrections, fodder conversion corrections, and exogenous forage amounts to the configured paths.

  2. Phase 2 — Calibrated model: All other scenarios (including default) apply all three calibration files.

Pre-computed calibration files are stored under data/curated/calibration/ so they can be reused across configurations without re-running the validation solve. Set generate: true in the relevant configuration block to re-generate them (requires a full validation solve).

Model Implementation

In workflow/scripts/build_model.py, livestock production is represented as multi-bus links:

Crop Residue Feed Supply

Crop residues (e.g., straw, stover, pulse haulms) are now generated explicitly using the new Snakemake rule build_crop_residue_yields:

  • Configuration: Select residue crops via animal_products.residue_crops in config/default.yaml. Only crops present in config.crops are processed.

  • Data sources: - GLEAM Supplement S1 Table S.3.1 (slope/intercept) and Tables 3.3 / 3.6 (FUE factors) - GLEAM feed codes → model mapping in data/curated/gleam/feed_mapping.csv

  • Outputs: Per-crop CSVs at processing/{name}/crop_residue_yields/{crop}.csv with net dry-matter residue yields (t/ha) by region, resource class, and water supply.

  • Integration: build_model reads all residue CSVs, adds residue_{feed_item}_{country} buses, and attaches them as additional outputs on crop production links. Residues flow through the same feed supply logic as crops/foods and enter the appropriate feed pools or soil incorporation.

Residue Removal Limits for Feed

To maintain soil health and prevent land degradation, the model constrains the fraction of crop residues that can be removed for animal feed. The majority of residues must be left on the field and incorporated into the soil to maintain organic matter and nutrient cycling.

Constraint formulation:

  • Maximum feed removal: 30% of generated residues (configurable via residues.max_feed_fraction; override per ISO3 country or M49 region/sub-region via residues.max_feed_fraction_by_region with country > sub-region > region)

  • Minimum soil incorporation: 70% of generated residues

The optimization model implements this as a constraint between residue feed use and soil incorporation for each residue type and country:

\[\text{feed use} \leq \frac{\text{max feed fraction}}{1 - \text{max feed fraction}} \times \text{incorporation}\]

With the default 30% limit:

\[\text{feed use} \leq \frac{3}{7} \times \text{incorporation}\]

This ensures that for every 3 units of residue used as feed, at least 7 units are incorporated into the soil. The constraint is applied during model solving (in solve_model.py) after the network structure is built.

Environmental implications: Residues incorporated into soil generate direct N₂O emissions according to the IPCC EF1 emission factor applied to their nitrogen content (see Environmental Impacts). The model therefore balances:

  • Feed benefits: Residues reduce demand for dedicated feed crops (reducing land use and associated emissions)

  • Soil incorporation costs: Incorporated residues produce N₂O emissions but maintain soil health

Emissions from Livestock

Livestock production generates significant greenhouse gas emissions from two primary sources:

  • Enteric fermentation (CH₄): Ruminants produce methane through digestive fermentation

  • Manure management (CH₄, N₂O): All livestock produce emissions from manure storage and handling

For detailed methodology, data sources, and IPCC calculations, see Environmental Impacts (sections on Enteric Fermentation (CH₄) and Manure Management (CH₄)).

Enteric Fermentation (CH₄)

Ruminants (cattle, sheep) produce methane through digestive fermentation. The model uses IPCC Tier 2 methodology based on methane yields (MY) per unit dry matter intake (DMI).

Summary

  • Enteric fermentation produces CH₄ in ruminants during digestion

  • Methane yield (MY) varies by feed quality (roughage > forage > grain > protein)

  • Model uses IPCC Tier 2 methodology with feed-specific emission factors

  • See Enteric Fermentation (CH₄) for full details

Data Sources

  • data/curated/ipcc_enteric_methane_yields.csv: IPCC methane yields by feed category

  • processing/{name}/ruminant_feed_categories.csv: Feed categories with MY values (generated from GLEAM 3.0 data)

Manure Management (CH₄, N₂O)

All livestock produce emissions from manure storage, handling, and application:

  • CH₄: From anaerobic decomposition (especially liquid systems like lagoons)

  • N₂O: From nitrogen in manure (direct and indirect emissions)

Manure CH₄ emissions are calculated for all animal products (ruminants and monogastrics) and combined with enteric emissions in the model. See Manure Management (CH₄) for full methodology.

Production Costs

The model incorporates livestock production costs to represent the economic considerations of animal farming beyond feed and land costs. Costs include labor, veterinary services, energy, housing, and other operational expenses, while excluding feed (modeled endogenously) and land rent (implicit opportunity cost).

Livestock costs are applied as marginal costs on feed-to-product conversion links in the optimization model. The costs are sourced from USDA (United States) and FADN (European Union) agricultural accounting data, processed to per-tonne product costs, then converted to per-tonne feed costs using feed conversion efficiencies.

Grazing costs are handled separately from general livestock production costs. These costs represent the economic expenses specific to pasture-based feed production and are applied directly to grassland feed links rather than animal production links.

For comprehensive details on production cost data sources, processing methodology, and model application, see:

  • Production Costs - Complete documentation of all production costs (crops, livestock, and grazing)

The livestock-specific sections include:

  • Data sources: USDA and FADN livestock cost data

  • Processing methodology: Allocation by output value, yield calculations, and unit conversions

  • Grazing costs: Separation, processing, and application to grassland feed

  • Model application: How costs are applied as marginal costs on production links

Quick reference for livestock cost workflow:

  • retrieve_usda_animal_costs: Processes USDA livestock cost data (US)

  • retrieve_fadn_animal_costs: Processes FADN livestock cost data (EU)

  • merge_animal_costs: Combines sources and applies fallback mappings

  • Output: processing/{name}/animal_costs.csv with columns:

    • product: Animal product name

    • cost_per_mt_usd_{base_year}: Production cost excluding grazing (USD/tonne)

    • grazing_cost_per_mt_usd_{base_year}: Grazing-specific cost (USD/tonne)

Configuration Parameters

animal_products:
  include:
  - meat-cattle
  - meat-pig
  - meat-chicken
  - dairy
  - eggs
  - dairy-buffalo
  - meat-sheep
  # GLEAM 3.0 production system → model product mapping.
  # Defines which model products each (Animal, LPS) system contributes to.
  # Multi-product systems (e.g. cattle grazing → dairy + meat) are split
  # using FCR-weighted shares in the feed baseline.
  #
  # Sheep/goat milk is proxied through "dairy" (cattle milk pathway) rather
  # than modeled as a separate product. At ~3-4% of global milk production
  # the volume doesn't justify a distinct product with its own efficiency,
  # emissions, and nutritional profile. The feed accounting is still correct:
  # GLEAM3 sheep/goat feed intake is captured in the dairy baseline, and
  # FAOSTAT dairy production (see faostat_items.dairy) includes sheep/goat
  # milk. The production-based scaling step reconciles any efficiency mismatch.
  gleam3_system_product_map:
    Cattle:
      Grassland: [dairy, meat-cattle]
      Mixed: [dairy, meat-cattle]
      Feedlots: [meat-cattle]
    Buffalo:
      Grassland: [dairy-buffalo, meat-cattle]
      Mixed: [dairy-buffalo, meat-cattle]
    Sheep:
      Grassland: [dairy, meat-sheep]
      Mixed: [dairy, meat-sheep]
    Goats:
      Grassland: [dairy, meat-sheep]
      Mixed: [dairy, meat-sheep]
    Chicken:
      Broiler: [meat-chicken]
      Layer: [eggs]
      Backyard: [eggs, meat-chicken]
    Pigs:
      Backyard: [meat-pig]
      Intermediate: [meat-pig]
      Industrial: [meat-pig]
  # For multi-product species (cattle, buffalo, chicken, sheep/goats),
  # the Wirsenius scaling factor f splits total GLEAM3 feed between
  # co-products. Countries with f far from the regional median likely
  # reflect GLEAM3 data quality issues rather than real efficiency
  # differences. This factor clamps f to [median/k, median*k] where k
  # is the value below. Set to a large value (e.g. 100) to disable.
  me_scaling_clamp_factor: 2.0
  # Ruminant net-to-metabolizable energy conversion efficiency factors
  # Used to convert net energy (NE) requirements to metabolizable energy (ME) requirements
  # Based on NRC (2000) typical values for mixed diets
  # ME_required = NE_m/k_m + NE_g/k_g (+ NE_l/k_l for dairy)
  # TODO: Should check the reference for this.
  net_to_metabolizable_energy_conversion:
    k_m: 0.60  # Maintenance efficiency
    k_g: 0.40  # Growth efficiency
    k_l: 0.60  # Lactation efficiency (dairy)
  # Carcass-to-retail meat conversion factors
  carcass_to_retail_meat:
    meat-cattle: 0.67  # kg boneless retail beef per kg carcass (OECD-FAO 2023)
    meat-pig: 0.73     # kg boneless retail pork per kg carcass (OECD-FAO 2023)
    meat-chicken: 0.60 # kg boneless retail chicken per kg carcass (OECD-FAO 2023)
    eggs: 1.00         # No conversion needed (whole egg = retail product)
    dairy: 1.00        # No conversion needed (whole milk = retail product)
    meat-sheep: 0.63   # kg boneless retail lamb per kg carcass (slightly lower than beef)
    dairy-buffalo: 1.00 # No conversion needed (whole milk = retail product)
  # FAOSTAT QCL item names to aggregate for each model product.
  # First item is the primary product; additional items are proxied species
  # whose production is lumped into the model product.
  faostat_items:
    dairy:
      - "Raw milk of cattle"
      - "Raw milk of goats"       # proxy: goat milk → dairy
      - "Raw milk of sheep"       # proxy: sheep milk → dairy
      - "Raw milk of camel"       # proxy: camel milk → dairy
    meat-cattle:
      - "Meat of cattle with the bone, fresh or chilled"
      - "Meat of buffalo, fresh or chilled"   # proxy: buffalo → cattle
    meat-pig:
      - "Meat of pig with the bone, fresh or chilled"
    meat-chicken:
      - "Meat of chickens, fresh or chilled"
      - "Meat of ducks, fresh or chilled"            # proxy: duck → chicken
      - "Meat of turkeys, fresh or chilled"           # proxy: turkey → chicken
      - "Meat of pigeons and other birds n.e.c., fresh, chilled or frozen"
    eggs:
      - "Hen eggs in shell, fresh"
    dairy-buffalo:
      - "Raw milk of buffalo"
    meat-sheep:
      - "Meat of sheep, fresh or chilled"
      - "Meat of goat, fresh or chilled"              # proxy: goat → sheep
  residue_crops:
  - banana
  - barley
  - chickpea
  - cowpea
  - dry-pea
  - dryland-rice
  - foxtail-millet
  - gram
  - maize
  - oat
  - pearl-millet
  - phaseolus-bean
  - pigeonpea
  - rye
  - sorghum
  - sugarcane
  - wetland-rice
  - wheat

fodder_decomposition:
  fdd_crops:
    - alfalfa
    - silage-maize
  eurostat:
    averaging_years: 5
  suitability_blend_weight: 0.7
  yield_corrections:
    enabled: true
    eurostat_moisture: 0.65
    floor: 0.2
    ceiling: 2.0

grazing:
  enabled: true
  isimip_utilization_rate: 0.60 # Applied to ISIMIP yields in merge step
  forage_overlap_crops:
  - alfalfa
  - silage-maize
  - biomass-sorghum
  grassland_forage_calibration:
    enabled: true
    generate: false
    grassland_yield_correction: "data/curated/calibration/grassland_yield.csv"
    fodder_conversion_correction: "data/curated/calibration/fodder_conversion.csv"
    exogenous_forage: "data/curated/calibration/exogenous_forage.csv"
    scenario: "default"

Disabling grazing (enabled: false) forces all animal products to come from feed-based systems or imports, useful for exploring intensification scenarios.

Workflow Rules

Rules are listed in pipeline order. All rules are defined in workflow/rules/animals.smk.

prepare_gleam_feed_properties
  • Input: GLEAM 3.0 supplement, feed mapping

  • Output: ruminant_feed_properties.csv, monogastric_feed_properties.csv

  • Script: workflow/scripts/prepare_gleam_feed_properties.py

categorize_feeds
  • Input: Feed properties, enteric methane yields, ash content

  • Output: ruminant_feed_categories.csv, monogastric_feed_categories.csv, ruminant_feed_mapping.csv, monogastric_feed_mapping.csv

  • Script: workflow/scripts/categorize_feeds.py

compute_gleam3_me_requirements
  • Input: GLEAM3 intakes/production, feed categories, Wirsenius data, country-region mapping

  • Output: gleam3_me_requirements.csv

  • Script: workflow/scripts/compute_gleam3_me_requirements.py

build_feed_to_animal_products
  • Input: ME requirements, ruminant/monogastric feed categories

  • Output: feed_to_animal_products.csv

  • Script: workflow/scripts/build_feed_to_animal_products.py

compute_gleam3_feed_fractions
  • Input: Foods, crop production, feed mappings

  • Output: gleam3_feed_fractions.csv

  • Script: workflow/scripts/compute_gleam3_feed_fractions.py

build_grassland_yields
  • Input: ISIMIP grassland yield NetCDF, resource classes, regions

  • Output: grassland_yields.csv

  • Script: workflow/scripts/build_grassland_yields.py

prepare_feed_baseline
  • Input: GLEAM3 intakes/production, feed fractions, ME requirements, FAOSTAT QCL, feed mappings, uncalibrated efficiencies

  • Output: feed_baseline.csv

  • Script: workflow/scripts/prepare_feed_baseline.py

compute_grassland_calibration
  • Input: Solved network (uncalibrated scenario)

  • Output: data/curated/calibration/grassland_yield.csv, fodder_conversion.csv, exogenous_forage.csv

  • Script: workflow/scripts/compute_grassland_calibration.py

All processing/ outputs are prefixed with {name}/ (the config name). Livestock production is integrated into the build_model rule using the grassland yields and feed conversion CSVs.

References