pytuflow.ArrConfig#
- class ArrConfig(site=<factory>, ifd=<factory>, events=<factory>, temporal_patterns=<factory>, climate_change=<factory>, preburst=<factory>, losses=<factory>, arf=<factory>, complete_storm=False, output=<factory>, response_json=None, max_retries=5, source_path=None)#
Bases:
objectTop-level, fully parsed and validated ARR config.
- Parameters:
site (SiteConfig, optional) – Site name, location (latitude/longitude or catchment boundary) and catchment area.
ifd (IFDConfig, optional) – Design rainfall (IFD) settings, e.g. the baseline year.
events (EventsConfig, optional) – The AEPs and durations to assemble events for, and the output event notation.
temporal_patterns (TemporalPatternsConfig, optional) – Temporal pattern settings, including local pattern files and additional regions.
climate_change (ClimateChangeConfig, optional) – Whether climate change events are included, and the scenarios (baseline year and SSP) to use.
preburst (PreburstConfig, optional) – Preburst percentile and pattern settings.
losses (LossesConfig, optional) – Initial/continuing loss method and settings.
arf (ArfConfig, optional) – Areal reduction factor settings.
complete_storm (bool, optional) – If
True, every event is assembled as a complete storm (preburst prepended to the design burst). Default isFalse.output (OutputConfig, optional) – Output folder, rainfall file format and whether verbose working data is written.
response_json (str, optional) – Path to a previously saved ARR Data Hub response JSON file to use instead of a live request.
max_retries (int, optional) – Number of times a failed ARR Data Hub request is retried with exponential backoff. Set to 0 to disable retries.
source_path (Path, optional) – The path the config was loaded from, used for error messages.
- __init__(site=<factory>, ifd=<factory>, events=<factory>, temporal_patterns=<factory>, climate_change=<factory>, preburst=<factory>, losses=<factory>, arf=<factory>, complete_storm=False, output=<factory>, response_json=None, max_retries=5, source_path=None)#
- Parameters:
site (SiteConfig)
ifd (IFDConfig)
events (EventsConfig)
temporal_patterns (TemporalPatternsConfig)
climate_change (ClimateChangeConfig)
preburst (PreburstConfig)
losses (LossesConfig)
arf (ArfConfig)
complete_storm (bool)
output (OutputConfig)
response_json (str | None)
max_retries (int)
source_path (Path | None)
- Return type:
None
Methods
Builds and validates a config from a dictionary (the parsed contents of a JSON config file).
Loads and validates a config from a JSON file.
Loads a batch of JSON config files where only
sitemay differ between files - every other setting is taken from the first config file (the "primary"/base config) regardless of what any later file contains, matching the legacy script's multi-catchment (catch_no) batching: one shared set of run options (events, losses, climate change, temporal patterns, output, etc), applied across multiple catchments/sites.Checks the config for errors.
Attributes
connection errors, timeouts, HTTP 429/5xx) ARR Data Hub request is retried, with exponential backoff.
Path to a previously-saved ARR Data Hub response JSON file (e.g. a prior run's
working_data/<site>_ARR_response.jsonoutput) to use instead of issuing a live API request for this site.path this config was loaded from, if any (used for error messages / relative paths)