Skip to content

ecopony/basalt_broth

Repository files navigation

Basalt Broth

Agent-based model for optimizing bioswale placement in Portland, OR. Uses real GIS data and a two-stage Fuzzy Inference System to identify where bioswales would capture the most stormwater runoff.

What it does

  1. Loads real terrain — 1m LiDAR DEM of the Hawthorne-Division corridor in SE Portland
  2. Scores every location — A two-stage FIS evaluates physical suitability (slope + soil + groundwater) and capture priority (suitability + impervious cover + topographic wetness)
  3. Simulates runoff — Water agents spawn from rainfall, flow downhill via D8 routing, and either get captured by bioswales or escape to storm drains
  4. Measures impact — Tracks capture rate, escape rate, and plots effectiveness over time

Why it matters

No published ABM combines dynamic water flow simulation with real GIS data for bioswale siting. Existing tools are either static GIS overlays or heavyweight hydraulic models. This project brings accessibility (NetLogo) and validation (Portland's 3,000+ existing green infrastructure facilities) to the problem.

Study area

Hawthorne Blvd to Division St, SE 20th Ave to Cesar Chavez Blvd — a mixed residential/commercial corridor in SE Portland with active green infrastructure deployment by Portland BES.

Project structure

scripts/            Python data processing pipeline
  clip_dem.py         Mosaic and clip USGS 3DEP DEM tiles
  refetch_layers.py   Fetch vector layers from Portland ArcGIS REST
  clip_impervious.py  Clip NOAA C-CAP impervious surface raster
  calc_flow.py        Derive slope, flow direction, flow accumulation, TWI
  extract_attributes.py  Zonal stats per street segment
  fis_suitability.py  Two-stage Fuzzy Inference System

netlogo/            NetLogo 7 model
  test_dem.nlogox     Main ABM model file

research/           Literature review and synthesis
data/               GIS data (gitignored, regenerated by scripts)

Prerequisites

  • NetLogo 7 with GIS extension (bundled)
  • Python 3.10+ with GDAL, numpy, scipy
  • ~2GB disk space for GIS data

Getting started

1. Generate the data

Run the scripts in order. Each reads from and writes to data/:

python scripts/clip_dem.py
python scripts/refetch_layers.py
python scripts/clip_impervious.py
python scripts/calc_flow.py
python scripts/fis_suitability.py

2. Run the model

Open netlogo/test_dem.nlogox in NetLogo 7, then:

  1. Click Setup to load terrain and FIS data
  2. Click Priority to see where the FIS recommends bioswales (green = high priority)
  3. Set num-bioswales and click Place Bioswales
  4. Click Rain a few times, then Go to watch water flow
  5. Watch the Capture % monitor — try different bioswale counts to see diminishing returns

FIS validation

The FIS was validated against 176 existing Portland GSI facilities:

Metric Value
Boyce Index 0.915
Mann-Whitney U p = 3.1 x 10^-11
Top-quartile enrichment 38.6% (vs 25% expected)

Facilities are progressively more concentrated in areas the FIS rates highly.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages