hydromt_delft3dfm.DFlowFMModel.setup_culverts#

DFlowFMModel.setup_culverts(culverts_fn: str | None = None, culverts_defaults_fn: str | None = '1D_culverts_defaults', culvert_filter: str | None = None, snap_offset: float | None = None)[source]#

Prepare culverts, including locations and crossections.

Note that only subtype culvert is supported, i.e. inverted siphon is not supported.

The culverts are read from culverts_fn and if any missing, filled with information provided in culverts_defaults_fn.

When reading culverts_fn, only locations within the region will be read. Read locations are then filtered for value specified in culvert_filter on the column “structure_type” . Remaining locations are snapped to the existing network within a max distance defined in snap_offset and will be dropped if not snapped.

A default culverts_defaults_fn that defines a circle culvert profile can be found in dflowfm.data.culverts as an example.

Structure attributes [‘structure_id’, ‘structure_type’] are either taken from data or generated in the script. Structure attributes [‘shape’, ‘diameter’, ‘width’, ‘t_width’, ‘height’, ‘closed’, ‘leftlevel’, ‘rightlevel’, ‘length’,’valveonoff’, ‘valveopeningheight’, ‘numlosscoeff’, ‘relopening’, ‘losscoeff’, ‘friction_type’, ‘friction_value’, ‘allowedflowdir’, ‘inletlosscoeff’, ‘outletlosscoeff’] are either taken from data, or in case of missing read from defaults.

Adds/Updates model layers:

  • culverts geom: 1D culverts vector

Parameters:
  • culverts_fn (str Path, optional) –

    Path or data source name for culverts, see data/data_sources.yml. Note only the points that are within the region polygon will be used.

    • Optional variables: [‘structure_id’, ‘structure_type’, ‘shape’,

      ’diameter’, ‘width’, ‘t_width’, ‘height’, ‘closed’, ‘leftlevel’, ‘rightlevel’, ‘length’, ‘valveonoff’, ‘valveopeningheight’, ‘numlosscoeff’, ‘relopening’, ‘losscoeff’, ‘friction_type’, ‘friction_value’, ‘allowedflowdir’, ‘inletlosscoeff’, ‘outletlosscoeff’]

  • culverts_defaults_fn (str Path, optional) –

    Path to a csv file containing all defaults values per “structure_type”. By default hydrolib.hydromt_delft3dfm.data.culverts.culverts_defaults.csv is used. This file describes a default circle culvert profile.

    • Allowed variables: [‘structure_type’, ‘shape’, ‘diameter’, ‘width’,

      ’t_width’, ‘height’, ‘closed’, ‘leftlevel’, ‘rightlevel’, ‘length’, ‘valveonoff’, ‘valveopeningheight’, ‘numlosscoeff’, ‘relopening’, ‘losscoeff’, ‘friction_type’, ‘friction_value’, ‘allowedflowdir’, ‘inletlosscoeff’, ‘outletlosscoeff’]

  • culvert_filter (str, optional) – Keyword in “structure_type” column of culverts_fn used to filter culvert features. If None all features are used (default).

  • snap_offset (float, optional) – Snapping tolenrance to automatically snap culverts to network and add [‘branchid’, ‘chainage’] attributes. By default None. In this case, global variable “network_snap_offset” will be used.