Ensemble models¶
This module implements various ensemble techniques to combine the predictions of multiple Wave runup models.
Returns predicitons from each wave runup model |
|
Returns the mean parameter given by all the runup models. |
-
class
ensembles.
EnsembleRaw
(Hs=None, Tp=None, beta=None, Lp=None, r=None)¶ Returns predicitons from each wave runup model
This class runs predictions on all available runup models and returns the results from each model, i.e. no combining or ensembling is performed. It is provided as a base class for other ensemble models to inherit, they will need access to all predicitions anyway.
- Parameters
Hs (
float
orlist
) – Significant wave height. In order to account for energy dissipation in the nearshore, transform the wave to the nearshore, then reverse-shoal to deep water.beta (
float
orlist
) – Beach slope. Typically defined as the slope between the region of \(\pm2\sigma\) where \(\sigma\) is the standard deviation of the continuous water level record.Tp (
float
orlist
) – Peak wave period. Must be defined ifLp
is not defined.Lp (
float
orlist
) – Peak wave length Must be definied ifTp
is not defined.r (
float
orlist
) – Hydraulic roughness length. Can be approximated by \(r=2.5D_{50}\).
-
estimate
(param)¶ - Returns
Returns a pandas dataframe where each column contains the estimates returned by each runup model
- Parameters
param (
str
) – R2, setup, sig, sinc or swash
Examples: Get a dataframe containing all wave runup model predictions for Hs=4, Tp=11 and beta=0.1.
>>> from py_wave_runup.ensembles import EnsembleRaw >>> ensemble = EnsembleRaw(Hs=4, Tp=11, beta=0.1) >>> ensemble_r2 = ensemble.estimate('R2') >>> ensemble_r2 Stockdon2006_R2 Power2018_R2 ... Senechal2011_R2 Beuzen2019_R2 0 2.542036 NaN ... 1.972371 2.181613 [1 rows x 9 columns]
-
class
ensembles.
EnsembleMean
(Hs=None, Tp=None, beta=None, Lp=None, r=None)¶ Returns the mean parameter given by all the runup models.
- Parameters
Hs (
float
orlist
) – Significant wave height. In order to account for energy dissipation in the nearshore, transform the wave to the nearshore, then reverse-shoal to deep water.beta (
float
orlist
) – Beach slope. Typically defined as the slope between the region of \(\pm2\sigma\) where \(\sigma\) is the standard deviation of the continuous water level record.Tp (
float
orlist
) – Peak wave period. Must be defined ifLp
is not defined.Lp (
float
orlist
) – Peak wave length Must be definied ifTp
is not defined.r (
float
orlist
) – Hydraulic roughness length. Can be approximated by \(r=2.5D_{50}\).
-
estimate
(param)¶ - Returns
Returns the mean parameter given by all the runup models.
- Parameters
param (
str
) – R2, setup, sig, sinc or swash
Examples: Get a pandas series containing the mean wave runup model predictions for Hs=4, Tp=11 and beta=0.1.
>>> from py_wave_runup.ensembles import EnsembleMean >>> ensemble = EnsembleMean(Hs=[3,4], Tp=[10,11], beta=[0.09,0.1]) >>> ensemble_r2 = ensemble.estimate('R2') >>> ensemble_r2 0 1.969634 1 2.590786 Name: mean_R2, dtype: float64