hydromt_sfincs.workflows.merge_multi_dataarrays#

hydromt_sfincs.workflows.merge_multi_dataarrays(da_list: ~typing.List[dict], da_like: ~xarray.core.dataarray.DataArray | None = None, reproj_kwargs: ~typing.Dict = {}, buffer_cells: int = 0, interp_method: str = 'linear', logger=<Logger hydromt_sfincs.workflows.merge (WARNING)>) DataArray[source]#

Merge a list of data arrays by reprojecting these to a common destination grid and combine valid values.

Parameters:
  • da_list (List[dict]) –

    list of dicts with xr.DataArrays and optional merge arguments. Possible merge arguments are:

    • reproj_method: str, optional

      Reprojection method, if not provided, method is based on resolution (average when resolution of destination grid is coarser then data reosltuion, else bilinear).

    • offset: xr.DataArray, float, optional

      Dataset with spatially varying offset or float with uniform offset

    • zmin, zmaxfloat, optional

      Range of valid elevations for da2 - only valid cells are not merged. Note: applied after offset!

    • gdf_valid: gpd.GeoDataFrame, optional

      Geometry of the valid region for da2

  • da_like (xr.Dataarray, optional) – Destination grid, by default None. If provided the output data is projected to this grid, otherwise to the first input grid.

  • reproj_kwargs (dict, optional) – Keyword arguments for reprojecting the data to the destination grid. Only used of no da_like is provided.

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

  • interp_method (str, optional) – Interpolation method used to fill the buffer cells , by default “linear”

Returns:

  • xr.DataArray – merged data array

  • See Also

  • ———

  • merge_dataarrays()