[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
str default = âstandardâ user source
Geographic runtime mode. âstandardâ keeps the historical DEM/outlet/polygon workflow. âsyntheticâ builds one analytical support from [geographic.synthetic].
One of: "standard" "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] with catch_def = "dem" â model DemCatchDef.
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] with catch_def = "txt" â model TxtCatchDef.
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] with catch_def = "from_outlet_coord" â model OutletCatchDef.
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] with catch_def = "from_polyg_shp" â model PolygonCatchDef.
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
str default = âbreachâ user source
DEM depression correction method. âbreachâ (recommended) preserves natural flow paths. âfillâ raises sinks to their pour point.
One of: "breach" "fill"
domain_extent
str default = âboxâ user source
Selects the DEM surface used for the domain. âboxâ (default) keeps the full buffered rectangular support. âwatershedâ / âwatershed_buffâ select the catchment (optionally with a buffer ring) surface. Note: the MODFLOW 6 mesh still covers the buffered box (the buffer stays active for inter-basin exchange); out-of-watershed drainage is kept out of the catchment discharge by the DRN watershed-routing, not by an idomain mask. Experimental.
One of: "box" "watershed_buff" "watershed"
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.
enforce_streams
in TOML:
[geographic.enforce_streams]
StreamEnforcementConfig factory user source
Optional stream burning of the routing DEM: lower the mapped network cells so the computed D8 paths follow the observed network, without touching the model grid top. Applied before the lake carve.
enforce_lakes
in TOML:
[geographic.enforce_lakes]
LakeEnforcementConfig factory user source
Optional lake hydro-enforcement of the routing DEM: carve the lake footprints so streams route into the lakes and drain to the outlet, without touching the model grid top.
dam_carve
in TOML:
[geographic.dam_carve]
DamCarveConfig factory user source
Optional dam structure-carve of the model-top DEM: lower the dam footprint to the valley floor so a cutoff wall sits at the dam on a raw DEM (mirror of enforce_lakes, on the top instead of the routing DEM).
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), .hmp/scratch/_preprocessing/ is removed after ingestion into the run field store.
Starter TOML snippet#
Cases using this section#
Validation gallery cases that reference fields from this section: