[geographic] GeographicConfig#
TOML section: [geographic]
Pydantic model: GeographicConfig defined in hydromodpy.spatial.geographic.geographic_config.
Geographic configuration for watershed delineation.
This model stores parameters used to extract and prepare the physical domain (watershed geometry and rasters) based on various possible input definitions.
Standard mode uses an external DEM with one of the catchment definitions: direct DEM, XYZ text grid, outlet coordinate, or polygon shapefile. Synthetic mode builds an analytical support and bypasses external DEM delineation.
Fields#
source_mode
Literal[âstandardâ, âsyntheticâ] default = âstandardâ user source
Geographic runtime mode. âstandardâ keeps the historical DEM/outlet/polygon workflow. âsyntheticâ builds one analytical support from [geographic.synthetic].
catchment
in TOML:
[geographic.catchment]
catch_def = âdemâ | âtxtâ | âfrom_outlet_coordâ | âfrom_polyg_shpâ default = None user source
Catchment definition payload used when source_mode=âstandardâ. Discriminated by âcatch_defâ on the nested table: âdemâ | âtxtâ | âfrom_outlet_coordâ | âfrom_polyg_shpâ.
Pick a tab below: setting
catch_defselects the matching schema.
TOML: [geographic.catchment.dem] â model DemCatchDef (set catch_def = "dem").
dem_init_path
Path | None default = None user source
Path to the DEM raster used as input. For âdemâ and âtxtâ modes: defines the model domain directly. For âfrom_outlet_coordâ and âfrom_polyg_shpâ modes: regional DEM used for flow analysis. May be left absent when [data.dem.sources] declares the DEM.
TOML: [geographic.catchment.txt] â model TxtCatchDef (set catch_def = "txt").
dem_init_path
Path | None default = None user source
Path to the DEM raster used as input. For âdemâ and âtxtâ modes: defines the model domain directly. For âfrom_outlet_coordâ and âfrom_polyg_shpâ modes: regional DEM used for flow analysis. May be left absent when [data.dem.sources] declares the DEM.
cell_size
float required user source
Grid cell size in metres used to rasterise the XYZ point cloud. Accepts inline units (e.g. â25 mâ, â0.025 kmâ).
TOML: [geographic.catchment.from_outlet_coord] â model OutletCatchDef (set catch_def = "from_outlet_coord").
dem_init_path
Path | None default = None user source
Path to the DEM raster used as input. For âdemâ and âtxtâ modes: defines the model domain directly. For âfrom_outlet_coordâ and âfrom_polyg_shpâ modes: regional DEM used for flow analysis. May be left absent when [data.dem.sources] declares the DEM.
snap_dist
float required user source
Maximum snapping distance (metres) to move the outlet to the nearest stream cell. Accepts inline units (e.g. 50, â50 mâ, â0.05 kmâ).
buff_area
str | float required user source
Buffer around the watershed polygon. Numeric values are interpreted as a percentage of sqrt(area [km^2]). String values are interpreted as explicit distances (for example â500 mâ, â2 kmâ).
TOML: [geographic.catchment.from_polyg_shp] â model PolygonCatchDef (set catch_def = "from_polyg_shp").
dem_init_path
Path | None default = None user source
Path to the DEM raster used as input. For âdemâ and âtxtâ modes: defines the model domain directly. For âfrom_outlet_coordâ and âfrom_polyg_shpâ modes: regional DEM used for flow analysis. May be left absent when [data.dem.sources] declares the DEM.
buff_area
str | float required user source
Buffer around the watershed polygon. Numeric values are interpreted as a percentage of sqrt(area [km^2]). String values are interpreted as explicit distances (for example â500 mâ, â2 kmâ).
crs_project
str | None default = None user source
Target projected CRS for all outputs (e.g. âEPSG:2154â). If not set, derived from the input DEM.
dem_correc_type
Literal[âbreachâ, âfillâ] default = âbreachâ user source
DEM depression correction method. âbreachâ (recommended) preserves natural flow paths. âfillâ raises sinks to their pour point.
bottom_path
Path | None default = None user source
Path to a raster representing the aquifer bottom elevation. Must share the same grid as the model domain.
reg_fold
Path | None default = None dev source
Folder with pre-computed regional flow rasters. When set, rasters are loaded instead of recomputed.
synthetic
in TOML:
[geographic.synthetic]
SyntheticGeographicConfig factory user source
Synthetic geographic support used when source_mode=âsyntheticâ. This analytical mode bypasses watershed delineation from external DEM files.
river_network
in TOML:
[geographic.river_network]
RiverNetworkConfig factory user source
Optional DEM-derived river-network extraction settings. When disabled, no stream network is generated in geographic preprocessing.
reuse_existing_outputs
bool default = False user source
If true, reuse previously generated geographic artifacts when the cached fingerprint matches the current DEM, outlet/polygon and geographic settings. This is useful for profiling repeated simulation runs in the same workspace.
write_intermediates
bool default = False dev source
Keep intermediate rasters and shapefiles on disk after geographic preprocessing. When false (default), results_stable/ is removed after ingestion into the simulation Zarr store.
Starter TOML snippet#
Cases using this section#
Validation gallery cases that reference fields from this section: