BACK_TO_PROJECTS

Sequestration Simulator

A high-performance analytical engine and web dashboard built with FastAPI and Python, designed to simulate carbon sequestration trajectories for Indonesia's 2050 Net Zero targets. The system implements IPCC Tier 1 methodologies with advanced numerical modeling for forest maturation, carbon sink degradation, and adaptive land-use allocation.

TECH_STACK

Python
FastAPI
Pydantic
Jinja2
Chart.js
Docker
Traefik
Coolify
Uvicorn
Vanilla CSS

PROJECT_OVERVIEW

This project is a full-stack analytical suite developed to model Indonesia's National Net Zero Roadmap. It provides a numerical simulation engine that calculates the required reforestation and coastal restoration areas needed to achieve specific carbon abatement targets by 2050. The application bridges the gap between high-level climate policy and actionable land-use requirements through rigorous data modeling and scientific validation.

Technical Architecture

1. High-Performance Simulation Engine (Python)

The core logic resides in a modular calculation engine built with Python 3.11. Key technical implementations include:

  • Numerical Interpolation: Implements linear and non-linear interpolation for 3-point emission trajectories (Initial, Peak, Target), generating continuous annual data points from sparse policy targets.
  • Biological Growth Modeling: Features a cohort-based sequestration model that accounts for forest maturation phases (Establishment, Rapid Growth, Maturity, and Senescence) using sigmoid and decay functions derived from IPCC 2006 guidelines.
  • Recursive Degradation Flux: Calculates annual sequestration loss in existing sinks using a compound degradation algorithm: Rate_n = Base * (1 - Degradation)^n.
  • Adaptive Allocation Algorithms: Provides five distribution methods for land-use deployment:
    • Equal: Linear annual installments.
    • Front-Loaded/Back-Loaded: Exponential distribution logic.
    • S-Curve: Logistic growth modeling for realistic project ramp-up.
    • Adaptive: Prioritizes planting based on real-time degradation urgency.

2. API & Backend Services

Powered by FastAPI, the backend is designed for high concurrency and low latency:

  • Pydantic Schema Validation: Leverages strict type-checking and run-time validation for all simulation inputs and outputs, ensuring data integrity across complex environmental parameters.
  • Extensible Schema Design: The architecture supports multi-scenario comparisons and various "what-if" analyses (e.g., Risk Buffers for natural disturbances, Root-to-Shoot ratios for below-ground biomass).
  • RESTful Implementation: Exposes endpoints for both the core simulation and metadata retrieval (references, default IPCC values).

3. Frontend & Data Visualization

A lightweight, professional dashboard focused on clear data communication:

  • Asynchronous Data Handling: Uses vanilla JavaScript and Fetch API to communicate with the calculator engine, providing a reactive experience without the bloat of modern single-page frameworks.
  • Dynamic UI State: Managed via Jinja2 templates and standardized CSS design tokens.
  • Real-time Charting: Implements Chart.js for rendering complex time-series data, including stacked area charts for carbon balance and projection-based line charts for sequestration gaps.

Infrastructure & DevOps

  • Containerization: Fully Dockerized architecture (multi-stage builds) for consistent deployment across environments.
  • Reverse Proxy & Security: Integrated with Traefik and ProxyHeadersMiddleware for secure HTTPS termination and header management behind a load balancer.
  • Deployment: Managed via Coolify, orchestrating a modern CI/CD pipeline for automated builds and rollouts.

Policy Analysis & Research

Beyond the software implementation, the project includes a strategic assessment evaluating the transition from voluntary to compliance-based sequestration markets. This analysis identifies critical "logic gaps" in current proposals, such as the permanence of biological carbon vs. renewable electricity and the ex-post financing dilemma for new restoration projects.

Methodology Compliance

All calculations are strictly verified against the IPCC 2006 Guidelines Volume 4 (AFOLU) Tier 1 standards. This alignment ensures that the simulator's output is scientifically defensible and ready for use in professional environmental reporting.

project-preview://sequestration-simulator
Sequestration Simulator