Skip to content

Commit

Permalink
Merge branch 'main' into setup-retentions
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Oct 16, 2024
2 parents 7fd7862 + 533d58c commit 4b57603
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cancel-in-progress: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.9"
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channels: conda-forge
channel-priority: strict
environment-file: envs/hydromt-delft3dfm.yml
activate-environment: hydromt-delft3dfm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build-artifacts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
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 4b57603

Please sign in to comment.