SFINCS

Runs SFINCS 2D flood inundation simulations with validated tools, diagnostics, and coupling workflows.

155|6|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill sfincs-lzwei196
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: SFINCS
Source: https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation/tree/main/models/SFINCS
Command: npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill sfincs-lzwei196

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hydromt_sfincs, rasterio, xarray, geopandas, numpy, scipy, netCDF4, pyproj, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running the SFINCS flood model correctly requires deep operational knowledge: binary input formats, unit conversions, vertical datum alignment, CFL-stable timesteps, and boundary mask conventions. Mistakes in any of these produce silent failures where the model runs but outputs wrong flood depths. This Skill packages that expertise so an AI agent can set up, execute, and validate SFINCS simulations without silent errors. ## Core Features & Use Cases - End-to-end 8-stage pipeline: 13 validated Python tools covering domain setup, DEM/topography processing, Manning's roughness, rainfall and CaMa-Flood boundary forcing, configuration generation, execution, and flood map post-processing. - 44 diagnostic triplets: A symptom-to-remedy database covering unit conversion traps (mm/3hr vs mm/hr), binary format pitfalls (sfincs.ind), mask boundary errors, and coupling double-counting, so failures are diagnosed instead of guessed. - Model coupling: Converts CaMa-Flood discharge/water level and CMFD/MSWX precipitation into SFINCS boundary conditions for compound coastal-fluvial-pluvial flood modeling. - Use Case: Simulate the July 2003 Huai River flood at 100m resolution by chaining VIC runoff, CaMa-Flood routing, and SFINCS inundation, then validate flood extent against satellite observations using CSI scoring. ## Quick Start Ask the agent to run the preflight check and then execute the SFINCS pipeline for your basin shapefile, from domain setup through flood map generation.

Frequently Asked Questions about SFINCS

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a SFINCS flood simulation from a basin shapefile?

Run the pipeline stages in order: setup_sfincs_domain.py to define the grid, build_sfincs_topobathy.py for DEM processing, prepare_sfincs_rainfall.py for forcing, generate_sfincs_inp.py for configuration, then run_sfincs.py to execute. The binary reads sfincs.inp from the current working directory.

How to couple CaMa-Flood output with SFINCS boundary conditions?

Use cama_to_sfincs_boundary.py to convert CaMa-Flood discharge (m3/s) or water level into sfincs.src/.dis or sfincs.bnd/.bzs files. Avoid double-counting precipitation: give SFINCS its own rainfall and use CaMa-Flood only for river boundary inflow.

What is the difference between SFINCS and CaMa-Flood?

CaMa-Flood routes water through 15-arcmin (~28km) river networks for global-scale flood extent. SFINCS solves 2D shallow water equations at 10-200m resolution for local flood depth, supporting coastal surge, rainfall, and urban flooding. They are complementary in a cascade workflow.

Why does my SFINCS run show no flooding despite heavy rain?

The most common cause is precipitation units: SFINCS expects mm/hr, but CMFD provides kg/m2/s (multiply by 3600) and VIC forcing is mm per 3-hour timestep (divide by 3). Also check that precipfile (ASCII) is used instead of netprecipfile, which can silently fail.

Why does SFINCS drain all water from an inland domain?

Mask value 2 is a water-level boundary held at 0.0m, which drains inland terrain above sea level. For inland river reaches use mask=3 (absorbing outflow) on the downstream edge only, via build_sfincs_topobathy.py --outflow_value 3.

What are the limitations of SFINCS flood validation?

Validation requires independent water observations: SAR inundation masks for flood extent (CSI scoring) or stage gauges for water level. A DEM is not a flood observation, and scoring a gauge forced by its own discharge is circular; use a two-station setup with an independence screen.