hydroflows.methods.rainfall.pluvial_design_events#
Pluvial design events method.
- class hydroflows.methods.rainfall.pluvial_design_events.PluvialDesignEvents(precip_nc: ~pathlib.Path, event_root: ~pathlib.Path = PosixPath('data/events/rainfall'), rps: ~typing.Annotated[list[float], ~pydantic.functional_validators.BeforeValidator(func=~hydroflows._typing.<lambda>, json_schema_input_type=PydanticUndefined)] | None = None, event_names: ~typing.List[str] | None = None, ev_type: ~typing.Literal['BM', 'POT'] = 'BM', distribution: str | None = None, wildcard: str = 'event', duration: int = 48, **params)[source]#
Method for generating pluvial design events from rainfall timeseries.
- Parameters:
precip_nc (Path) – The file path to the rainfall time series in NetCDF format.
event_root (Path, optional) – The root folder to save the derived design events, by default “data/events/rainfall”.
rps (List[float], optional) – Return periods of design events, by default [1, 2, 5, 10, 20, 50, 100].
event_names (List[str], optional) – List of event names for the design events, by “p_event{i}”, where i is the event number.
ev_type (Literal["BM", "POT"]) – Method to select events/peaks. Valid options are ‘BM’ (default) for block maxima or ‘POT’ for Peak over threshold.
distribution (str, optional) – Type of extreme value distribution corresponding with ev_type. Options are “gumb” or “gev” for BM, and “exp” or “gpd” for POT. If None (default) is used, “gumb” is selected for BM and “exp” for POT.
wildcard (str, optional) – The wildcard key for expansion over the design events, by default “event”.
duration (int) – Duration of the produced design event, by default 48 hours.
**params – Additional parameters to pass to the PluvialDesignEvents Params instance.
Create a new expand method instance.
- pydantic model hydroflows.methods.rainfall.pluvial_design_events.Input[source]#
Input parameters for
PluvialDesignEvents
method.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field precip_nc: Path [Required]#
The file path to the rainfall time series in NetCDF format which are used to apply EVA and derive design events. This file should contain a time dimension This time series can be derived either by the
hydroflows.methods.rainfall.get_ERA5_rainfall.GetERA5Rainfall
or can be directly supplied by the user.
- pydantic model hydroflows.methods.rainfall.pluvial_design_events.Output[source]#
Output parameters for
PluvialDesignEvents
.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field event_set_yaml: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#
The path to the event set yml file, see also
hydroflows.methods.events.EventSet
.
- field event_yaml: Annotated[Path, AfterValidator(func=filedir_validator)] [Required]#
The path to the event description file, see also
hydroflows.methods.events.Event
.
- pydantic model hydroflows.methods.rainfall.pluvial_design_events.Params[source]#
Parameters for
PluvialDesignEvents
method.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Fields:
- field distribution: str | None = None#
Type of extreme value distribution corresponding with ev_type. Options are “gumb” or “gev” for BM, and “exp” or “gpd” for POT. If None (default) is used, “gumb” is selected for BM and “exp” for POT.
- field ev_type: Literal['BM', 'POT'] = 'BM'#
Method to select events/peaks. Valid options are ‘BM’ for block maxima or ‘POT’ for Peak over threshold.
- field event_names: <lambda>, json_schema_input_type=PydanticUndefined)] | None = None#
List of event names associated with return periods.
- field event_root: Annotated[Path, AfterValidator(func=outputdirpath_validator)] [Required]#
Root folder to save the derived design events.
- field min_sample_perc: int = 80#
Minimum sample percentage in a valid block. Peaks of invalid bins are set to NaN.
- field plot_fig: bool = True#
Determines whether to plot figures, including the derived design hyetographs as well as the calculated IDF curves per return period.
- field rps: <lambda>, json_schema_input_type=PydanticUndefined)] [Required]#
Return periods of interest.
- field save_idf_csv: bool = True#
Determines whether to save the calculated IDF curve values per return period in a csv format.
- field timesteps: <lambda>, json_schema_input_type=PydanticUndefined)] = [1, 2, 3, 6, 12, 24, 36, 48]#
Intensity Duration Frequencies provided as multiply of the data time step.