Skip to content

Non-Biomass Emissions in Batch Processing

Non-biomass emissions calculations are integrated directly into the batch processing workflow. When enabled, the system automatically calculates non-biomass emissions (e.g., energy, fertilizers, pesticides, processing) for each plot in your collection using Life Cycle Assessment (LCA) methodology.

Overview

Non-biomass emissions are calculated automatically during batch processing when the non_biomass parameter is set to true in either: - /batch_process - For plot-level batch processing - /batch_supply_shed - For supply shed analysis

The calculations use the lca_payload structure within the input_payload parameter, which contains detailed supply chain data for accurate emissions calculations.

Supported Crop Types

Currently, non-biomass emissions are supported for the following crop types: - tea - timber - shrimp

If you attempt to use non_biomass=True with an unsupported crop type, the API will return an error.

Enabling Non-Biomass Emissions

In Batch Process

To enable non-biomass emissions in batch processing, set the non_biomass parameter to true:

request_data = {
    "collection_name": "my_collection",
    "description": "Collection with non-biomass emissions",
    "stats": "luc_emissions,biodiversity",
    "date": "2024-12-31",
    "crop_type": "tea",  # Must be tea, timber, or shrimp
    "non_biomass": True,  # Enable non-biomass emissions
    "input_payload": {
        "lca_payload": {
            # LCA payload structure (see below)
        }
    }
}

In Batch Supply Shed

Similarly, for batch supply shed:

request_data = {
    "collection_name": "my_supply_shed",
    "description": "Supply shed with non-biomass emissions",
    "stats": "luc_emissions,eudr_deforestation",
    "crop_type": "shrimp",  # Required for supply shed
    "non_biomass": True,  # Enable non-biomass emissions
    "travel_times": [120],
    "input_payload": {
        "lca_payload": {
            # LCA payload structure (see below)
        }
    }
}

LCA Payload Structure

The lca_payload is a nested structure that contains detailed supply chain data. It should be provided within the input_payload parameter:

input_payload = {
    "lca_payload": {
        "hatchery": {
            "chemicals": [],
            "materials": [],
            "energy": []
        },
        "nursery": {
            "chemicals": [],
            "materials": [],
            "energy": []
        },
        "farmgate": {
            "energy": [
                {"name": "electricity (grid)", "value": 4907304, "unit": "kWh"},
                {"name": "diesel (average biofuel blend)", "value": 2774.79, "unit": "litre"}
            ],
            "feed": [
                {"name": "shrimp_feed", "value": 1517329.12, "unit": "kg"}
            ],
            "chemicals": [],
            "materials": [],
            "fertilisers": [],
            "pesticides": [],
            "biogenic_emissions": []
        },
        "processing": {
            "energy": [
                {"name": "electricity (grid)", "value": 11653700, "unit": "kWh"},
                {"name": "diesel (average biofuel blend)", "value": 89158, "unit": "litre"},
                {"name": "wood", "value": 441950, "unit": "kg"}
            ],
            "materials": [
                {"name": "Cardboard", "value": 159114.04, "unit": "kg"},
                {"name": "LDPE", "value": 27020.092, "unit": "kg"}
            ],
            "chemicals": []
        },
        "distribution": {
            "transport": []
        },
        "co_products": [
            {"name": "shrimp_co_products", "percentage_main_value": 25.0}
        ],
        "country": "India",
        "year": 2024,
        "base_year": None,
        "commodity_type": "shrimp",
        "commodity_yield": {"value": 1226826, "unit": "kg"},
        "product_fresh": {"value": 1226826, "unit": "kg"},
        "product_finished": {"value": 9733176, "unit": "kg"},
        "product_cf": 0.126,
        "production_area": {"value": 1.0, "unit": "ha"}
    }
}

Key LCA Payload Fields

