[hydrometry] HydrometryConfig#

TOML section: [hydrometry]

Pydantic model: HydrometryConfig defined in hydromodpy.data.variables.hydrometry.config.

Source on GitHub

Top-level hydrometry configuration.

The section groups hydrometric sources and the optional simulation date window inherited from BaseVariableConfig. Loaded data is stored as station time series for calibration, boundary checks, or reporting.

Show fields:

Fields#

date_start

str | None default = None user source

Project start date (ISO format, e.g. ‘2019-01-01’).

Example: "2019-01-01"

date_end

str | None default = None user source

Project end date (ISO format, e.g. ‘2025-12-31’).

Example: "2025-12-31"

sources in TOML: [[hydrometry.sources]]

list[HydrometrySourceConfig] required user source

At least one data source.

Fields of HydrometrySourceConfig
fallback_search_radius_km

float | None default = None dev source

Maximum search radius (km) used to find a fallback station when no observation is available inside the requested bbox.

station_ids

list[str] | None default = None user source

Explicit station identifiers to load (custom source).

extent

Optional[Literal[‘watershed’, ‘study_area’]] default = None user source

Enable bounding-box data retrieval using the project extent. watershed uses the delineated watershed, study_area uses the broader study bounding box.

force_refresh

bool default = False dev source

Ignore the cache and force a fresh download from the API.

mask_path

Path | None default = None user source

Optional SHP/GPKG/GeoJSON/TIF mask to spatially filter stations or clip gridded sources.

source_unit

str | None default = None user source

Optional source unit for custom gridded .nc/.tif inputs. When omitted for NetCDF, units are inferred from variable metadata.

col_id

str default = “id” dev source

Column name for the station identifier in location files.

col_x

str default = “x” dev source

Column name for the X coordinate in location files.

col_y

str default = “y” dev source

Column name for the Y coordinate in location files.

col_crs

str default = “crs” dev source

Column name for the CRS in location files.

col_datetime

str default = “datetime” dev source

Column name for timestamps in chronicle CSVs.

col_value

str default = “value” dev source

Column name for numeric values in chronicle CSVs.

default_crs

str default = “EPSG:4326” dev source

Default CRS used when a location file omits the CRS column.

source

Literal[‘custom’, ‘hubeau’] required user source

Data provider: ‘custom’ for user files, ‘hubeau’ for Hub’Eau API.

path

Path | None default = None user source

Directory containing location file and chronicle CSVs.

product

str | None default = None user source

Hub’Eau variable code (e.g. ‘QmnJ’, ‘QmM’, ‘HmnJ’).

require_observations

bool default = True dev source

Only keep stations that have observations in the period.

max_stations

int | None default = None user source

Maximum number of Hub’Eau stations to download after discovery. Useful for fast preview runs over a larger territory.

Starter TOML snippet#

Click to expand a copy-pasteable [hydrometry] TOML skeleton

Copy this block into your project.toml and uncomment the lines you want to set. Sub-tables ([parent.subfield]) appear in the order Pydantic expects them.

[hydrometry]
# date_start = ...  # default = None
# date_end = ...  # default = None

[[hydrometry.sources]]
# station_ids = ...  # default = None
# extent = ...  # default = None
# mask_path = ...  # default = None
# source_unit = ...  # default = None
# source = ""  # REQUIRED
# path = ...  # default = None
# product = ...  # default = None
# max_stations = ...  # default = None

Entity-relationship diagram#

ER diagram for HydrometryConfig

Click to zoom and pan. Press Esc or click outside to close.