hydromt_sfincs.workflows.cog.create_topobathy_cog#

hydromt_sfincs.workflows.cog.create_topobathy_cog(model: SfincsModel, elevation_list: List[dict], filename: str | Path, res: float, river_list: List[dict] | None = None, bounds: List[float] | None = None, buffer_cells: int = 0, nrmax: int = 2000, z_minimum: float = -20000.0)[source]#

Write a Cloud Optimized GeoTIFF (COG) with merged topobathy data.

The elevation datasets (and optional river burn-in) are merged onto a regular, north-up raster in the model CRS that covers the model bounds (or bounds) at resolution res. The raster is processed in blocks of at most nrmax x nrmax pixels to limit memory use. Missing values are interpolated/extrapolated, so the output contains no nodata pixels in practice; the nodata value is NaN.

Parameters:
  • model (SfincsModel) – The SfincsModel instance providing the CRS, bounds and data catalog.

  • elevation_list (List[dict]) –

    List of dictionaries with topobathy data. Each should minimally contain a data catalog source name, data file path, or xarray raster object (‘elevation’). Optional merge arguments include: ‘zmin’, ‘zmax’, ‘mask’, ‘offset’, ‘reproj_method’, and ‘merge_method’, see example below. For a complete overview of all merge options, see hydromt.workflows.merge_multi_dataarrays()

    [
        {'elevation': 'merit_hydro', 'zmin': 0.01},
        {'elevation': 'gebco', 'offset': 0, 'merge_method': 'first', reproj_method: 'bilinear'}
    ]
    

  • filename (str or Path) – Output COG file path.

  • res (float) – Raster resolution in model CRS units.

  • river_list (List[dict], optional) –

    List of dictionaries with river datasets. Each dictionary should at least contain a river centerline data and optionally a river mask:

    • centerlines: filename (or Path) of river centerline with attributes

      rivwth (river width [m]; required if not river mask provided), rivdph or rivbed (river depth [m]; river bedlevel [m+REF]), manning (Manning’s n [s/m^(1/3)]; optional)

    • mask (optional): filename (or Path) of river mask

    • point_zb (optional): filename (or Path) of river points with bed (z) values

    • river attributes (optional): “rivdph”, “rivbed”, “rivwth”, “manning”

      to fill missing values

    • arguments to the river burn method (optional):

      segment_length [m] (default 500m) and riv_bank_q [0-1] (default 0.5) which used to estimate the river bank height in case river depth is provided.

    For more info see hydromt.workflows.bathymetry.burn_river_rect()

    [{'centerlines': 'river_lines', 'mask': 'river_mask', 'manning': 0.035}]
    

  • bounds (List[float], optional) – Raster extent [xmin, ymin, xmax, ymax] in model CRS units, by default the model bounds. The extent is rounded outwards to a multiple of res.

  • buffer_cells (int, optional) – Number of cells between datasets to ensure smooth transition of bed levels, by default 0

  • nrmax (int, optional) – Maximum number of pixels per block side, by default 2000. These blocks are used to prevent memory issues while working with large datasets

  • z_minimum (float, optional) – Minimum elevation in the output raster, by default -20000.0