hydroflows.methods.coastal.coastal_design_events_from_rp_data#

Derive coastal design events from tide, surge timeseries and return period dataset.

class hydroflows.methods.coastal.coastal_design_events_from_rp_data.CoastalDesignEventFromRPData(surge_timeseries: Path, tide_timeseries: Path, bnd_locations: Path, rp_dataset: Path, rps: List[float] | None = None, event_root: Path = PosixPath('data/events/coastal'), event_names: List[str] | None = None, wildcard: str = 'event', **params)[source]#

Derive coastal design events from tide, surge timeseries and return period dataset.

Parameters:
  • surge_timeseries (Path) – Path to surge timeseries data.

  • tide_timeseries (Path) – Path to tides timeseries data.

  • rp_dataset (Path) – Path to return period dataset.

  • rps (List[float], optional) – List of return periods in the rp_dataset, by default None and extracted from rp_dataset.

  • event_root (Path, optional) – Folder root of output event catalog file, by default “data/interim/coastal”

  • event_names (List[str], optional) – List of event names for the design events, by “p_event{i}”, where i is the event number.

  • wildcard (str, optional) – The wildcard key for expansion over the design events, by default “event”.

Create a new expand method instance.

pydantic model hydroflows.methods.coastal.coastal_design_events_from_rp_data.Input[source]#

Input parameters for the CoastalDesignEvents 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 bnd_locations: Path [Required]#

Path to file with locations corresponding to timeseries data.

field rp_dataset: Path [Required]#

Path to return period data set

field surge_timeseries: Path [Required]#

Path to surge timeseries data.

field tide_timeseries: Path [Required]#

Path to tides timeseries data.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.coastal.coastal_design_events_from_rp_data.Output[source]#

Output parameters for the CoastalDesginEvents 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 event_csv: Path [Required]#

Path to event timeseries csv file

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

Path to event description file, see also hydroflows.methods.events.Event.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.coastal.coastal_design_events_from_rp_data.Params[source]#

Params for the CoastalDesginEvents 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 event_names: <lambda>, json_schema_input_type=PydanticUndefined)] | None = None#

List of event names for the design events.

field event_root: Annotated[Path, AfterValidator(func=outputdirpath_validator)] [Required]#

Root folder to save the derived design events.

field locs_col_id: str = 'stations'#

Name of locations identifier. Defaults to “stations”.

field ndays: int = 6#

Duration of derived events in days.

field plot_fig: bool = True#

Make hydrograph plots

field rps: <lambda>, json_schema_input_type=PydanticUndefined)] [Required]#

Return periods of rp_dataset.

field t0: datetime = datetime.datetime(2020, 1, 1, 0, 0)#

Arbitrary time of event peak.

field wildcard: str = 'event'#

The wildcard key for expansion over the design events.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.