# Tier 1 habitat model for *Thinozercon michaeli*: SW Wales and the three Irish record areas
_Working document, 17 August 2026. Prioritisation only. Not a prediction of where the mite is._

## What this is
A deductive (rule based) habitat suitability ranking, built from what the historical records have in common and applied to real shoreline geometry. It answers "which shores look most like Westport, Howth, Lough Hyne and the inner Daugleddau?", so that weekend trips go to the likeliest places first. It now covers two areas:

- **SW Wales**, Milford Haven east to the Ogmore (Milford Haven and the Daugleddau, Carmarthen Bay and the Three Rivers, the Loughor, Gower, Swansea Bay, the Neath, Afan and Ogmore). 38 named shores.
- **Ireland**, the three record areas: Clew Bay (Westport, Halbert 1915), Dublin Bay and Howth (Howth south shore, Halbert 1915) and Lough Hyne with the neighbouring West Cork inlets (Athias-Binche 1982). 27 named shores. Ireland was added for two reasons: as a sanity test of the rules against the places the mite has actually been found, and to give anyone in Ireland a ranked list too.

## What is data and what is opinion (read this first)
A fair objection to the maps is that they look like a model of how sheltered the inlets are. They largely are. Of the four terms in the score, two are computed from the coastline (shelter, and the estuarine setting, which is nearly the same thing), one is bookkeeping (distance from a known site), and one, **substrate, is typed in by hand**. Only four shores have a documented substrate: Beggar's Reach and Castle Reach (Pugh, King & Fordy 1987: "tidal debris and under stones"), Westport (Halbert 1915: "under stones on the sea-shore", low shore stones "partly embedded in sandy mud") and Pennard Pill (our own recce photos). Every other substrate value is opinion, and the tables now say so in a `substrate_source` column, the maps draw those sites with a dashed ring, and a `score_shelter_only_of_4` column gives the computed part on its own.

The fix is habitat polygons, and the code for it is written and tested: `substrate_from_data.py` reads NRW's Marine Phase 1 Intertidal Habitat Survey (biotope polygons), EMODnet habitat GeoJSON, or an OpenStreetMap Overpass export (natural=mud/shingle/beach, wetland=tidalflat/saltmarsh, surface=...), classifies every polygon within 300 m of each site (mixed sediment or strandline = 2; mud, muddy sand, shingle, sheltered rock, saltmarsh = 1; clean sand, exposed rock, sea walls = 0; and mud plus stones together = 2, Halbert's mix), writes the evidence per site, and with `--apply` replaces the priors so `rank_sites.py` re-scores from data. **It could not be run from this session**: DataMapWales, the Overpass API, the OSM API and EMODnet's WFS were all unreachable (blocked), so the substrate on the current maps is still opinion. On any ordinary machine: `python3 substrate_from_data.py --print-queries` (URLs and the Overpass query, browser is enough), then `--nrw file.json` or `--osm file.json`, then `--apply`, then `python3 rank_sites.py` and the map commands in REPRODUCE.md.

Habitat type in the fuller sense (shore height, strandline debris, brackish influence, the companion mite guild) cannot be mapped from a desk at all; that is what the field sheet records, and the occupancy idea in the upgrades list is how it becomes a model.

## Why not a "proper" species distribution model
Four records (five counting the two Daugleddau reaches separately), spread over 1909 to 1987, collected by two people in the places they happened to work, with no environmental data at the scale of a stone. Correlative models (MaxEnt etc.) need tens of records and meaningful predictors; Pearson et al. (2007, J. Biogeogr. 34: 102–117) show jackknifed MaxEnt can be tested down to about five records, but only against continent scale climate layers. Here the predictors that matter (shelter, substrate, shore height) are local, so a rule set from the literature is more honest than a fitted surface.

