pycoastkit
Documentation: https://salikathilakarathne.github.io/pycoastkit/
A toolkit for sandy coasts. pycoastkit finds storms in wave records,
describes the beach from cross-shore profile surveys (shoreline, sand volume,
slopes, sandbars), measures how much each storm eroded the beach and how much
came back afterwards, and scores beach vulnerability. It also downloads and
quality-controls the long Hasaki (Japan) wave and beach-profile records.
waves (Hs) ─► storms ─► clusters ─────────────────┐
├─► impacts (erosion) ─► recovery
profiles ─► shoreline · volume · slope · sandbars ─┘ │
└─► vulnerability index
Install
pip install pycoastkit
One package, everything included: analysis, plots, Hasaki data tools and the
pycoastkit command. Python 3.10 or newer.
Quick start
import pycoastkit as pck
# storms: Hs > 1.5 m for >= 6 h, peak >= 2.5 m; <= 48 h apart = same cluster
storms = pck.find_storms(waves, pck.StormCriteria(1.5, 2.5, min_duration_h=6, min_separation_h=48))
events = pck.storm_clusters(storms)
# beach state from profiles (rows = surveys, columns = cross-shore positions in m)
smooth = pck.smooth_profiles(profiles, sigma=2)
beach = pck.shoreline_positions(smooth, water_level=1.25).to_frame()
beach["volume"] = pck.beach_volume(smooth, x_min=-40, x_max=60)
# sandbars, measured from the shoreline
relative = pck.shoreline_relative_profiles(profiles, beach["shoreline"])
bars = pck.sandbar_table(relative) # one row per bar
state = pck.bar_state(bars, times=profiles.index) # profile type 1-4 per survey
# erosion, recovery and vulnerability per storm event
impact = pck.storm_beach_response(events, beach)
impact = pck.storm_recovery(impact, beach, n_days=10)
impact = pck.add_vulnerability_index(impact)
# figures
pck.plot.use_style()
pck.plot.plot_beach_response(impact)
Hasaki data in three commands
pycoastkit hasaki download 1987-2022 -d nowphas_kashima # NOWPHAS Kashima waves
pycoastkit hasaki qc nowphas_kashima -o hasaki_waves.csv # clean + QC report
pycoastkit storms hasaki_waves.csv --clusters -o hasaki_storms.csv
The HORS beach profiles are distributed by PARI on request; read them with
pck.hasaki.read_hors_profiles.
What is inside
One package, one module per topic. All are available after import pycoastkit as pck.
pycoastkit/
├── storms.py find_storms, storm_clusters, storm_power, add_storm_energy, ...
├── beach.py smooth_profiles, shoreline_relative_profiles, beach_volume, cut_and_fill, profile_slope
├── shoreline.py shoreline_position(s), foreshore_slope, flag_shoreline_outliers
├── sandbars.py find_sandbars, sandbar_table, bar_state, bar_height
├── impacts.py storm_beach_response, survey_before, survey_after
├── recovery.py storm_recovery, post_storm_conditions, iqr_outliers
├── vulnerability.py erosion_class, beach_vulnerability_index, susceptibility_index, return_periods
├── waves.py spectral_parameters, individual_wave_statistics, wave_energy_flux, storm_surge
├── skill.py skill_scores, skill_table, skill_by_quantile
├── plot.py storm timeline, storm counts, profiles, sandbars, beach response, ...
├── hasaki.py download_nowphas, read_nowphas, qc_nowphas, read_hors_profiles, hasaki_beach_state
└── cli.py the `pycoastkit` command
New features are added as new modules in the same package, so existing code keeps working.
The documentation explains every method, parameter and output column, with a user guide, an API reference and a glossary of coastal terms.
Data sources and citation
- Waves: NOWPHAS (Nationwide Ocean Wave information network for Ports and HArbourS), observed by the MLIT Ports and Harbours Bureau and processed by PARI, https://nowphas.mlit.go.jp/. Free to reuse with attribution; please download once and keep the files rather than re-fetching.
- Beach profiles: Hasaki Oceanographical Research Station, PARI. Banno, M., Nakamura, S., Kosako, T., Nakagawa, Y., Yanagishima, S., Kuriyama, Y. (2020). Long-term observations of beach variability at Hasaki, Japan. J. Mar. Sci. Eng. 8, 871. https://doi.org/10.3390/jmse8110871
- Storm power: Dolan, R., Davis, R. E. (1992). An intensity scale for Atlantic coast northeast storms. J. Coastal Res. 8(4), 840-853.
- Spectral parameters follow Häfner, Gemmrich & Jochum (2021), Real-world rogue wave probabilities, Sci. Rep. 11, 10084.
- Coastal background: Roelvink, D. and Reniers, A. (2012). A Guide to Modeling Coastal Morphology. Advances in Coastal and Ocean Engineering, Vol. 12. World Scientific. ISBN 978-981-4304-25-2.
Author and licence
Copyright © 2026 Salika Thilakarathne, Helmholtz-Zentrum Hereon. Released under the MIT licence.
Metadata
Release files for pycoastkit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycoastkit-0.1.0.tar.gz | 61.9 kB | With provenance | Details for pycoastkit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycoastkit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pycoastkit-0.1.0-py3-none-any.whl |
Total release size: 103.8 kB
Release files / pycoastkit-0.1.0.tar.gz
| Download URL | pycoastkit-0.1.0.tar.gz |
|---|---|
| Size | 61.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
538003923631a9e53d9177f0b6a8c72ade5b17a85dd546a9648e8a9cfaf7f5a1
|
|
BLAKE2b-256 checksum How to use checksums |
a272a09d7999c82215110cc7e239f0d5254120213745d7c9a9a9175497be8664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / pycoastkit-0.1.0-py3-none-any.whl
| Download URL | pycoastkit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
441d30613a443675dea9d7a4d7fa7cf680dd0db51399c282af438ae2e110ed4d
|
|
BLAKE2b-256 checksum How to use checksums |
9b62d841be6d8bd884d63408329a645d19f7579384e7bf3d29be7aed367670c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for pycoastkit 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pycoastkit-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.