Datasets

This module is an interface for loading existing wave runup datasets. These datasets can be used to evaluate existing models or train new models. Datasets are returned as pandas.DataFrame.

load_power18

Loads wave runup data included with Power et al (2018)

load_random_sto06

Loads a randomly generated wave runup dataframe.

datasets.load_power18()

Loads wave runup data included with Power et al (2018)

This function loads the supplementary data from:

Power, H.E., Gharabaghi, B., Bonakdari, H., Robertson, B., Atkinson, A.L., Baldock, T.E., 2018. Prediction of wave runup on beaches using Gene-Expression Programming and empirical relationships. Coastal Engineering. https://doi.org/10.1016/j.coastaleng.2018.10.006

Examples

>>> from py_wave_runup import datasets
>>> df = datasets.load_power18()
>>> df.describe()
                hs           tp         beta    roughness           r2
count  1390.000000  1390.000000  1390.000000  1390.000000  1390.000000
mean      1.893131     9.227035     0.120612     0.024779     2.318814
std       1.309243     3.589004     0.062236     0.043617     1.776918
min       0.018576     0.805805     0.009000     0.000003     0.027336
25%       0.895942     7.517556     0.088228     0.001000     1.103500
50%       1.848050     9.963089     0.108422     0.003750     1.923500
75%       2.391756    10.995500     0.129220     0.007500     3.406660
max       7.174100    23.680333     0.286551     0.125000    12.669592
datasets.load_random_sto06(seed=12345, t_start=datetime.datetime(2000, 1, 1, 0, 0), t_end=datetime.datetime(2000, 1, 2, 0, 0), dt=datetime.timedelta(seconds=3600), hs_range=(1, 3), tp_range=(6, 10), beta_range=(0.08, 0.1), noise_std=0.3)

Loads a randomly generated wave runup dataframe.

This function returns a randomly generated pandas.DataFrame containing wave parameters and noisey runup values calculated using the Stockdon et al (2006) runup model. This random data is intended to be used to demonstrate runup analysis without having to use actual data

Parameters
  • seed (int) – Seed the random number generator

  • t_start (datetime.datetime) – Start time of the dataframe

  • t_end (datetime.datetime) – End time of the dataframe

  • dt (datetime.timedelta) – Time interval of the dataframe

  • hs_range (tuple) – Range (min, max) of the significant wave height

  • tp_range (tuple) – Range (min, max) of the peak wave period

  • beta_range (tuple) – Range (min, max) of the nearshore slope

  • noise_std (float) – Standard deviation (in meters) of the wave runup statistics.

Returns

A pandas.DataFrame

Examples

Get

>>> from py_wave_runup import datasets
>>> df = datasets.load_random_sto06()
>>> df.head()
                           hs        tp      beta  ...     swash       sig      sinc
2000-01-01 00:00:00  3.000000  6.000000  0.098110  ...  1.171474  0.717714  0.894084
2000-01-01 01:00:00  2.850109  6.128432  0.099052  ...  1.378190  0.919351  1.104072
2000-01-01 02:00:00  2.865462  6.461471  0.099766  ...  1.154970  0.664189  0.866796
2000-01-01 03:00:00  2.942888  6.750824  0.100000  ...  1.223142  0.701520  0.918580
2000-01-01 04:00:00  2.906808  6.937742  0.099069  ...  2.001251  1.476527  1.687905

[5 rows x 8 columns]