Open Source · MIT License · PyPI
DisSModel — Discrete Spatial Modeling Ecosystem

A modular Python ecosystem for spatially explicit dynamic modeling — Cellular Automata, System Dynamics, and Land Use & Cover Change simulation.

📖 Documentation ⭐ GitHub Organization
$ pip install dissmodel Copied!

Five repositories,
one coherent framework

Each package has a focused role. Use the core alone or combine extensions for complex geospatial simulations.

Built for modularity and reproducibility

Every simulation is a traceable experiment. Coefficients live in versioned TOML files, not buried in code.

Experiment as first-class object

Each run produces an immutable ExperimentRecord capturing provenance, input checksums, and model commit — ready to cite in a paper.

Configuration separated from code

Calibrated coefficients live in versioned TOML files in dissmodel-configs, never hardcoded. Citeable by git hash.

Production-ready infrastructure

Built on JupyterLab, FastAPI, Redis, and MinIO via Docker Compose. Pangeo integration is planned for a future release.

┌─────────────────────────────────┐
│  DisSModel Platform             │
│                                 │
│  FastAPI                        │
│   ├── POST /submit_job          │
│   ├── GET  /job/{id}            │
│   └── POST /experiments/repro   │
│                                 │
│  Worker                         │
│   ├── ExecutorRegistry          │
│   ├── ModelExecutor ABC         │
│   └── Redis Queue               │
├─────────────────────────────────┤
│  Infrastructure                 │
│  JupyterLab · MinIO · Redis     │
└─────────────────────────────────┘

Coastal dynamics & Mangrove migration

The brmangue-dissmodel repository demonstrates DisSModel on real data from Maranhão, Brazil — implementing flood propagation and mangrove migration based on Bezerra et al. (2014).

Model

Pure simulation logic — no I/O, no infrastructure. Works standalone in a notebook or script.

from dissmodel import Environment

env = Environment(start_time=2008, end_time=2030)

# Models attach themselves to env on instantiation
FloodModel(gdf=gdf, taxa_elevacao=0.5, attr_uso="uso")
MangroveModel(gdf=gdf, altura_mare=6.0, attr_solo="solo")

env.run()
ModelExecutor

Wraps the model with I/O, column mapping, provenance, and platform integration.

class CoastalVectorExecutor(ModelExecutor):
    name = "brmangue_vector"

    def load(self, record: ExperimentRecord) -> GeoDataFrame:
        # load data + apply column_map → canonical names
        ...

    def run(self, data: GeoDataFrame, record: ExperimentRecord) -> GeoDataFrame:
        # build env + models, call env.run()
        ...
Run

The same executor runs locally via CLI or remotely via the platform API.

python main.py run \
  --input  data/input/mangue_grid.zip \
  --output data/output/simulation.gpkg \
  --param  end_time=2030