hydromt_delft3dfm.DFlowFMModel.setup_link1d2d#
- DFlowFMModel.setup_link1d2d(link_direction: str | None = '1d_to_2d', link_type: str | None = 'embedded', polygon_fn: str | None = None, branch_type: str | None = None, max_length: float | None = inf, dist_factor: float | None = 2.0, **kwargs)[source]#
Generate 1d2d links that link mesh1d and mesh2d according UGRID conventions.
1d2d links are added to allow water exchange between 1d and 2d for a 1d2d model. They can only be added if both mesh1d and mesh2d are present. By default, 1d_to_2d links are generated for the entire mesh1d except boundary locations.
When ‘’polygon_fn’’ is specified, only links within the polygon will be added. When ‘’branch_type’’ is specified, only 1d branches matching the specified type will be used for generating 1d2d link.
# TODO: This option should also allows more customised setup for pipes and tunnels: 1d2d links will also be generated at boundary locations.
- Parameters:
link_direction (str, optional) – Direction of the links: [“1d_to_2d”, “2d_to_1d”]. Default to 1d_to_2d.
link_type (str, optional) – Type of the links to be generated: [“embedded”, “lateral”]. Only used when ‘’link_direction’’ = ‘2d_to_1d’. Default to None.
polygon_fn (str Path, optional) – Source name of raster data in data_catalog. Default to None.
branch_type (str, Optional) – Type of branch to be used for 1d: [“river”,”pipe”,”channel”, “tunnel”]. When ‘’branch_type’’ = “pipe” or “tunnel” are specified, 1d2d links will also be generated at boundary locations. Default to None. Add 1d2d links for the all branches at non-boundary locations.
max_length (Union[float, None], optional) – Max allowed edge length for generated links. Only used when ‘’link_direction’’ = ‘2d_to_1d’ and ‘’link_type’’ = ‘lateral’. Defaults to infinity.
dist_factor (Union[float, None], optional:) – Factor to determine which links are kept. Only used when ‘’link_direction’’ = ‘2d_to_1d’ and ‘’link_type’’ = ‘lateral’. Defaults to 2.0. Links with an intersection distance larger than 2 times the center to edge distance of the cell, are removed.