A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

py-wave-runup

A Python module which makes it easy for coastal engineers and scientists to test and use various empirical wave runup models which have been published in literature.
https://github.com/chrisleaman/py-wave-runup

Category: Hydrosphere
Sub Category: Coastal and Reefs

Keywords

beach beaches coastal coastal-engineering coastal-modelling

Keywords from Contributors

measurements reporter hurricanes ram storms noaa hint imagery php-framework prototype

Last synced: about 2 hours ago
JSON representation

Repository metadata

Empirical wave runup models implemented in Python

README.rst

          =================
Python Wave Runup
=================
::

    Empirical wave runup models implemented in Python for coastal engineers and scientists.

.. image:: https://zenodo.org/badge/180274721.svg
   :target: https://zenodo.org/badge/latestdoi/180274721

.. image:: https://img.shields.io/pypi/v/py-wave-runup.svg
        :target: https://pypi.python.org/pypi/py-wave-runup

.. image:: https://img.shields.io/travis/com/chrisleaman/py-wave-runup.svg
        :target: https://travis-ci.com/chrisleaman/py-wave-runup

.. image:: https://readthedocs.org/projects/py-wave-runup/badge/?version=latest
    :target: https://py-wave-runup.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://codecov.io/gh/chrisleaman/py-wave-runup/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/chrisleaman/py-wave-runup

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/ambv/black


Contents
----------
- `Installation`_
- `Usage`_
- `Documentation`_
- `Background`_
- `Contributing`_
- `Citation`_
- `License`_
- `References`_



Installation
------------

Installation of ``py-wave-runup`` can be done with pip:

.. code:: bash

    pip install py-wave-runup


Usage
-----

The following `wave runup models`_ are available for use:

- ``models.Stockdon2006``: The most commonly cited and widely used runup model.
- ``models.Power2018``: Based on the Gene-Expression Programming technique.
- ``models.Holman1986``: Incorporated wave setup using Duck, NC measurements.
- ``models.Nielsen2009``: Based on runup measurements from NSW, Australia.
- ``models.Ruggiero2001``: Based on runup measurements from dissipative Orgeon beaches.
- ``models.Vousdoukas2012``: Based on runup from European Atlantic coast
- ``models.Senechal2011``: Based on extreme storm condition at Truc Vert, France
- ``models.Beuzen2019``: Gaussian Process (GP) runup model
- ``models.Passarella2018``: Genetic Programming (infragravity and total) swash model 

To get calculate runup, setup and swash, define your offshore conditions in your
selected runup model then you can access each parameter:

.. code:: python

    from py_wave_runup import models

    model_sto06 = models.Stockdon2006(Hs=4, Tp=12, beta=0.1)

    model_sto06.R2     # 2.54
    model_sto06.setup  # 0.96
    model_sto06.sinc   # 2.06
    model_sto06.sig    # 1.65

.. _wave runup models: https://py-wave-runup.readthedocs.io/en/develop/models.html

Documentation
-------------
Documentation is located at https://py-wave-runup.readthedocs.io.


Background
----------

Wave runup refers to the final part of a wave's journey as it travels from offshore
onto the beach. It is observable by anyone who goes to the beach and watches the edge
of the water "runup" and rundown the beach. It is comprised of two components:

    - **setup**: the height of the time averaged superelevation of the mean water level
      above the Still Water Level (SWL)
    - **swash**: the height of the time varying fluctuation of the instantaneous water
      level about the setup elevation

Setup, swash and other components of Total Water Level (TWL) rise are shown in this
handy figure below.

.. image:: https://raw.githubusercontent.com/chrisleaman/py-wave-runup/master/docs/_static/VitousekDoubling2017Fig1.jpg
   :width: 500 px
   :align: center