## The rules (all from the sources on the site)
| Criterion | Evidence | How it is scored |
|---|---|---|
| Very sheltered, low energy shore | Clew Bay (drumlin islands), Howth's Dublin Bay side, Lough Hyne (sea lough), inner Daugleddau (ria) | Exposure = number of the 16 compass sectors with more than 3 km of open water. 0 to 1 sectors = 3 (extremely sheltered); 2 to 3 = 2 (very sheltered); 4 to 5 = 1 (sheltered); 6 or more = 0 (exposed). Mean fetch is also reported. |
| Stones partly embedded in sandy mud, or tidal debris on mud/stones | Halbert 1915 pp. 47, 84; Pugh et al. 1987 p. 108; Athias-Binche 1982 | Substrate prior (expert guess pending NRW data): mixed sediment with stones/shingle = 2; mud or sand flat with stony margins = 1; clean sand or bare rock = 0 |
| Estuarine / enclosed water setting | all four sites | 1 if estuary, ria, pill, sea lough or enclosed bay; else 0 |
| Proximity to a known site | Pugh et al. 1987 (Beggar's Reach, Castle Reach); Halbert 1915 (Westport, Howth); Athias-Binche 1982 (Lough Hyne) | 2 = the recorded shore itself; 1 = same water body within a few km; 0 otherwise |
| Shore height | Halbert low shore; Pugh upper shore and splash zone | Not used to exclude anything: sample the whole shore height (see field sheet) |

Score out of 8. Ties broken by open sectors, then mean fetch.

Why open sectors rather than mean fetch: coast cells always have land on one side, and a narrow tidal creek digitised as a straight line has one long open direction down its length, so mean fetch called Pennard Pill "exposed" while calling Tenby seafront "sheltered". Counting how many sectors see open water fixes both cases and matches how exposure is judged on the ground.

## Data and method
- **Coastline**: GSHHG full resolution via `basemap`, with `area_thresh=0.001` so islands down to 0.001 km² are kept (basemap's default drops anything under 1 km², which erased every drumlin island in Clew Bay and the skerries of Milford Haven). GSHHG treats tidal channels as rivers, so nineteen Welsh ones were digitised by hand as centrelines with widths and burnt into the water mask before the fetch run: Daugleddau from the Cleddau Bridge to Picton Point, Western and Eastern Cleddau, Cresswell, Carew, Pembroke River, Westfield Pill, Sandy Haven Pill, the Gann, upper Loughor, Tywi, Taf, Gwendraeth, Pennard Pill, Nicholaston Pill, and (added 17 Aug) the Tawe, Neath, Afan and Ogmore. Coordinates and widths are in `fetch_model.py` (`CHANNELS_WALES`); they are approximate, from charts and memory, and should be replaced by OS or OSM water polygons when someone has them to hand. No channels were needed in Ireland: GSHHG already carries the drumlin channels of Clew Bay, the Bull Island lagoon, Baldoyle and Broadmeadow, and Lough Hyne with its Rapids. (The upper Ilen above Oldcourt is missing; it is a river in GSHHG.)
- **Fetch**: land rasterised on a 100 m grid. For every sea cell touching land, rays cast in 16 directions to the first land cell, capped at 60 km (rays leaving the grid count as open sea). Stored per coast cell: mean, median and geometric mean fetch, and the fraction of directions blocked within 3 km (from which the open sector count is derived). Script: `fetch_model.py`; one run per region. Boxes and outputs: Wales 51.45 to 51.86 N, 5.35 to 3.55 W, `coast_fetch_wales.json` (8,184 coast points; also copied to `coast_fetch.json`); Clew Bay 53.74 to 53.92 N, 10.05 to 9.48 W, `coast_fetch_clewbay.json` (5,337); Dublin Bay 53.25 to 53.47 N, 6.32 to 5.98 W, `coast_fetch_dublinbay.json` (1,918); Lough Hyne 51.44 to 51.58 N, 9.55 to 9.05 W, `coast_fetch_loughhyne.json` (3,298).
- **Sites**: 38 Welsh and 27 Irish shores, hand placed; each takes the median exposure of coast points within 0.9 km (0.35 km for the small pills, 0.55 km for Lough Hyne itself). Script: `rank_sites.py`; outputs `site_ranking.csv/.json` (Wales), `site_ranking_ireland.csv/.json`, `site_ranking_all.csv/.json`. Every row records how many coast points it was scored from (`coast_points`), where its substrate value comes from (`substrate_source`: a paper, the recce, "data: ..." once habitat polygons have been applied, or "guess"), and the computed part of the score on its own (`score_shelter_only_of_4`).
- **Substrate from data**: `substrate_from_data.py` (see the section above); writes `substrate_from_data.csv/.json` and, with `--apply`, `substrate_overrides.json`, which `rank_sites.py` reads automatically. Tested here on synthetic files (`tests/`); not yet run on real data.
- **Maps**: `make_map2.py` renders `tier1_map_{overview,haven,gower,swansea,clewbay,dublinbay,loughhyne}.svg/.png` in the site's style. Recorded sites carry a star.

## Result, Wales (top of the table)
Castle Reach and Beggar's Reach score 8 of 8 (by construction: they are the known sites). At 7 come the rest of the inner Daugleddau and its creeks: Lawrenny / Cresswell River, Carew River / Milton, Black Tar / Llangwm (a muddy shingle beach between the two 1987 reaches), and Burton / Cleddau Bridge. At 6: Neyland / Westfield Pill, Pembroke River, Landshipping / Picton Point, the Gann at Dale, and, new this round, **Briton Ferry / the Neath estuary**, the only shore east of the Loughor to reach 6 (extremely sheltered, muddy, stony and shingly under wooded banks, an estuary). At 5: the Tawe estuary above Swansea marina, the Ogmore estuary, Aberavon / the Afan mouth, Kidwelly / Gwendraeth, Loughor Bridge, Penclawdd, Laugharne / Taf, and Pennard Pill at Three Cliffs. Dale beach, Ferryside and Angle Bay sit at 4; Swansea Docks, Sandy Haven Pill, Nicholaston Pill, Crofty and Crymlyn Burrows at 3. Open Gower, Carmarthen Bay and Swansea Bay beaches (Port Eynon, Burry Port, Blackpill, Baglan Bay, Kenfig, Porthcawl) score 0 to 1 and can be left alone.

Reading: the model agrees with the two intuitions we already had (the Daugleddau first, the quiet inlets of Gower second), adds three concrete places we had not named in Pembrokeshire (Black Tar, the Cresswell/Carew creeks, the Gann/Angle Bay corner of the outer Haven), and now says that if the group wants a nearby, low effort trip on the Swansea side, the Neath estuary at Briton Ferry and the Tawe above the marina are the ones to try, with the Ogmore and Afan mouths as smaller versions of the same thing.

The "little unlabelled bit by Swansea" on the earlier Gower map was the Tawe estuary and Swansea Docks foreshore, cut off at the map's edge; both are now named, and the Swansea Bay map covers everything east to the Ogmore.

## Result, Ireland, and what it says about the rules
| Recorded shore | Open sectors of 16 | Class under the rules | Score |
|---|---|---|---|
| Westport Quay / Roman Island (Halbert 1915) | 0 | extremely sheltered | 8 |
| Lough Hyne (Athias-Binche 1982) | 0 | extremely sheltered | 7 |
| Howth south shore, Sutton strand to Red Rock (Halbert 1915) | 4 | sheltered | 4 |

Two of the three come out at the top, as they should. **Howth does not.** Its south shore looks across Dublin Bay for 4 of the 16 sectors and only reaches "sheltered", one point of three. That is the model's most useful single result: it puts an upper bound on the exposure the mite is known to tolerate (about 4 open sectors, mean fetch about 4 km, in an Irish Sea bay with no ocean swell). Two consequences:

1. The shelter rule is stricter than the mite. Shores in the "sheltered" class (4 to 5 open sectors) should not be dropped, especially where the substrate is right. In Wales that keeps Angle Bay, Sandy Haven Pill and Nicholaston Pill in play. The rankings now carry a column `at_least_as_sheltered_as_Howth` (open sectors 4 or fewer) so this can be filtered directly.
2. It is a reason to keep the substrate and shore height rules central rather than shelter alone: Halbert's Howth stones were "well below high-water mark ... partly embedded in sandy mud", and that microhabitat, not the fetch, is probably what the three Irish sites and the Daugleddau share.

Below the recorded shores, the Irish table puts Rosmoney / Collanmore channels and Rosbeg (inner Clew Bay drumlins) at 7; Newport estuary, Sutton Creek / Bull Island lagoon, Mulranny, Barloge Creek and Murrisk at 6; the Ilen estuary, Ballydehob, Baltimore harbour, Baldoyle estuary, Castlehaven and Glandore at 5. Every Irish substrate prior is a guess from general knowledge (no recce), and every note says so; a local collaborator should overwrite them.

## What is missing, and how to fix it (for Claude Code)
1. **Substrate is a guess, and the code to replace it is ready.** Run `substrate_from_data.py` (above) on a machine with ordinary internet access. Source of choice: NRW's Marine Phase 1 Intertidal Habitat Survey (biotope polygons for the whole Welsh coast, OGL licence). Layer group on DataMapWales: `geonode:nrw_intertidal_phase_1_habitat_survey`; layers `nrw_ph1_intertidal_biotope` (polygons) and `nrw_ph1_intertidal_notes` (points). WFS: `https://datamap.gov.wales/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=geonode:nrw_ph1_intertidal_biotope&outputFormat=application/json` (add a BBOX filter). It could not be fetched from this session (robots.txt), so pull it from a normal machine, then for each site take the biotope codes within 300 m and score: littoral mixed sediment / mud with cobbles and boulders (LS.LMx, LS.LMu with stones, LR.MLR/LR.LLR mixed) = 2; LS.LMu / LS.LSa flats = 1; clean LS.LSa or bedrock = 0. For Ireland the equivalent is the MSFD / EUNIS intertidal habitat mapping held by the Marine Institute and NPWS; a local recce is quicker.
2. **Fetch could use the published index.** Burrows, Harvey & Robb (2008, Mar. Ecol. Prog. Ser. 353: 1–12) published a wave fetch model for the whole UK/Ireland coast at 200 m; using it would remove the "sketched channel" fudge and put Wales and Ireland on exactly the same footing.
3. **Ireland is now in** (17 Aug 2026). What remains there is the substrate: every Irish prior is a guess; the same script takes an Overpass export for the three Irish boxes (`--print-queries` prints them).
4. **Occupancy over time.** As field records accumulate, the raw observations on each Shore Search Record (position on shore, substrate, conditions beneath stones, associated fauna at broad group level, and search effort) can be scored in analysis and fitted against presence of the companion guild once specimens have been identified in the lab; that is a real, fittable model long before *Thinozercon* itself turns up. The scoring happens in analysis, not on the sheet.
5. **The company as a signal.** GBIF was checked (17 Aug 2026) for every species reported with *Thinozercon* (Halbert 1915 p. 47; Pugh, King & Fordy 1987): no records in Great Britain or Ireland with coordinates for any of them, none of *Thinozercon* anywhere. Widening to genus and family inside the South Wales frame found Malcolm Luxton's 1963 Llanrhidian salt marsh specimens (Ohio State University Acarology Laboratory: *Macrocheles* spp., *Leioseius salinus* (Halbert 1920), *Digamasellus halophilus*, *Rhodacarus strenzkei*) and one *Neomolgus littoralis* at Swansea: the halophile company of the upper shore, not Halbert's stones. The companion guild therefore still has to be collected, not downloaded; the field sheet records the associated fauna and habitat around each search patch, and species are identified afterwards under the microscope, and `browser/gbif_companions.py` (species, then genus, then family) refreshes the browser's layer.
6. **The Howth bound.** If anyone can find out exactly where on Howth's south shore Halbert collected (Halbert 1920, The Acarina of the seashore, may say), the exposure bound above becomes much sharper.

## Caveats to keep saying out loud
- Records are biased to where acarologists lived and were funded; the model can only find more places like the ones people already looked at.
- If Athias-Binche is right that this is an isolated relict, suitable habitat may be empty; that argues for weighting the Daugleddau above equally suitable Gower shores, which the "known site" points do.
- Substrate priors here are opinion; the site table says so in every row, and the Irish ones are weaker opinion than the Welsh ones.
- The 3 km / 16 sector exposure measure is coarse. Howth shows it can under-rate a shore the mite has lived on.
