hydromt_delft3dfm.DFlowFMModel.setup_1dboundary#

DFlowFMModel.setup_1dboundary(boundaries_geodataset_fn: str = None, boundaries_timeseries_fn: str = None, boundary_value: float = -2.5, branch_type: str = 'river', boundary_type: str = 'waterlevel', boundary_unit: str = 'm', boundary_locs: str = 'downstream', snap_offset: float = 1.0)[source]#

Prepare the 1D boundary_type boundaries using timeseries or a constant.

Boundaries are prepared for a specific branch_type at the boundary_locs locations. E.g. ‘waterlevel’ boundaries for ‘downstream’’river’ branches.

The values can either be a constant using boundary_value (default) or timeseries read from boundaries_geodataset_fn.

Use boundaries_geodataset_fn to set the boundary values from a dataset of point location timeseries. Only locations within the possible model boundary locations + snap_offset are used. They are snapped to the model boundary locations within a max distance defined in snap_offset. If boundaries_geodataset_fn has missing values, the constant boundary_value will be used.

The dataset/timeseries are clipped to the model time based on the model config tstart and tstop entries.

Adds/Updates model layers:

  • boundary1d_{boundary_type}bnd_{branch_type} forcing: 1D boundaries

    DataArray

Parameters:
  • boundaries_geodataset_fn (str, Path) –

    Path or data source name for geospatial point timeseries file. This can either be a netcdf file with geospatial coordinates or a combined point location file with a timeseries data csv file which can be setup through the data_catalog yml file.

    • Required variables if netcdf: [‘discharge’, ‘waterlevel’] depending on

      boundary_type

    • Required coordinates if netcdf: [‘time’, ‘index’, ‘y’, ‘x’]

    • Required variables if a combined point location file: [‘index’] with type

      int

    • Required index types if a time series data csv file: int

    NOTE: Require equidistant time series

  • boundaries_timeseries_fn (str, Path) – Path to tabulated timeseries csv file with time index in first column and location IDs in the first row, see hydromt.open_timeseries_from_table(), for details. NOTE: tabulated timeseries files can only in combination with point location coordinates be set as a geodataset in the data_catalog yml file. NOTE: Require equidistant time series

  • boundary_value (float, optional) – Constant value to use for all boundaries if boundaries_geodataset_fn is None and to fill in missing data. By default -2.5 m.

  • branch_type (str) – Type of branch to apply boundaries on. One of [“river”, “pipe”].

  • boundary_type (str, optional) – Type of boundary tu use. One of [“waterlevel”, “discharge”]. By default “waterlevel”.

  • boundary_unit (str, optional.) –

    Unit corresponding to [boundary_type]. If boundary_type = “waterlevel”

    Allowed unit is [m]

    if ‘’boundary_type`` = “discharge”:

    Allowed unit is [m3/s]

    By default m.

  • boundary_locs – Boundary locations to consider. One of [“upstream”, “downstream”, “both”]. Only used for river waterlevel which can be upstream, downstream or both. By default “downstream”. For the others, it is automatically derived from branch_type and boundary_type.

  • snap_offset (float, optional) – Snapping tolerance to automatically applying boundaries at the correct network nodes. By default 0.1, a small snapping is applied to avoid precision errors.