seriffic commited on
Commit
47b27e6
·
1 Parent(s): f68a9cd

USGS STN Hurricane Ida 2021 high-water marks

Browse files

Field-surveyed peak water elevations from the USGS Short-Term Network
flood-response deployment after Ida (Sep 1, 2021). Where Sandy is
the storm-tide reference for coastal NYC, Ida is the cloudburst-pluvial
reference for inland and basement flooding — different physics, same
'what actually happened' grounding role.

Specialist returns the nearest mark by haversine distance plus depth
in feet; the reconciler treats it as point evidence, not extent.

app/flood_layers/ida_hwm.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Hurricane Ida (Sept 2021) empirical flood extent — USGS high-water marks.
2
+
3
+ This specialist plays the same role as Prithvi-EO 2.0 (Sen1Floods11)
4
+ in the parent triangulation-engine: it provides empirical post-event
5
+ flood evidence (versus the modeled scenarios from FEMA/DEP). Where
6
+ Prithvi derives extent from Sentinel-1 SAR, USGS HWMs are surveyed
7
+ ground-truth water marks. Both are valid empirical signals; HWMs
8
+ are the public record for Ida specifically.
9
+
10
+ Output per address: number of HWMs within radius, max water elevation
11
+ (ft), nearest site description.
12
+ """
13
+ from __future__ import annotations
14
+
15
+ import json
16
+ import math
17
+ from dataclasses import dataclass
18
+ from functools import lru_cache
19
+ from pathlib import Path
20
+
21
+ DATA = Path(__file__).resolve().parent.parent.parent / "data" / "ida_2021_hwms_ny.geojson"
22
+ DOC_ID = "ida_hwm"
23
+ CITATION = "USGS STN Hurricane Ida 2021 high-water marks (Event 312, NY)"
24
+
25
+
26
+ @dataclass
27
+ class HWMSummary:
28
+ n_within_radius: int
29
+ radius_m: int
30
+ max_elev_ft: float | None
31
+ max_height_above_gnd_ft: float | None
32
+ nearest_dist_m: float | None
33
+ nearest_site: str | None
34
+ nearest_elev_ft: float | None
35
+ sample_sites: list[str]
36
+
37
+
38
+ def _haversine_m(lat1, lon1, lat2, lon2):
39
+ R = 6371000.0
40
+ p1, p2 = math.radians(lat1), math.radians(lat2)
41
+ dp = math.radians(lat2 - lat1); dl = math.radians(lon2 - lon1)
42
+ a = math.sin(dp / 2) ** 2 + math.cos(p1) * math.cos(p2) * math.sin(dl / 2) ** 2
43
+ return 2 * R * math.asin(math.sqrt(a))
44
+
45
+
46
+ @lru_cache(maxsize=1)
47
+ def _load() -> list[dict]:
48
+ if not DATA.exists():
49
+ return []
50
+ with open(DATA) as f:
51
+ return json.load(f).get("features", [])
52
+
53
+
54
+ def summary_for_point(lat: float, lon: float, radius_m: int = 1000) -> HWMSummary | None:
55
+ feats = _load()
56
+ if not feats:
57
+ return None
58
+ in_radius = []
59
+ nearest = (None, float("inf"), None)
60
+ for f in feats:
61
+ flon, flat = f["geometry"]["coordinates"]
62
+ d = _haversine_m(lat, lon, flat, flon)
63
+ if d <= radius_m:
64
+ in_radius.append((d, f))
65
+ if d < nearest[1]:
66
+ nearest = (f, d, None)
67
+ nf, nd, _ = nearest
68
+ elevs = [f["properties"].get("elev_ft") for _, f in in_radius
69
+ if f["properties"].get("elev_ft") is not None]
70
+ heights = [f["properties"].get("height_above_gnd") for _, f in in_radius
71
+ if f["properties"].get("height_above_gnd") is not None]
72
+ sites = [f["properties"].get("site_description") for _, f in in_radius]
73
+ sites = [s for s in sites if s][:5]
74
+ return HWMSummary(
75
+ n_within_radius=len(in_radius),
76
+ radius_m=radius_m,
77
+ max_elev_ft=round(max(elevs), 2) if elevs else None,
78
+ max_height_above_gnd_ft=round(max(heights), 2) if heights else None,
79
+ nearest_dist_m=round(nd, 0) if nf is not None else None,
80
+ nearest_site=nf["properties"].get("site_description") if nf else None,
81
+ nearest_elev_ft=nf["properties"].get("elev_ft") if nf else None,
82
+ sample_sites=sites,
83
+ )
data/ida_2021_hwms_ny.geojson ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:948b8cc6fcdbfed1d5a6dc3ac59d4a616c012b19a2a4bfa950d2ac1893ce2568
3
+ size 65474