hydromt.model.components.GridComponent.set#

GridComponent.set(data: DataArray | Dataset | ndarray, name: str | None = None)[source]#

Add data to grid.

All layers of grid must have identical spatial coordinates.

Parameters:
  • data (xarray.DataArray or xarray.Dataset) – new map layer to add to grid

  • name (str, optional) – Name of new map layer, this is used to overwrite the name of a DataArray and ignored if data is a Dataset