pycoastkit.sandbars¶
Sandbars: detection and description from cross-shore profiles.
Sandbars are shore-parallel ridges of sand in the surf zone, each with a
crest and a trough on either side. They break waves offshore and so shape how
much a storm erodes the beach. Work on shoreline-relative profiles (see
:func:pycoastkit.shoreline_relative_profiles) so that bar distances are
measured from the shoreline.
bar_height
¶
Height of a crest above the straight line joining its two troughs [m].
find_sandbars
¶
find_sandbars(x, elevation, smooth_sigma=2.0, x_range=(0.0, None), reference_level=1.25, min_distance=50.0, zone_split=170.0, min_height=(0.24, 0.5), keep_all=False)
Find the sandbars on one profile.
Steps
- Keep positions inside
x_range(default: from the shoreline seaward on a shoreline-relative profile) and smooth with a Gaussian filter (smooth_sigmain grid points; 0 = no smoothing). - Crests are local maxima and troughs local minima of the smoothed profile.
- Each crest is paired with the nearest trough on each side. If there is no trough seaward (the profile keeps falling), the last point is used, at the lower of its own elevation and the landward trough's. Crests without a landward trough are part of the beach face and are skipped.
- A bar is kept if its crest is more than
min_distancefrom x = 0 and its height exceedsmin_height[0](inner zone, crest at or withinzone_split) ormin_height[1](outer zone). Usekeep_all=Trueto return every crest with its zone and skip this filter.
Returns:
| Type | Description |
|---|---|
DataFrame
|
One row per bar, landward to seaward: |
Source code in src/pycoastkit/sandbars.py
sandbar_table
¶
:func:find_sandbars for every survey.
Returns one row per bar with a time column first; options are
passed to :func:find_sandbars.
Source code in src/pycoastkit/sandbars.py
bar_state
¶
Bar configuration of each survey, from :func:sandbar_table output.
For each survey: n_inner, n_outer, profile_type (1 unbarred,
2 inner bar only, 3 outer bar only, 4 both; see :data:PROFILE_TYPES)
and the properties of the highest inner and outer bar (inner_crest_x,
inner_height, inner_depth, inner_slope_land,
inner_slope_sea, and the same with outer_).
times lists all surveys so that unbarred ones appear too (pass the
profile table's index).