feat(simulation): lakes from settled hydrology (D-227, T-1184)
Productionizes the T-1177 equilibrium solver: run_layer1 now solves hydrology once per body (~24ms, mirrors drainage::analyze) and carries it as TerrainAnalysis.hydrology; run_layer1_with_moisture threads the real body moisture ceiling (extracted derive_moisture_ceiling_q), with the T-1177 population-survey default as fallback. The resident rung-0 global tier does not exist yet (T-1181's scope) — hydrology rides TerrainAnalysis and lands in that tier for free when it is built (deviation recorded on the ticket). MorphologyZone::Lake is now sourced from the settled solver at derive time: a gridunit is Lake when bilinear-sampled filled surface exceeds bilinear-sampled original elevation at the sample's own (px, py) — the continuous comparison, so lake edges refine with rung like coastlines; never a discrete basin-cell projection. The gate sits strictly between OpenOcean (>= 80) and the old ocean_fraction heuristic (>= 60), which survives as the derive-fresh fallback when no solve is attached — byte-identical to pre-T-1184 output in that case. Static classification, distinct from the sim-state flooded plane; no endorheic bit (the drains-vs-closed cue is T-1185's outlet-course presence, per the D-227 amendment (4) sequencing). Zero new wire bytes. Acceptance: lake_classification_cache_hit_equals_cache_miss (solve twice independently, byte-identical zones, non-vacuous Lake hit) plus hydrology determinism tests. Golden fidelity: the window golden fixture now builds TerrainAnalysis through the production entry point (run_layer1_with_moisture, per-body), and a dedicated lake_bowl golden body pins the hydrology-sourced Lake path (morphology 1 at ocean_fraction_q 0 — provably not the heuristic); the 108 pre-existing golden rows are byte-identical (pure append). believability.json moved by one lake-shaped line (GJ338Bd voxel_relief_m 27->28, a correctly reclassified lake district leaving the dry-relief sample set). river_course and derivation-harness goldens unchanged. Full suite: 2114 passed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
"morphology_zones": 9,
|
||||
"vegetation_classes": 4,
|
||||
"terrain_materials": 4,
|
||||
"voxel_relief_m": 27,
|
||||
"voxel_relief_m": 28,
|
||||
"micro_habitat_distinct": 2
|
||||
},
|
||||
"coherence": {
|
||||
|
||||
@@ -916,5 +916,107 @@
|
||||
"temperature_dc": 480,
|
||||
"moisture_q": 47,
|
||||
"vegetation": 3
|
||||
},
|
||||
{
|
||||
"label": "lake_bowl/lake_centre",
|
||||
"rung": "district",
|
||||
"wx_m": 20015086,
|
||||
"wy_m": 158849,
|
||||
"min_wl_m": 4096,
|
||||
"morphology": 1,
|
||||
"tectonic": 0,
|
||||
"glaciation": 0,
|
||||
"precipitation": 3,
|
||||
"slope_q": 4,
|
||||
"elev_q": 0,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 62,
|
||||
"moisture_q": 56,
|
||||
"vegetation": 6
|
||||
},
|
||||
{
|
||||
"label": "lake_bowl/lake_centre",
|
||||
"rung": "quarter",
|
||||
"wx_m": 20015086,
|
||||
"wy_m": 158849,
|
||||
"min_wl_m": 1024,
|
||||
"morphology": 1,
|
||||
"tectonic": 0,
|
||||
"glaciation": 0,
|
||||
"precipitation": 3,
|
||||
"slope_q": 5,
|
||||
"elev_q": 0,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 62,
|
||||
"moisture_q": 56,
|
||||
"vegetation": 6
|
||||
},
|
||||
{
|
||||
"label": "lake_bowl/lake_centre",
|
||||
"rung": "region",
|
||||
"wx_m": 20015086,
|
||||
"wy_m": 158849,
|
||||
"min_wl_m": 0,
|
||||
"morphology": 1,
|
||||
"tectonic": 0,
|
||||
"glaciation": 0,
|
||||
"precipitation": 3,
|
||||
"slope_q": 0,
|
||||
"elev_q": 0,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": 62,
|
||||
"moisture_q": 56,
|
||||
"vegetation": 6
|
||||
},
|
||||
{
|
||||
"label": "lake_bowl/lake_rim",
|
||||
"rung": "district",
|
||||
"wx_m": 1250942,
|
||||
"wy_m": 158849,
|
||||
"min_wl_m": 4096,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 2,
|
||||
"precipitation": 1,
|
||||
"slope_q": 0,
|
||||
"elev_q": 71,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -120,
|
||||
"moisture_q": 55,
|
||||
"vegetation": 1
|
||||
},
|
||||
{
|
||||
"label": "lake_bowl/lake_rim",
|
||||
"rung": "quarter",
|
||||
"wx_m": 1250942,
|
||||
"wy_m": 158849,
|
||||
"min_wl_m": 1024,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 2,
|
||||
"precipitation": 1,
|
||||
"slope_q": 2,
|
||||
"elev_q": 75,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -120,
|
||||
"moisture_q": 54,
|
||||
"vegetation": 1
|
||||
},
|
||||
{
|
||||
"label": "lake_bowl/lake_rim",
|
||||
"rung": "region",
|
||||
"wx_m": 1250942,
|
||||
"wy_m": 158849,
|
||||
"min_wl_m": 0,
|
||||
"morphology": 8,
|
||||
"tectonic": 0,
|
||||
"glaciation": 2,
|
||||
"precipitation": 1,
|
||||
"slope_q": 0,
|
||||
"elev_q": 70,
|
||||
"ocean_fraction_q": 0,
|
||||
"temperature_dc": -120,
|
||||
"moisture_q": 54,
|
||||
"vegetation": 1
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user