Field Type Description
hatchery object Hatchery stage inputs (energy, chemicals, materials)
nursery object Nursery stage inputs (energy, chemicals, materials)
farmgate object Farm-level inputs (energy, feed, chemicals, materials, fertilisers, pesticides, biogenic_emissions)
processing object Processing facility inputs (energy, materials, chemicals)
distribution object Distribution inputs (transport)
co_products array Co-products with economic value allocation percentages
country string Country where production occurs
year integer Production year
commodity_type string Type of commodity (must match crop_type)
commodity_yield object Total commodity yield with value and unit
product_fresh object Fresh product quantity with value and unit
product_finished object Finished product quantity with value and unit
product_cf float Conversion factor from fresh to finished product
production_area object Production area in hectares

Empty Lists and Default Values

If you provide empty lists (e.g., chemicals: [], materials: []), the system will automatically use default emission factors from the database. This ensures that all relevant emissions sources are accounted for, even if specific data is not available.

Important: Empty lists do not result in zero emissions - they trigger the use of default emission factors based on the crop type, country, and system type.

Processing Flow

When non_biomass=True is set:

  1. Input Validation: The system validates that the crop type is supported (tea, timber, or shrimp)
  2. LCA Payload Processing: The lca_payload from input_payload is extracted and validated
  3. Emissions Calculation: Non-biomass emissions are calculated for each plot using:
  4. User-provided inputs from the lca_payload
  5. Default emission factors from the database (when inputs are empty)
  6. Country and crop-specific emission factors
  7. Storage: Calculated emissions are stored alongside other batch processing results

Date Parameters

The date parameters used for non-biomass emissions calculations are derived from the batch process parameters:

  • Start Date: Typically set to YYYY-01-01 (start of the calendar year)
  • End Date: Typically set to YYYY-12-31 (end of the calendar year), adjusted based on the processing month

The date parameter in batch processing represents the end date for the monitoring period (up until processing), not a cut-off date.

Response

Non-biomass emissions are calculated as part of the batch processing workflow. The batch process response indicates that processing has started:

1
2
3
4
5
response = {
    "status": "PROCESSING",
    "collection_id": "0x44c87929d1ed966d86a844a98744bd7e3d47aa3da48e262150874c2bc8313feb",
    "message": "Batch Process processing started in background"
}

Results are available once processing completes. Use the collection_id to track progress via /batch_progress and retrieve results via the Fetch API endpoints.

Example: Complete Batch Process with Non-Biomass Emissions

batch_process_with_non_biomass.py
import requests
import json

# Prepare the LCA payload
lca_payload = {
    "farmgate": {
        "energy": [
            {"name": "electricity (grid)", "value": 100000, "unit": "kWh"},
            {"name": "diesel (average biofuel blend)", "value": 500, "unit": "litre"}
        ],
        "feed": [],
        "chemicals": [],
        "materials": [],
        "fertilisers": [],
        "pesticides": [],
        "biogenic_emissions": []
    },
    "processing": {
        "energy": [
            {"name": "electricity (grid)", "value": 50000, "unit": "kWh"}
        ],
        "materials": [],
        "chemicals": []
    },
    "distribution": {"transport": []},
    "co_products": [],
    "country": "India",
    "year": 2024,
    "commodity_type": "shrimp",
    "commodity_yield": {"value": 100000, "unit": "kg"},
    "product_fresh": {"value": 100000, "unit": "kg"},
    "product_finished": {"value": 800000, "unit": "kg"},
    "product_cf": 0.125,
    "production_area": {"value": 10.0, "unit": "ha"}
}

# Prepare the request
request_data = {
    "collection_name": "shrimp_collection_2024",
    "description": "Shrimp collection with non-biomass emissions",
    "stats": "luc_emissions,eudr_deforestation",
    "date": "2024-12-31",
    "start_date": "2024-01-01",
    "crop_type": "shrimp",
    "non_biomass": True,
    "input_payload": json.dumps({
        "lca_payload": lca_payload
    })
}

files = {
    'file': ('shrimp_plots.geojson', open('shrimp_plots.geojson', 'rb'), 'application/geo+json')
}

headers = {
    'Authorization': "Bearer <authorization_token>"
}

# Submit the batch process request
response = requests.post(
    "https://epoch-sco2-api.com/batch_process",
    files=files,
    data=request_data,
    headers=headers
)

result = response.json()
print(f"Collection ID: {result['collection_id']}")
print(f"Status: {result['status']}")

Additional Resources