hydromt.model.components.GridComponent.set#
- GridComponent.set(data: DataArray | Dataset | ndarray, name: str | None = None, mask: str | DataArray | None = None, force_sn: bool = False)[source]#
Add data to grid.
All layers of grid must have identical spatial coordinates.
- Parameters:
data (
xarray.DataArray
orxarray.Dataset
) – new map layer to add to gridname (
str
, optional) – Name of new map layer, this is used to overwrite the name of a DataArray and ignored if data is a Datasetmask (
xr.DataArray
, optional) – Name of the mask layer in the grid (self) or data, or directly the mask layer to use. Should be a DataArray where .raster.nodata is used to define the mask. If None or not present as a layer, no masking is applied.force_sn (
bool
, optional, defaultFalse
) – If True, the y-axis is oriented such that increasing y values go from South to North. If False, incoming data is used as is.