..

    | Figure from Vitousek et al. (2017) [#vit17]_

Wave runup can contribute a significant portion of the increase in TWL in coastal
storms causing erosion and inundation. For example, Stockdon et al. (2006) [#sto06]_
collated data from numerous experiments, some of which showed wave runup 2% excedence
heights in excess of 3 m during some storms.

Given the impact such a large increase in TWL can have on coastlines, there has been
much research conducted to try improve our understanding of wave runup processes.
Although there are many processes which can influence wave runup (such as nonlinear
wave transformation, wave reflection, three-dimensional effects, porosity, roughness,
permeability and groundwater) [#cem06]_, many attempts have been made to derive
empirical relatinoships based on easily measurable parameters. Typically, empirical
wave runup models include:

    - **Hs**: significant wave height
    - **Tp**: peak wave length
    - **beta**: beach slope

This python package attempts to consolidate the work done by others in this field and
collate the numerous empirical relationships for wave runup which have been published.

Contributing
------------

As there are many different empirical wave models out there, contributions are most
welcome. If you don't feel confident about changing the code yourself, feel free to open
a `Github issue`_ and let us know what could be added. Otherwise, follow the steps below
to create a Pull Request:

.. _Github issue: https://github.com/chrisleaman/py-wave-runup/issues

1. Fork it (https://github.com/chrisleaman/py-wave-runup/fork)
2. Create the development environment:

    - For pip, run ``pip install --pre -r requirements.txt``
    - For `poetry`_, run ``poetry install``
    - For `anaconda`_, run ``conda env create --name  -f environment.yml``

3. Create your feature branch (``git checkout -b feature/fooBar``)
4. Install pre-commit hooks for automatic formatting (``pre-commit run -a``)
5. Add your code!
6. Add and run tests (``pytest``)
7. Update and check documentation compiles (``sphinx-build -M html ".\docs" ".\docs\_build"``)
8. Commit your changes (``git commit -am 'Add some fooBar``)
9. Push to the branch (``git push origin feature/fooBar``)
10. Create a new Pull Request

.. _poetry: https://python-poetry.org/
.. _anaconda: https://www.anaconda.com/distribution/#download-section


Citation
--------

If this package has been useful to you, please cite the following DOI: https://doi.org/10.5281/zenodo.2667464


License
--------

Distributed under the GNU General Public License v3.


References
----------

.. [#vit17] Vitousek, Sean, Patrick L. Barnard, Charles H. Fletcher, Neil Frazer,
       Li Erikson, and Curt D. Storlazzi. "Doubling of Coastal Flooding Frequency
       within Decades Due to Sea-Level Rise." Scientific Reports 7, no. 1 (May 18,
       2017): 1399. https://doi.org/10.1038/s41598-017-01362-7.
.. [#sto06] Stockdon, Hilary F., Robert A. Holman, Peter A. Howd, and Asbury H. Sallenger.
       "Empirical Parameterization of Setup, Swash, and Runup." Coastal Engineering 53,
       no. 7 (May 1, 2006): 573-88. https://doi.org/10.1016/j.coastaleng.2005.12.005
.. [#cem06] United States, Army, and Corps of Engineers. Coastal Engineering Manual.
       Washington, D.C.: U.S. Army Corps of Engineers, 2006.

        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 6 days ago

Total Commits: 202
Total Committers: 7
Avg Commits per committer: 28.857
Development Distribution Score (DDS): 0.243

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Chris Leaman c****n@g****m 153
dependabot-preview[bot] 2****] 25
Evan B. Goldstein e****n 7
Tomas Beuzen t****n@g****m 7
Christopher Leaman z****9@a****u 5
dependabot[bot] s****t@d****m 4
Matthew Conlin 3****t 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 18
Total pull requests: 218
Average time to close issues: 3 days
Average time to close pull requests: about 1 month
Total issue authors: 6
Total pull request authors: 7
Average comments per issue: 0.5
Average comments per pull request: 1.39
Merged pull request: 59
Bot issues: 0
Bot pull requests: 202

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/chrisleaman/py-wave-runup

Top Issue Authors

  • chrisleaman (13)
  • FrenzyExists (1)
  • pyup-bot (1)
  • avnibu (1)
  • conlin-matt (1)
  • Alerovere (1)

Top Pull Request Authors

  • dependabot-preview[bot] (134)
  • dependabot[bot] (68)
  • pyup-bot (12)
  • TomasBeuzen (1)
  • conlin-matt (1)
  • ebgoldstein (1)
  • mandithran (1)

Top Issue Labels

  • enhancement (9)

Top Pull Request Labels

  • dependencies (202)
  • security (5)

Package metadata

pypi.org: py-wave-runup

Empirical wave runup models implemented in Python

  • Homepage: https://github.com/chrisleaman/py-wave-runup
  • Documentation: https://py-wave-runup.readthedocs.io
  • Licenses: GPL-3.0+
  • Latest release: 0.1.10 (published about 5 years ago)
  • Last Synced: 2025-04-26T12:02:51.114Z (1 day ago)
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 427 Last month
  • Docker Downloads: 122
  • Rankings:
    • Dependent packages count: 7.373%
    • Forks count: 9.146%
    • Stargazers count: 11.421%
    • Average: 19.454%
    • Dependent repos count: 22.233%
    • Downloads: 47.099%
  • Maintainers (1)

Dependencies

environment.yml conda
  • black <20.0,>=18.3
  • codecov 2.*,>=2.0.0
  • coverage 5.*,>=5.0.0
  • joblib 0.*,>=0.14.1
  • numpy 1.*,>=1.16.0
  • pandas 0.*,>=0.25.3
  • pre-commit 1.*,>=1.18.0
  • pytest 5.*,>=5.3.0
  • pytest-cov 2.*,>=2.8.0
  • pytest-runner 5.*,>=5.1.0
  • scikit-learn 0.*,>=0.22.0
  • sphinx 2.*,>=2.3.0
  • sphinx-gallery 0.*,>=0.5.0
  • tomlkit 0.*,>=0.5.8
  • tox 3.*,>=3.13.0
docs/requirements.txt pypi
  • codecov ==2.
  • coverage ==5.
  • joblib ==0.
  • numpy ==1.
  • pandas ==0.
  • pytest ==5.
  • pytest-cov ==2.
  • pytest-runner ==5.
  • scikit-learn ==0.
  • sphinx ==2.
  • sphinx-gallery ==0.
  • tomlkit ==0.
  • tox ==3.
poetry.lock pypi
  • alabaster 0.7.12 develop
  • appdirs 1.4.4 develop
  • atomicwrites 1.4.0 develop
  • attrs 21.2.0 develop
  • babel 2.9.1 develop
  • black 21.6b0 develop
  • certifi 2021.5.30 develop
  • cfgv 3.3.0 develop
  • chardet 4.0.0 develop
  • click 8.0.1 develop
  • codecov 2.1.11 develop
  • colorama 0.4.4 develop
  • coverage 5.5 develop
  • cycler 0.10.0 develop
  • distlib 0.3.2 develop
  • docutils 0.17.1 develop
  • filelock 3.0.12 develop
  • identify 2.2.10 develop
  • idna 2.10 develop
  • imagesize 1.2.0 develop
  • importlib-metadata 4.6.1 develop
  • iniconfig 1.1.1 develop
  • jinja2 3.0.1 develop
  • kiwisolver 1.3.1 develop
  • markupsafe 2.0.1 develop
  • matplotlib 3.4.2 develop
  • mypy-extensions 0.4.3 develop
  • nodeenv 1.6.0 develop
  • packaging 21.0 develop
  • pathspec 0.8.1 develop
  • pillow 8.3.1 develop
  • pluggy 0.13.1 develop
  • pre-commit 2.13.0 develop
  • py 1.10.0 develop
  • pygments 2.9.0 develop
  • pyparsing 2.4.7 develop
  • pytest 6.2.4 develop
  • pytest-cov 2.12.1 develop
  • pytest-runner 5.3.1 develop
  • pyyaml 5.4.1 develop
  • regex 2021.7.6 develop
  • requests 2.25.1 develop
  • scikit-learn 0.24.2 develop
  • scipy 1.6.1 develop
  • snowballstemmer 2.1.0 develop
  • sphinx 4.0.3 develop
  • sphinx-gallery 0.9.0 develop
  • sphinxcontrib-applehelp 1.0.2 develop
  • sphinxcontrib-devhelp 1.0.2 develop
  • sphinxcontrib-htmlhelp 2.0.0 develop
  • sphinxcontrib-jsmath 1.0.1 develop
  • sphinxcontrib-qthelp 1.0.3 develop
  • sphinxcontrib-serializinghtml 1.1.5 develop
  • threadpoolctl 2.1.0 develop
  • toml 0.10.2 develop
  • tomlkit 0.7.2 develop
  • tox 3.23.1 develop
  • typed-ast 1.4.3 develop
  • typing-extensions 3.10.0.0 develop
  • urllib3 1.26.6 develop
  • virtualenv 20.4.7 develop
  • zipp 3.5.0 develop
  • joblib 0.14.1
  • numpy 1.21.0
  • pandas 1.1.5
  • python-dateutil 2.8.1
  • pytz 2021.1
  • six 1.16.0
pyproject.toml pypi
  • black ^21.6b0 develop
  • codecov ^2.0 develop
  • coverage ^5.0 develop
  • matplotlib ^3.4.2 develop
  • pre-commit ^2.9 develop
  • pytest ^6.0 develop
  • pytest-cov ^2.8 develop
  • pytest-runner ^5.1 develop
  • scikit-learn ^0.24.2 develop
  • sphinx ^4.0 develop
  • sphinx-gallery ^0.9.0 develop
  • tomlkit ^0.7.0 develop
  • tox ^3.13 develop
  • joblib ^0.14.1
  • numpy ^1.16
  • pandas ^1.0
  • python ^3.7 || ^3.8 || ^3.9
requirements.txt pypi
  • black <20.0,>=18.3
  • codecov ==2.
  • coverage ==5.
  • joblib ==0.
  • numpy ==1.
  • pandas ==0.
  • pre-commit ==1.
  • pytest ==5.
  • pytest-cov ==2.
  • pytest-runner ==5.
  • scikit-learn ==0.
  • sphinx ==2.
  • sphinx-gallery ==0.
  • tomlkit ==0.
  • tox ==3.

Score: 12.418341278692079