hydromt_delft3dfm.DFlowFMModel.setup_channels#

DFlowFMModel.setup_channels(region: dict, channels_fn: str, channels_defaults_fn: str = 'channels_defaults', channel_filter: str = None, friction_type: str = 'Manning', friction_value: float = 0.023, crosssections_fn: str = None, crosssections_type: str = None, spacing: float = inf, snap_offset: float = 0.0, maxdist: float = 1.0, allow_intersection_snapping: bool = True)[source]#

Prepare the 1D channels and adds to branches 1D network.

Adds model layers:

  • channels geom: 1D channels vector

  • branches geom: 1D branches vector

Parameters:
  • region (dict, optional) –

    Dictionary describing region of interest for extracting 1D channels, e.g.:

    • {‘bbox’: [xmin, ymin, xmax, ymax]}

    • {‘geom’: ‘path/to/polygon_geometry’}

    Note that only crs=4326 is supported for ‘bbox’.

  • channels_fn (str) –

    Name of data source for channelsparameters, see data/data_sources.yml. Note only the lines that intersect with the region polygon will be used.

    • Optional variables: [branchid, branchtype, branchorder, material,

    friction_type, friction_value]

  • channels_defaults_fn (str, optional) – Path to a csv file containing all defaults values per ‘branchtype’. Default is None.

  • channel_filter (str, optional) – Keyword in branchtype column of channels_fn used to filter river lines. If None all lines in channels_fn are used (default).

  • friction_type (str, optional) – Type of friction to use. One of [“Manning”, “Chezy”, “wallLawNikuradse”, “WhiteColebrook”, “StricklerNikuradse”, “Strickler”, “deBosBijkerk”]. By default “Manning”.

  • friction_value (float, optional.) – Friction value. Units corresponding to [friction_type] are [“Chézy C [m 1/2 /s]”, “Manning n [s/m 1/3 ]”, “Nikuradse k_n [m]”, “Nikuradse k_n [m]”, “Nikuradse k_n [m]”, “Strickler k_s [m 1/3 /s]”, “De Bos-Bijkerk γ [1/s]”] By default 0.023.

  • crosssections_fn (str or Path, optional) –

    Name of data source for crosssections, see data/data_sources.yml. If crosssections_type = “xyzpoints”

    • Required variables: [crsid, order, z]

    If crosssections_type = “points”

    • Required variables: [crsid, order, z]

    By default None, crosssections will be set from branches

  • crosssections_type (str, optional) – Type of crosssections read from crosssections_fn. One of [“xyzpoints”, “point”]. By default None.

  • snap_offset (float, optional) – Snapping tolerance to automatically connecting branches. By default 0.0, no snapping is applied.

  • maxdist (float, optional) – Maximum distance allowed for crosssections to be applied on branches. Only used for crosssections_type = point. By default 1.0.

  • allow_intersection_snapping (bool, optional) – Switch to choose whether snapping of multiple branch ends are allowed when snap_offset is used. By default True.

See also

dflowfm._setup_branches