[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

Start of the data window (ISO date, e.g. ‘2019-01-01’). Optional: when neither bound is declared, the loader inherits [simulation.time].start_datetime, or [overview].date_start in overview mode. Declare it only to fetch a window WIDER than the simulation, typically a cache shared by several runs. Must be declared together with date_end.

Example: "2019-01-01"

date_end

str | None default = None user source

End of the data window (ISO date, e.g. ‘2025-12-31’). Optional: when neither bound is declared, the loader inherits [simulation.time].end_datetime, or [overview].date_end in overview mode. Declare it only to fetch a window WIDER than the simulation, typically a cache shared by several runs. Must be declared together with date_start.

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[str] default = None dev source

Retrieve on the project extent rather than on this source’s own filters. Only whether it is SET matters to the loaders; the two literals are told apart by the site-selection pipeline alone, and a standard project run clips on the delineated watershed either way, through the mask the loader fills in. Declared at DEV level for that reason: a project run neither needs it nor changes with it.

One of: "watershed" "study_area"

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

str required user source

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

One of: "custom" "hubeau"

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

Drop stations whose declared service period does not overlap the requested window, before downloading them. It is a metadata filter: a station that overlaps but returns nothing is dropped after its download instead, and the run says which ones.

max_stations

int | None default = None user source

Maximum number of Hub’Eau stations to KEEP. Stations that return no observation in the window do not count against it, so a preview run over a larger territory gets this many stations carrying data, not this many tried.

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
# 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.