Skip to content

Add hfb_pwn dataset and align drains_pwn with the Bergen model#63

Merged
bdestombe merged 2 commits into
mainfrom
add-hfb-pwn-dataset
Jul 6, 2026
Merged

Add hfb_pwn dataset and align drains_pwn with the Bergen model#63
bdestombe merged 2 commits into
mainfrom
add-hfb-pwn-dataset

Conversation

@bdestombe

Copy link
Copy Markdown
Member

Summary

Transfers the horizontal-flow-barrier (HFB) and drain (DRN) configuration from the Bergen study-case model (04v2pwnbergenmodel) into reusable nhflodata datasets, and hardens the data-validation tests.

New dataset hfb_pwn

  • Generated from the two damwand (sheet-pile wall) LineStrings in drains_en_damwand_bergen.
  • Schema matches what nlmod.gwf.hfb.get_hfb_spd consumes: hydchr (1/100 = a 100-day resistance) and depth (construction depth below groundlevel; elevation left null). The generator documents that depth-based placement is a deliberate choice (the wall is its physical 5 m of sheet pile, not forced to an absolute aquitard).
  • Registered in repository.yaml.

drains_pwn value corrections (checked against Bergen v2, cell 64)

  • Pump-building drains: drain stage set to the outlet level -0.5 m NAP (was the pipe invert min(diepte_van, diepte_tot)), matching the source "uitloop op -0.5mNAP" comments; drain_dwk stays 0.73 (pumped).
  • mover_lake_name routing filled: drain_dwk -> "vijver 1, 2 en 3", other drains -> "vijver 4".
  • Conductances (x1.0 per m / per m2) already matched Bergen.

Test hardening (surfaced while validating the above)

  • Fix the Windows-only path-separator bug in test_mockup_folder_structure (os.path.normpath on both sides) so the folder-structure contract actually runs on Windows.
  • Fix the silent extent: list(num(), length=4) no-op in schema_repository.yaml -> min=4, max=4 (yamale ignores length=).
  • Add tests/test_geojson_content.py: a dependency-free (stdlib json) content contract for drains_pwn/hfb_pwn (non-empty features, required columns, CRS present) — no value locking.

Test plan

hatch run test:pytest tests -v -> 5 passed, 2 xfailed (the xfails are the pre-existing shapefile-backlog checks).

bdestombe added 2 commits July 6, 2026 15:23
- New hfb_pwn mockup dataset (horizontal flow barriers / damwanden), generated from
  the two damwand features in drains_en_damwand_bergen. Stores the per-feature hydchr
  and construction depth consumed by nlmod.gwf.hfb.get_hfb_spd.
- Correct drains_pwn drain stages to the Bergen v2 outlet levels: the three
  pump-building drains to -0.5 m NAP (their "uitloop" outlet), drain_dwk stays 0.73;
  fill mover_lake_name routing (drain_dwk -> "vijver 1, 2 en 3", others -> "vijver 4").
- Register hfb_pwn in repository.yaml.
- Fix the Windows path-separator bug in test_mockup_folder_structure and the no-op
  extent length check in schema_repository.yaml; add a stdlib-json geojson content
  contract test for drains_pwn and hfb_pwn.
@bdestombe bdestombe merged commit a7eb984 into main Jul 6, 2026
1 check passed
@bdestombe bdestombe deleted the add-hfb-pwn-dataset branch July 6, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant