Skip to content

Commit

Permalink
Merge pull request #81 from Deltares/77-setup-1d-laterals
Browse files Browse the repository at this point in the history
77 setup 1d laterals
  • Loading branch information
xldeltares authored Nov 28, 2023
2 parents 89d5702 + e2149bb commit a97d2b4
Show file tree
Hide file tree
Showing 46 changed files with 4,724 additions and 3,592 deletions.
9 changes: 8 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Setup components
DFlowFMModel.setup_pipes
DFlowFMModel.setup_manholes
DFlowFMModel.setup_1dboundary
DFlowFMModel.setup_1dlateral_from_points
DFlowFMModel.setup_1dlateral_from_polygons
DFlowFMModel.setup_bridges
DFlowFMModel.setup_culverts
DFlowFMModel.setup_mesh2d
Expand Down Expand Up @@ -148,12 +150,14 @@ Boundaries
:toctree: _generated

workflows.get_boundaries_with_nodeid
workflows.generate_boundaries_from_branches
workflows.select_boundary_type
workflows.validate_boundaries
workflows.compute_boundary_values
workflows.compute_2dboundary_values
workflows.compute_meteo_forcings
workflows.compute_forcing_values_points
workflows.compute_forcing_values_polygon
workflows.get_geometry_coords_for_polygons

Branches
--------
Expand All @@ -169,6 +173,7 @@ Branches
workflows.update_data_columns_attributes
workflows.update_data_columns_attribute_from_query
workflows.snap_newbranches_to_branches_at_snappednodes
workflows.snap_geom_to_branches_and_drop_nonsnapped

Crosssections
-------------
Expand Down Expand Up @@ -260,6 +265,8 @@ Input/Output methods
utils.write_manholes
utils.read_1dboundary
utils.write_1dboundary
utils.read_1dlateral
utils.write_1dlateral
utils.read_2dboundary
utils.write_2dboundary
utils.read_meteo
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ Unreleased

Added
-----
- Setup 1D laterals at branches from points and polygons. (PR #81)

Changed
-------

Fixed
-----
- Bugfixing of reading of frictions (global), crosssections and boundaries when update. (PR #81)

v0.2.0 (20 November 2023)
=========================
Expand Down
10 changes: 10 additions & 0 deletions examples/dflowfm_build_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ setup_1dboundary:
boundary_unit: m
boundary_locs: both

setup_1dlateral_from_points:
laterals_geodataset_fn: 1D_laterals_timeseries
branch_type: river
snap_offset: 10
lateral_value: 0

setup_1dlateral_from_polygons:
laterals_geodataset_fn: 1D_laterals_polygons_timeseries
lateral_value: 0

setup_mesh2d:
region:
geom: "local_data/1D_extent.geojson"
Expand Down
104 changes: 52 additions & 52 deletions examples/dflowfm_local/dflowfm/DFlowFM.mdu

Large diffs are not rendered by default.

21 changes: 19 additions & 2 deletions examples/dflowfm_local/dflowfm/bnd.ext
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ fileType = extForce
[Boundary]
quantity = waterlevelbnd
nodeId = 664197.234160_1527152.705985
forcingFile = boundaryconditions1d_waterlevelbnd.bc
forcingFile = boundarycondition1d.bc

[Boundary]
quantity = waterlevelbnd
nodeId = 666180.040000_1525894.770000
forcingFile = boundaryconditions1d_waterlevelbnd.bc
forcingFile = boundarycondition1d.bc

[Boundary]
quantity = waterlevelbnd
Expand All @@ -24,6 +24,23 @@ quantity = waterlevelbnd
locationFile = 1.pli
forcingFile = boundaryconditions2d_1.bc

[Lateral]
id = lateral1d_points_0
name = lateral1d_points_0
locationType = 1d
branchId = branch_7
chainage = 370.839
discharge = lateral1d.bc

[Lateral]
id = lateral1d_polygons_0
name = lateral1d_polygons_0
locationType = 1d
numCoordinates = 5
xCoordinates = 663197.4913821429 663634.2637682621 662898.6471179562 662500.1880990406 663197.4913821429
yCoordinates = 1525273.2984456269 1524966.7915079996 1524208.1868373717 1524867.1767532704 1525273.2984456269
discharge = lateral1d.bc

[Meteo]
quantity = rainfall_rate # Name of the quantity. See UM Section C.5.3
forcingFile = meteo_boundaryconditions.bc # Name of file containing the forcing for this meteo quantity.
Expand Down
Binary file modified examples/dflowfm_local/dflowfm/fm_net.nc
Binary file not shown.
78 changes: 78 additions & 0 deletions examples/dflowfm_local/dflowfm/lateral1d.bc
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# written by HYDROLIB-core 0.5.2

[General]
fileVersion = 1.01
fileType = boundConds

[Forcing]
name = lateral1d_points_0
function = timeseries
timeInterpolation = linear
offset = 0.0
factor = 1.0
quantity = time
unit = hours since 2020-01-01 00:00:00
quantity = lateral_discharge
unit = m3/s
0.0 0.0
1.0 0.0
2.0 0.0
3.0 0.0
4.0 0.0
5.0 0.0
6.0 0.0
7.0 0.0
8.0 0.0
9.0 0.0
10.0 0.0
11.0 0.0
12.0 0.0
13.0 0.0
14.0 0.0
15.0 0.0
16.0 0.0
17.0 0.0
18.0 0.0
19.0 0.0
20.0 0.0
21.0 0.0
22.0 0.0
23.0 0.0
24.0 0.0

[Forcing]
name = lateral1d_polygons_0
function = timeseries
timeInterpolation = linear
offset = 0.0
factor = 1.0
quantity = time
unit = hours since 2020-01-01 00:00:00
quantity = lateral_discharge
unit = m3/s
0.0 0.0
1.0 0.0
2.0 0.0
3.0 0.0
4.0 0.0
5.0 0.0
6.0 0.0
7.0 0.0
8.0 0.0
9.0 0.0
10.0 0.0
11.0 0.0
12.0 0.0
13.0 0.0
14.0 0.0
15.0 0.0
16.0 0.0
17.0 0.0
18.0 0.0
19.0 0.0
20.0 0.0
21.0 0.0
22.0 0.0
23.0 0.0
24.0 0.0

2 changes: 1 addition & 1 deletion examples/dflowfm_local/dimr_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<documentation>
<fileVersion>1.3</fileVersion>
<createdBy>hydrolib-core 0.5.2</createdBy>
<creationDate>2023-10-12T13:19:57.474727</creationDate>
<creationDate>2023-10-24T08:17:19.050552</creationDate>
</documentation>
<control>
<start name="dflowfm"/>
Expand Down
Loading

0 comments on commit a97d2b4

Please sign in to comment.