Inspiration

The binational target for Lake Erie is a 40% cut in phosphorus. Nobody can see what 40% looks like. Most pollution maps are pictures of the past, but a manager's question is about the future: if I change this one thing, what moves? A picture cannot answer that. Only a model you can rerun can.

What it does

HydroSpectre is a what-if pollution simulator for western Lake Erie (SDG 6.3).

  • Simulate: a 2-D advection-diffusion solver runs on the server, on a grid cut to the lake's real outline. Nothing flows across land.
  • Compare: a baseline and an intervention run with identical weather, camera and colour scale, shown side by side with a difference view.
  • Trust: every number is labelled measured, derived or simulated. Concentrations are relative units, because we will not print a unit we cannot calibrate.
  • Reproduce: each run exports a manifest with its seed, parameters and model version.
  • Command: an AI Commander turns a plain-language request into one validated command from a fixed list. A person presses Execute.
  • Brief: a one-page decision brief for the scenario.

The model translates. The solver decides.

How we built it

A React, TypeScript and Vite front end with Tailwind CSS and MapLibre GL. A FastAPI back end in Python with a NumPy solver, SQLAlchemy and Alembic. Observations come from NOAA and NASA. The Commander calls a primary model with a short timeout, then a fallback model, then a deterministic rule parser, and the interface always says which one answered. Tests run with pytest, Vitest and Playwright.

Challenges we ran into

Keeping the model honest. A 30% source cut gives exactly 30.0% less mass, because the transport model is linear, so we say that up front and show where the plume goes, which is the part that is not obvious. Making the solver respect the shoreline needed its own tests.

Accomplishments that we're proud of

Nothing on the map is an animation: each frame is a time step of the solver. The app opens on a finished 72-hour result instead of a loading bar, and it keeps working when the language model is slow.

What we learned

A wrong unit looks more precise and is less true. Labelling what is measured and what is simulated matters more than adding detail.

What's next for HydroSpectre

Calibrating against measured concentrations so the units can become physical. Until then it is an educational transport proxy, not a forecast and not a drinking-water safety tool.

Try it

Open the live demo and pick a sample role (Analyst, Viewer or Admin). No password is needed.

Built With

Share this project:

Updates

Submission history