Skip to content

Commit

Permalink
Align dflowfm buildyml (#178)
Browse files Browse the repository at this point in the history
* aligned dflowfm_build.yml while keeping all tests pass (follow up issues #177 and #181)

* added missing build steps in test_model_build_local_code

* added link to issue in comment
  • Loading branch information
veenstrajelmer authored Oct 16, 2024
1 parent dbe36af commit 533d58c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
18 changes: 16 additions & 2 deletions tests/data/dflowfm_build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#global:
# crs: 3857
# network_snap_offset: 25
# openwater_computation_node_distance: 40
# commented, because not supported with the current test method
# https://github.com/Deltares/hydromt_delft3dfm/issues/181

setup_rivers_from_dem:
region:
bbox: [12.4331, 46.4661, 12.5212, 46.5369]
hydrography_fn: merit_hydro
river_geom_fn: hydro_rivers_lin
rivers_defaults_fn: rivers_defaults
rivdph_method: gvf
rivwth_method: geom
river_upa: 25.0
Expand All @@ -14,6 +22,7 @@ setup_pipes:
region:
bbox: [12.4331, 46.4661, 12.5212, 46.5369]
pipes_fn: grip_roads
pipes_defaults_fn: pipes_defaults
pipe_filter: pipe
spacing: 50
friction_type: WhiteColeBrook
Expand All @@ -26,7 +35,10 @@ setup_pipes:
pipes_invlev: 3.

setup_manholes:
manholes_fn:
manhole_defaults_fn: manholes_defaults
dem_fn: merit_hydro
bedlevel_shift: 0.5

setup_1dboundary:
boundary_value: -2.0
Expand All @@ -45,14 +57,16 @@ setup_maps_from_rasterdataset:
variables: ["elevtn"]
fill_method: nearest
interpolation_method: nearestNb
split_dataset: True

setup_maps_from_raster_reclass:
raster_fn: vito_2015
reclass_table_fn: vito_mapping
reclass_variables: ['roughness_manning', 'infiltcap']
interpolation_method: triangulation
split_dataset: True

#setup_rainfall_from_constant:
# constant_value: 150
# this should probably be uncommented: https://github.com/Deltares/hydromt_delft3dfm/issues/177

setup_link1d2d:
link_direction: 1d_to_2d
7 changes: 7 additions & 0 deletions tests/data/dflowfm_build_local.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#global:
# crs: 32647
# network_snap_offset: 25
# openwater_computation_node_distance: 40
# commented, because not supported with the current test method
# https://github.com/Deltares/hydromt_delft3dfm/issues/181

setup_rivers:
region:
geom: "local_data/1D_extent.geojson"
Expand Down
2 changes: 2 additions & 0 deletions tests/test_hydromt.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ def test_model_build_local_code(tmp_path):
model.setup_rivers(**opt['setup_rivers1'])
model.setup_pipes(**opt['setup_pipes'])
model.setup_manholes(**opt['setup_manholes'])
model.setup_bridges(**opt['setup_bridges'])
model.setup_culverts(**opt['setup_culverts'])
model.setup_1dboundary(**opt['setup_1dboundary'])
model.setup_1dlateral_from_points(**opt['setup_1dlateral_from_points'])
model.setup_1dlateral_from_polygons(**opt['setup_1dlateral_from_polygons'])
Expand Down

0 comments on commit 533d58c

Please sign in to comment.