itzi-core is the computational part of the Itzi flood model. It provides the numerical simulation engine for distributed, dynamic flood modelling, including surface flow, hydrology and infiltration, and optional coupling to SWMM drainage networks.
Its architecture separates the simulation engine from data access through provider interfaces, so applications can plug in their own raster input, raster output, and vector output providers. This makes it possible to run the same computational model with local files, in-memory data, or cloud object storage without coupling the solver to a particular storage format or platform.
The package already includes:
- An xarray raster input provider for static and time-varying gridded data.
- In-memory input and output providers for programmatic use and testing.
The xarray provider is available through the optional xarray dependency group.
Itzi Core requires Python 3.12 or above.
Install the base package with pip:
pip install itzi-coreOr add it to a uv-managed project:
uv add itzi-coreInstall the xarray provider:
pip install "itzi-core[xarray]"With uv:
uv add "itzi-core[xarray]"For development from a source checkout, use uv:
uv sync
uv pip install -e .Simulations are configured with SimulationBuilder.
A run combines the numerical core with providers that implement the following interfaces:
RasterInputProvidersupplies static or time-varying raster inputs and domain metadata.RasterOutputProviderrecords gridded results at simulation timesteps and finalizes derived outputs.VectorOutputProviderrecords coupled drainage-network results.MassBalanceOutputProviderfor storing mass balance and other simulation statistics.
Custom providers can implement these interfaces to integrate another data catalog, file format, service, or object store.
Run an individual test:
uv run pytest tests/test_xarray_input.pyFormat the project:
uvx ruff format .The numerical kernels include Cython extensions.
Rebuild the editable installation after changing a .pyx file:
uv pip install -e .Itzi Core is licensed under the GNU Lesser General Public License v2.1 or later.