Why do cordgrass, glasswort, meadow and shrubs grow in bands? Each centimetre of elevation floods for a different share of the time. Set the tide, sea level and evaporation and watch the bands move, from the flooded creek bank up to the salt-stressed high marsh.
Blue line: share of time an elevation is under water. Coloured bands: where each plant's hydroperiod window falls. Dashed: current water level.
Each button recomputes the zones with the current settings and changes one thing.
The science
Tide. The water level above mean sea level is the sum of two main lunar and solar tides, h(t) = a cos(2πt/12.42 h) + r a cos(2πt/12.00 h) + SLR. M2 (principal lunar) has amplitude a; S2 (principal solar) has the fraction r of it (about 0.46 in many places). They drift in and out of phase every 1/(1/12 − 1/12.42) = 14.8 days: spring tides when they add, neap tides when they partly cancel. Sea-level rise raises the mean.
Hydroperiod. The hydroperiod of an elevation z is the fraction of time with h(t) > z. For a single M2 tide it has the closed form H(z) = arccos((z − SLR)/a)/π; with S2 added it is measured by counting samples over two full spring-neap cycles. Elevations well below the mean are flooded most of the time, above the highest tide never.
Zonation. Plants differ in how much flooding (oxygen-starved roots) and salt they tolerate. The windows used here (cordgrass 18-55 % flooded, glasswort 6-18 %, high-marsh meadow 1.2-6 %, shrubs below 1.2 %) are illustrative round numbers that reproduce the textbook order, not measurements of any marsh; above 55 % the ground is bare mud. A plant is replaced by a bare salt pan where the mean pore-water salinity exceeds its tolerance (60, 95, 50, 25 ppt).
Salinity box model. Each elevation is a root-zone column of water depth W = 150 mm. When flooded, the pore water relaxes towards seawater (35 ppt) with rate kF = 0.35 / h; always, it relaxes weakly (kG = 0.002 / h) towards fresh groundwater (5 ppt); when exposed, net evaporation E − R concentrates the salt, ds/dt = s (E−R)/W. Each step is the exact solution of the linear equation for the current state. High marsh that floods only on spring tides therefore becomes hypersaline in dry, hot weather.
What is simplified. One uniform tide for the whole marsh (no tidal wave delay or creek-network drainage), a flat-lying horizontal water surface, no sediment accretion or erosion (see the separate accretion simulation), no rainfall events or groundwater flow, no competition or dispersal among plants, fixed round-number plant windows. Elevation is relative to mean sea level; the terrain is a stylised transect, not a surveyed site.